From 478ca76fb9620cbfd63a45dd8c83050f2ba5fdf1 Mon Sep 17 00:00:00 2001 From: Joerg Werner <4639399+jowerner@users.noreply.github.com> Date: Fri, 21 May 2021 16:34:51 +0200 Subject: [PATCH 1/8] imported HtmlUnit 2.50.0 --- .../htmlunit/AbstractPage.java | 2 +- .../htmlunit/AjaxController.java | 2 +- .../htmlunit/AlertHandler.java | 2 +- .../htmlunit/AppletConfirmHandler.java | 2 +- .../htmlunit/BrowserVersion.java | 32 +- .../htmlunit/BrowserVersionFeatures.java | 38 +- .../com/gargoylesoftware/htmlunit/Cache.java | 4 +- .../htmlunit/CollectingAlertHandler.java | 2 +- .../htmlunit/ConfirmHandler.java | 2 +- .../htmlunit/CookieManager.java | 2 +- .../htmlunit/DefaultCredentialsProvider.java | 2 +- .../htmlunit/DefaultCssErrorHandler.java | 2 +- .../htmlunit/DefaultPageCreator.java | 107 +- .../htmlunit/DialogWindow.java | 2 +- .../htmlunit/DownloadedContent.java | 2 +- .../htmlunit/ElementNotFoundException.java | 2 +- .../FailingHttpStatusCodeException.java | 2 +- .../htmlunit/FormEncodingType.java | 2 +- .../htmlunit/FrameContentHandler.java | 2 +- .../gargoylesoftware/htmlunit/History.java | 2 +- .../gargoylesoftware/htmlunit/HttpHeader.java | 2 +- .../gargoylesoftware/htmlunit/HttpMethod.java | 2 +- .../htmlunit/HttpWebConnection.java | 19 +- .../htmlunit/ImmediateRefreshHandler.java | 2 +- .../htmlunit/IncorrectnessListener.java | 2 +- .../htmlunit/IncorrectnessListenerImpl.java | 2 +- .../htmlunit/MockWebConnection.java | 2 +- .../htmlunit/NiceRefreshHandler.java | 2 +- .../NicelyResynchronizingAjaxController.java | 2 +- .../htmlunit/NotYetImplementedException.java | 2 +- .../ObjectInstantiationException.java | 2 +- .../htmlunit/OnbeforeunloadHandler.java | 2 +- .../com/gargoylesoftware/htmlunit/Page.java | 2 +- .../htmlunit/PageCreator.java | 2 +- .../htmlunit/PluginConfiguration.java | 2 +- .../htmlunit/PromptHandler.java | 2 +- .../htmlunit/ProxyAutoConfig.java | 8 +- .../htmlunit/ProxyConfig.java | 31 +- .../htmlunit/RefreshHandler.java | 2 +- .../htmlunit/ScriptException.java | 2 +- .../htmlunit/ScriptPreProcessor.java | 2 +- .../htmlunit/ScriptResult.java | 2 +- .../gargoylesoftware/htmlunit/SgmlPage.java | 5 +- .../htmlunit/SilentCssErrorHandler.java | 2 +- .../htmlunit/StatusHandler.java | 2 +- .../htmlunit/StorageHolder.java | 2 +- .../htmlunit/StringWebResponse.java | 2 +- .../gargoylesoftware/htmlunit/TextPage.java | 2 +- .../htmlunit/ThreadedRefreshHandler.java | 2 +- .../htmlunit/TopLevelWindow.java | 5 +- .../htmlunit/UnexpectedPage.java | 2 +- .../gargoylesoftware/htmlunit/Version.java | 2 +- .../htmlunit/WaitingRefreshHandler.java | 2 +- .../gargoylesoftware/htmlunit/WebAssert.java | 2 +- .../gargoylesoftware/htmlunit/WebClient.java | 210 +- .../htmlunit/WebClientInternals.java | 2 +- .../htmlunit/WebClientOptions.java | 2 +- .../htmlunit/WebConnection.java | 2 +- .../gargoylesoftware/htmlunit/WebConsole.java | 2 +- .../gargoylesoftware/htmlunit/WebRequest.java | 39 +- .../htmlunit/WebResponse.java | 2 +- .../htmlunit/WebResponseData.java | 2 +- .../htmlunit/WebResponseFromCache.java | 2 +- .../gargoylesoftware/htmlunit/WebWindow.java | 2 +- .../htmlunit/WebWindowAdapter.java | 2 +- .../htmlunit/WebWindowEvent.java | 2 +- .../htmlunit/WebWindowImpl.java | 2 +- .../htmlunit/WebWindowListener.java | 2 +- .../htmlunit/WebWindowNotFoundException.java | 2 +- .../msxml/MSXMLActiveXObjectFactory.java | 2 +- .../javascript/msxml/MSXMLConfiguration.java | 2 +- .../msxml/MSXMLJavaScriptEnvironment.java | 2 +- .../javascript/msxml/MSXMLScriptable.java | 4 +- .../javascript/msxml/XMLDOMAttribute.java | 2 +- .../javascript/msxml/XMLDOMCDATASection.java | 2 +- .../javascript/msxml/XMLDOMCharacterData.java | 2 +- .../javascript/msxml/XMLDOMComment.java | 2 +- .../javascript/msxml/XMLDOMDocument.java | 2 +- .../msxml/XMLDOMDocumentFragment.java | 2 +- .../javascript/msxml/XMLDOMDocumentType.java | 2 +- .../javascript/msxml/XMLDOMElement.java | 2 +- .../msxml/XMLDOMImplementation.java | 2 +- .../javascript/msxml/XMLDOMNamedNodeMap.java | 2 +- .../activex/javascript/msxml/XMLDOMNode.java | 2 +- .../javascript/msxml/XMLDOMNodeList.java | 2 +- .../javascript/msxml/XMLDOMParseError.java | 2 +- .../msxml/XMLDOMProcessingInstruction.java | 2 +- .../javascript/msxml/XMLDOMSelection.java | 2 +- .../activex/javascript/msxml/XMLDOMText.java | 2 +- .../javascript/msxml/XMLHTTPRequest.java | 2 +- .../javascript/msxml/XMLSerializer.java | 2 +- .../javascript/msxml/XSLProcessor.java | 2 +- .../activex/javascript/msxml/XSLTemplate.java | 2 +- .../javascript/msxml/package-info.java | 2 +- .../htmlunit/attachment/Attachment.java | 2 +- .../attachment/AttachmentHandler.java | 7 +- .../CollectingAttachmentHandler.java | 2 +- .../htmlunit/attachment/package-info.java | 2 +- .../htmlunit/css/StyleElement.java | 2 +- .../htmlunit/css/package-info.java | 2 +- .../htmlunit/html/AbstractDomNodeList.java | 2 +- .../htmlunit/html/BaseFrameElement.java | 94 +- .../html/CharacterDataChangeEvent.java | 2 +- .../html/CharacterDataChangeListener.java | 2 +- .../htmlunit/html/DefaultElementFactory.java | 8 +- .../htmlunit/html/DisabledElement.java | 2 +- .../htmlunit/html/DoTypeProcessor.java | 2 +- .../htmlunit/html/DomAttr.java | 2 +- .../htmlunit/html/DomCDataSection.java | 2 +- .../htmlunit/html/DomChangeEvent.java | 2 +- .../htmlunit/html/DomChangeListener.java | 2 +- .../htmlunit/html/DomCharacterData.java | 2 +- .../htmlunit/html/DomComment.java | 2 +- .../htmlunit/html/DomDocumentFragment.java | 2 +- .../htmlunit/html/DomDocumentType.java | 2 +- .../htmlunit/html/DomElement.java | 20 +- .../htmlunit/html/DomNamespaceNode.java | 2 +- .../htmlunit/html/DomNode.java | 19 +- .../htmlunit/html/DomNodeIterator.java | 2 +- .../htmlunit/html/DomNodeList.java | 2 +- .../html/DomProcessingInstruction.java | 2 +- .../htmlunit/html/DomText.java | 2 +- .../htmlunit/html/DomTreeWalker.java | 2 +- .../htmlunit/html/ElementFactory.java | 2 +- .../html/ElementFromPointHandler.java | 2 +- .../html/FormFieldWithNameHistory.java | 2 +- .../htmlunit/html/FrameWindow.java | 5 +- .../gargoylesoftware/htmlunit/html/Html.java | 2 +- .../htmlunit/html/HtmlAbbreviated.java | 2 +- .../htmlunit/html/HtmlAcronym.java | 2 +- .../htmlunit/html/HtmlAddress.java | 2 +- .../htmlunit/html/HtmlAnchor.java | 35 +- .../htmlunit/html/HtmlApplet.java | 2 +- .../htmlunit/html/HtmlArea.java | 12 +- .../htmlunit/html/HtmlArticle.java | 2 +- .../htmlunit/html/HtmlAside.java | 2 +- .../html/HtmlAttributeChangeEvent.java | 2 +- .../html/HtmlAttributeChangeListener.java | 2 +- .../htmlunit/html/HtmlAudio.java | 2 +- .../htmlunit/html/HtmlBackgroundSound.java | 2 +- .../htmlunit/html/HtmlBase.java | 2 +- .../htmlunit/html/HtmlBaseFont.java | 2 +- .../html/HtmlBidirectionalIsolation.java | 2 +- .../html/HtmlBidirectionalOverride.java | 2 +- .../htmlunit/html/HtmlBig.java | 2 +- .../htmlunit/html/HtmlBlink.java | 2 +- .../htmlunit/html/HtmlBlockQuote.java | 2 +- .../htmlunit/html/HtmlBody.java | 2 +- .../htmlunit/html/HtmlBold.java | 2 +- .../htmlunit/html/HtmlBreak.java | 2 +- .../htmlunit/html/HtmlButton.java | 2 +- .../htmlunit/html/HtmlButtonInput.java | 2 +- .../htmlunit/html/HtmlCanvas.java | 2 +- .../htmlunit/html/HtmlCaption.java | 2 +- .../htmlunit/html/HtmlCenter.java | 2 +- .../htmlunit/html/HtmlCheckBoxInput.java | 7 +- .../htmlunit/html/HtmlCitation.java | 2 +- .../htmlunit/html/HtmlCode.java | 2 +- .../htmlunit/html/HtmlColorInput.java | 2 +- .../htmlunit/html/HtmlCommand.java | 2 +- .../htmlunit/html/HtmlContent.java | 51 - .../htmlunit/html/HtmlData.java | 2 +- .../htmlunit/html/HtmlDataList.java | 2 +- .../htmlunit/html/HtmlDateInput.java | 2 +- .../htmlunit/html/HtmlDateTimeLocalInput.java | 2 +- .../htmlunit/html/HtmlDefinition.java | 2 +- .../html/HtmlDefinitionDescription.java | 2 +- .../htmlunit/html/HtmlDefinitionList.java | 2 +- .../htmlunit/html/HtmlDefinitionTerm.java | 2 +- .../htmlunit/html/HtmlDeletedText.java | 2 +- .../htmlunit/html/HtmlDetails.java | 10 +- .../htmlunit/html/HtmlDialog.java | 2 +- .../htmlunit/html/HtmlDirectory.java | 2 +- .../htmlunit/html/HtmlDivision.java | 2 +- .../htmlunit/html/HtmlElement.java | 25 +- .../htmlunit/html/HtmlEmailInput.java | 2 +- .../htmlunit/html/HtmlEmbed.java | 5 +- .../htmlunit/html/HtmlEmphasis.java | 2 +- .../htmlunit/html/HtmlExample.java | 2 +- .../htmlunit/html/HtmlFieldSet.java | 2 +- .../htmlunit/html/HtmlFigure.java | 2 +- .../htmlunit/html/HtmlFigureCaption.java | 2 +- .../htmlunit/html/HtmlFileInput.java | 43 +- .../htmlunit/html/HtmlFont.java | 2 +- .../htmlunit/html/HtmlFooter.java | 2 +- .../htmlunit/html/HtmlForm.java | 13 +- .../htmlunit/html/HtmlFrame.java | 2 +- .../htmlunit/html/HtmlFrameSet.java | 2 +- .../htmlunit/html/HtmlHead.java | 2 +- .../htmlunit/html/HtmlHeader.java | 2 +- .../htmlunit/html/HtmlHeading1.java | 2 +- .../htmlunit/html/HtmlHeading2.java | 2 +- .../htmlunit/html/HtmlHeading3.java | 2 +- .../htmlunit/html/HtmlHeading4.java | 2 +- .../htmlunit/html/HtmlHeading5.java | 2 +- .../htmlunit/html/HtmlHeading6.java | 2 +- .../htmlunit/html/HtmlHiddenInput.java | 6 +- .../htmlunit/html/HtmlHorizontalRule.java | 2 +- .../htmlunit/html/HtmlHtml.java | 2 +- .../htmlunit/html/HtmlImage.java | 9 +- .../htmlunit/html/HtmlImageInput.java | 52 +- .../htmlunit/html/HtmlInlineFrame.java | 2 +- .../htmlunit/html/HtmlInlineQuotation.java | 2 +- .../htmlunit/html/HtmlInput.java | 13 +- .../htmlunit/html/HtmlInsertedText.java | 2 +- .../htmlunit/html/HtmlIsIndex.java | 2 +- .../htmlunit/html/HtmlItalic.java | 2 +- .../htmlunit/html/HtmlKeyboard.java | 2 +- .../htmlunit/html/HtmlLabel.java | 13 +- .../htmlunit/html/HtmlLayer.java | 2 +- .../htmlunit/html/HtmlLegend.java | 2 +- .../htmlunit/html/HtmlLink.java | 6 +- .../htmlunit/html/HtmlListItem.java | 2 +- .../htmlunit/html/HtmlListing.java | 2 +- .../htmlunit/html/HtmlMain.java | 2 +- .../htmlunit/html/HtmlMap.java | 2 +- .../htmlunit/html/HtmlMark.java | 2 +- .../htmlunit/html/HtmlMarquee.java | 2 +- .../htmlunit/html/HtmlMedia.java | 2 +- .../htmlunit/html/HtmlMenu.java | 2 +- .../htmlunit/html/HtmlMenuItem.java | 2 +- .../htmlunit/html/HtmlMeta.java | 2 +- .../htmlunit/html/HtmlMeter.java | 2 +- .../htmlunit/html/HtmlMonthInput.java | 2 +- .../htmlunit/html/HtmlMultiColumn.java | 2 +- .../htmlunit/html/HtmlNav.java | 2 +- .../htmlunit/html/HtmlNextId.java | 2 +- .../htmlunit/html/HtmlNoBreak.java | 2 +- .../htmlunit/html/HtmlNoEmbed.java | 2 +- .../htmlunit/html/HtmlNoFrames.java | 2 +- .../htmlunit/html/HtmlNoLayer.java | 2 +- .../htmlunit/html/HtmlNoScript.java | 2 +- .../htmlunit/html/HtmlNumberInput.java | 136 +- .../htmlunit/html/HtmlObject.java | 2 +- .../htmlunit/html/HtmlOption.java | 6 +- .../htmlunit/html/HtmlOptionGroup.java | 2 +- .../htmlunit/html/HtmlOrderedList.java | 2 +- .../htmlunit/html/HtmlOutput.java | 2 +- .../htmlunit/html/HtmlPage.java | 54 +- .../htmlunit/html/HtmlParagraph.java | 2 +- .../htmlunit/html/HtmlParameter.java | 2 +- .../htmlunit/html/HtmlPasswordInput.java | 2 +- .../htmlunit/html/HtmlPicture.java | 2 +- .../htmlunit/html/HtmlPlainText.java | 2 +- .../htmlunit/html/HtmlPreformattedText.java | 2 +- .../htmlunit/html/HtmlProgress.java | 2 +- .../htmlunit/html/HtmlRadioButtonInput.java | 6 +- .../htmlunit/html/HtmlRangeInput.java | 2 +- .../htmlunit/html/HtmlResetInput.java | 7 +- .../htmlunit/html/HtmlRp.java | 2 +- .../htmlunit/html/HtmlRt.java | 2 +- .../htmlunit/html/HtmlRuby.java | 2 +- .../gargoylesoftware/htmlunit/html/HtmlS.java | 2 +- .../htmlunit/html/HtmlSample.java | 2 +- .../htmlunit/html/HtmlScript.java | 25 +- .../htmlunit/html/HtmlSearchInput.java | 2 +- .../htmlunit/html/HtmlSection.java | 2 +- .../htmlunit/html/HtmlSelect.java | 6 +- .../htmlunit/html/HtmlSerializer.java | 6 +- .../htmlunit/html/HtmlSlot.java | 2 +- .../htmlunit/html/HtmlSmall.java | 2 +- .../htmlunit/html/HtmlSource.java | 2 +- .../htmlunit/html/HtmlSpan.java | 2 +- .../htmlunit/html/HtmlStrike.java | 2 +- .../htmlunit/html/HtmlStrong.java | 2 +- .../htmlunit/html/HtmlStyle.java | 6 +- .../htmlunit/html/HtmlSubmitInput.java | 7 +- .../htmlunit/html/HtmlSubscript.java | 2 +- .../htmlunit/html/HtmlSummary.java | 2 +- .../htmlunit/html/HtmlSuperscript.java | 2 +- .../htmlunit/html/HtmlSvg.java | 2 +- .../htmlunit/html/HtmlTable.java | 2 +- .../htmlunit/html/HtmlTableBody.java | 2 +- .../htmlunit/html/HtmlTableCell.java | 2 +- .../htmlunit/html/HtmlTableColumn.java | 2 +- .../htmlunit/html/HtmlTableColumnGroup.java | 2 +- .../htmlunit/html/HtmlTableDataCell.java | 2 +- .../htmlunit/html/HtmlTableFooter.java | 2 +- .../htmlunit/html/HtmlTableHeader.java | 2 +- .../htmlunit/html/HtmlTableHeaderCell.java | 2 +- .../htmlunit/html/HtmlTableRow.java | 2 +- .../htmlunit/html/HtmlTelInput.java | 2 +- .../htmlunit/html/HtmlTeletype.java | 2 +- .../htmlunit/html/HtmlTemplate.java | 2 +- .../htmlunit/html/HtmlTextArea.java | 2 +- .../htmlunit/html/HtmlTextInput.java | 2 +- .../htmlunit/html/HtmlTime.java | 2 +- .../htmlunit/html/HtmlTimeInput.java | 2 +- .../htmlunit/html/HtmlTitle.java | 2 +- .../htmlunit/html/HtmlTrack.java | 2 +- .../htmlunit/html/HtmlUnderlined.java | 2 +- .../htmlunit/html/HtmlUnknownElement.java | 2 +- .../htmlunit/html/HtmlUnorderedList.java | 2 +- .../htmlunit/html/HtmlUrlInput.java | 2 +- .../htmlunit/html/HtmlVariable.java | 2 +- .../htmlunit/html/HtmlVideo.java | 2 +- .../htmlunit/html/HtmlWeekInput.java | 2 +- .../htmlunit/html/HtmlWordBreak.java | 2 +- .../htmlunit/html/Keyboard.java | 2 +- .../htmlunit/html/LabelableElement.java | 2 +- .../htmlunit/html/ScriptElement.java | 8 +- .../htmlunit/html/ScriptElementSupport.java | 32 +- .../htmlunit/html/SiblingDomNodeList.java | 2 +- .../htmlunit/html/StaticDomNodeList.java | 2 +- .../htmlunit/html/SubmittableElement.java | 2 +- .../htmlunit/html/TableRowGroup.java | 2 +- .../htmlunit/html/UnknownElementFactory.java | 2 +- .../htmlunit/html/XHtmlPage.java | 2 +- .../htmlunit/html/XmlSerializer.java | 2 +- .../html/applets/AppletClassLoader.java | 2 +- .../html/applets/AppletContextImpl.java | 2 +- .../htmlunit/html/applets/AppletStubImpl.java | 2 +- .../htmlunit/html/applets/package-info.java | 2 +- .../html/impl/SelectableTextInput.java | 2 +- .../impl/SelectableTextSelectionDelegate.java | 2 +- .../htmlunit/html/impl/SelectionDelegate.java | 2 +- .../htmlunit/html/impl/SimpleRange.java | 2 +- .../html/impl/SimpleSelectionDelegate.java | 2 +- .../htmlunit/html/impl/package-info.java | 2 +- .../htmlunit/html/package-info.java | 2 +- .../htmlunit/html/parser/HTMLParser.java | 2 +- .../html/parser/HTMLParserDOMBuilder.java | 2 +- .../html/parser/HTMLParserListener.java | 2 +- .../parser/neko/HtmlUnitNekoDOMBuilder.java | 2 +- .../parser/neko/HtmlUnitNekoHtmlParser.java | 2 +- .../html/parser/neko/package-info.java | 2 +- .../htmlunit/html/parser/package-info.java | 2 +- .../HtmlSerializerInnerOuterText.java | 569 + .../HtmlSerializerNormalizedText.java | 765 + .../HtmlSerializerVisibleText.java | 92 +- .../html/serializer/package-info.java | 19 + .../html/xpath/HtmlUnitPrefixResolver.java | 2 +- .../html/xpath/LowerCaseFunction.java | 2 +- .../htmlunit/html/xpath/XPathAdapter.java | 2 +- .../htmlunit/html/xpath/XPathHelper.java | 2 +- .../htmlunit/html/xpath/package-info.java | 2 +- ...owserCompatCookieHeaderValueFormatter.java | 2 +- .../HtmlUnitBrowserCompatCookieSpec.java | 5 +- .../HtmlUnitCookieSpecProvider.java | 2 +- .../httpclient/HtmlUnitCookieStore.java | 2 +- .../httpclient/HtmlUnitDomainHandler.java | 2 +- .../httpclient/HtmlUnitExpiresHandler.java | 10 +- .../httpclient/HtmlUnitHttpOnlyHandler.java | 2 +- .../httpclient/HtmlUnitPathHandler.java | 2 +- .../httpclient/HtmlUnitRedirectStrategie.java | 2 +- .../HtmlUnitSSLConnectionSocketFactory.java | 2 +- .../httpclient/HtmlUnitSameSiteHandler.java | 54 + .../HtmlUnitVersionAttributeHandler.java | 2 +- .../SocksConnectionSocketFactory.java | 2 +- .../htmlunit/httpclient/package-info.java | 2 +- .../javascript/AbstractJavaScriptEngine.java | 2 +- .../javascript/DebugFrameAdapter.java | 2 +- .../htmlunit/javascript/DebugFrameImpl.java | 2 +- .../htmlunit/javascript/DebuggerAdapter.java | 2 +- .../htmlunit/javascript/DebuggerImpl.java | 2 +- .../DefaultJavaScriptErrorListener.java | 2 +- .../htmlunit/javascript/FunctionWrapper.java | 2 +- .../javascript/HiddenFunctionObject.java | 2 +- .../javascript/HtmlUnitContextFactory.java | 2 +- .../javascript/HtmlUnitScriptable.java | 2 +- .../javascript/HtmlUnitWrapFactory.java | 2 +- .../htmlunit/javascript/JavaScriptEngine.java | 8 +- .../javascript/JavaScriptErrorListener.java | 2 +- .../htmlunit/javascript/MethodWrapper.java | 2 +- .../htmlunit/javascript/NamedNodeMap.java | 2 +- .../NativeFunctionToStringFunction.java | 2 +- .../htmlunit/javascript/PostponedAction.java | 12 +- .../javascript/RecursiveFunctionObject.java | 2 +- .../javascript/ScriptableWrapper.java | 2 +- .../SilentJavaScriptErrorListener.java | 2 +- .../htmlunit/javascript/SimpleScriptable.java | 2 +- .../javascript/SimpleScriptableProxy.java | 2 +- .../htmlunit/javascript/TimeoutError.java | 2 +- .../BackgroundJavaScriptFactory.java | 2 +- .../background/BasicJavaScriptJob.java | 2 +- .../background/DefaultJavaScriptExecutor.java | 2 +- .../background/DownloadBehaviorJob.java | 2 +- .../background/JavaScriptExecutionJob.java | 2 +- .../background/JavaScriptExecutor.java | 2 +- .../background/JavaScriptFunctionJob.java | 2 +- .../javascript/background/JavaScriptJob.java | 2 +- .../background/JavaScriptJobManager.java | 2 +- .../background/JavaScriptJobManagerImpl.java | 2 +- .../background/JavaScriptStringJob.java | 2 +- .../JavascriptXMLHttpRequestJob.java | 2 +- .../javascript/background/package-info.java | 2 +- .../AbstractJavaScriptConfiguration.java | 2 +- .../configuration/BrowserFeature.java | 2 +- .../configuration/ClassConfiguration.java | 2 +- .../JavaScriptConfiguration.java | 6 +- .../javascript/configuration/JsxClass.java | 2 +- .../javascript/configuration/JsxClasses.java | 2 +- .../javascript/configuration/JsxConstant.java | 2 +- .../configuration/JsxConstructor.java | 2 +- .../javascript/configuration/JsxFunction.java | 2 +- .../javascript/configuration/JsxGetter.java | 2 +- .../javascript/configuration/JsxSetter.java | 2 +- .../configuration/JsxStaticFunction.java | 2 +- .../configuration/JsxStaticGetter.java | 2 +- .../javascript/configuration/JsxSymbol.java | 2 +- .../configuration/SupportedBrowser.java | 2 +- .../configuration/package-info.java | 2 +- .../javascript/host/ActiveXObject.java | 2 +- .../javascript/host/ActiveXObjectImpl.java | 2 +- .../javascript/host/ApplicationCache.java | 6 +- .../host/AudioScheduledSourceNode.java | 2 +- .../htmlunit/javascript/host/BarProp.java | 2 +- .../javascript/host/BatteryManager.java | 2 +- .../javascript/host/BroadcastChannel.java | 2 +- .../htmlunit/javascript/host/Cache.java | 2 +- .../javascript/host/CacheStorage.java | 2 +- .../htmlunit/javascript/host/ClientRect.java | 2 +- .../javascript/host/ClientRectList.java | 2 +- .../htmlunit/javascript/host/Console.java | 2 +- .../htmlunit/javascript/host/DateCustom.java | 2 +- .../htmlunit/javascript/host/Element.java | 220 +- .../htmlunit/javascript/host/External.java | 2 +- .../htmlunit/javascript/host/FontFace.java | 2 +- .../htmlunit/javascript/host/FontFaceSet.java | 2 +- .../htmlunit/javascript/host/Gamepad.java | 2 +- .../javascript/host/GamepadButton.java | 2 +- .../htmlunit/javascript/host/History.java | 2 +- .../htmlunit/javascript/host/ImageBitmap.java | 2 +- .../javascript/host/InstallTrigger.java | 2 +- .../htmlunit/javascript/host/Location.java | 27 +- .../javascript/host/MessageChannel.java | 2 +- .../htmlunit/javascript/host/MessagePort.java | 13 +- .../htmlunit/javascript/host/MimeType.java | 2 +- .../javascript/host/MimeTypeArray.java | 2 +- .../htmlunit/javascript/host/Namespace.java | 2 +- .../javascript/host/NamespaceCollection.java | 2 +- .../host/NativeFunctionPrefixResolver.java | 2 +- .../htmlunit/javascript/host/Navigator.java | 19 +- .../htmlunit/javascript/host/Netscape.java | 2 +- .../javascript/host/Notification.java | 2 +- .../javascript/host/NumberCustom.java | 2 +- .../javascript/host/PerformanceObserver.java | 2 +- .../host/PerformanceObserverEntryList.java | 2 +- .../javascript/host/PermissionStatus.java | 2 +- .../htmlunit/javascript/host/Permissions.java | 2 +- .../htmlunit/javascript/host/Plugin.java | 2 +- .../htmlunit/javascript/host/PluginArray.java | 2 +- .../htmlunit/javascript/host/Promise.java | 2 +- .../htmlunit/javascript/host/PushManager.java | 2 +- .../javascript/host/PushSubscription.java | 2 +- .../host/PushSubscriptionOptions.java | 2 +- .../javascript/host/ReadableStream.java | 2 +- .../htmlunit/javascript/host/Reflect.java | 2 +- .../htmlunit/javascript/host/Screen.java | 2 +- .../javascript/host/ScreenOrientation.java | 2 +- .../javascript/host/SharedWorker.java | 2 +- .../htmlunit/javascript/host/SimpleArray.java | 2 +- .../htmlunit/javascript/host/Storage.java | 2 +- .../javascript/host/StorageManager.java | 2 +- .../htmlunit/javascript/host/TextDecoder.java | 2 +- .../htmlunit/javascript/host/TextEncoder.java | 2 +- .../htmlunit/javascript/host/Touch.java | 2 +- .../htmlunit/javascript/host/TouchList.java | 2 +- .../htmlunit/javascript/host/URL.java | 326 +- .../javascript/host/URLSearchParams.java | 13 +- .../htmlunit/javascript/host/WebSocket.java | 4 +- .../htmlunit/javascript/host/Window.java | 417 +- .../host/WindowOrWorkerGlobalScope.java | 2 +- .../host/WindowOrWorkerGlobalScopeMixin.java | 2 +- .../htmlunit/javascript/host/WindowProxy.java | 2 +- .../javascript/host/XPathExpression.java | 2 +- .../javascript/host/animations/Animation.java | 2 +- .../host/animations/AnimationEvent.java | 2 +- .../host/animations/KeyframeEffect.java | 2 +- .../host/animations/package-info.java | 2 +- .../javascript/host/arrays/Atomics.java | 2 +- .../host/arrays/SharedArrayBuffer.java | 2 +- .../javascript/host/arrays/package-info.java | 2 +- .../host/canvas/CanvasCaptureMediaStream.java | 2 +- .../canvas/CanvasCaptureMediaStreamTrack.java | 2 +- .../host/canvas/CanvasGradient.java | 2 +- .../javascript/host/canvas/CanvasPattern.java | 2 +- .../host/canvas/CanvasRenderingContext2D.java | 68 +- .../canvas/ImageBitmapRenderingContext.java | 2 +- .../javascript/host/canvas/ImageData.java | 2 +- .../host/canvas/IntersectionObserver.java | 2 +- .../canvas/IntersectionObserverEntry.java | 2 +- .../javascript/host/canvas/Path2D.java | 2 +- .../javascript/host/canvas/TextMetrics.java | 2 +- .../host/canvas/WebGL2RenderingContext.java | 2 +- .../host/canvas/WebGLActiveInfo.java | 2 +- .../javascript/host/canvas/WebGLBuffer.java | 2 +- .../host/canvas/WebGLFramebuffer.java | 2 +- .../javascript/host/canvas/WebGLProgram.java | 2 +- .../javascript/host/canvas/WebGLQuery.java | 2 +- .../host/canvas/WebGLRenderbuffer.java | 2 +- .../host/canvas/WebGLRenderingContext.java | 2 +- .../javascript/host/canvas/WebGLSampler.java | 2 +- .../javascript/host/canvas/WebGLShader.java | 2 +- .../canvas/WebGLShaderPrecisionFormat.java | 2 +- .../javascript/host/canvas/WebGLSync.java | 2 +- .../javascript/host/canvas/WebGLTexture.java | 2 +- .../host/canvas/WebGLTransformFeedback.java | 2 +- .../host/canvas/WebGLUniformLocation.java | 2 +- .../host/canvas/WebGLVertexArrayObject.java | 2 +- .../canvas/ext/ANGLE_instanced_arrays.java | 2 +- .../ext/EXT_texture_filter_anisotropic.java | 2 +- .../canvas/ext/OES_element_index_uint.java | 2 +- .../canvas/ext/OES_standard_derivatives.java | 2 +- .../host/canvas/ext/OES_texture_float.java | 2 +- .../canvas/ext/OES_texture_float_linear.java | 2 +- .../ext/WEBGL_compressed_texture_s3tc.java | 2 +- .../canvas/ext/WEBGL_debug_renderer_info.java | 2 +- .../host/canvas/ext/package-info.java | 2 +- .../javascript/host/canvas/package-info.java | 2 +- .../canvas/rendering/AwtRenderingBackend.java | 110 +- .../canvas/rendering/RenderingBackend.java | 18 +- .../host/canvas/rendering/package-info.java | 2 +- .../javascript/host/crypto/Crypto.java | 2 +- .../javascript/host/crypto/CryptoKey.java | 2 +- .../javascript/host/crypto/SubtleCrypto.java | 65 +- .../javascript/host/crypto/package-info.java | 2 +- .../host/css/BrowserConfiguration.java | 2 +- .../htmlunit/javascript/host/css/CSS.java | 4 +- .../javascript/host/css/CSS2Properties.java | 2 +- .../javascript/host/css/CSSConditionRule.java | 2 +- .../host/css/CSSCounterStyleRule.java | 2 +- .../javascript/host/css/CSSFontFaceRule.java | 2 +- .../javascript/host/css/CSSGroupingRule.java | 2 +- .../javascript/host/css/CSSImportRule.java | 2 +- .../javascript/host/css/CSSKeyframeRule.java | 2 +- .../javascript/host/css/CSSKeyframesRule.java | 2 +- .../javascript/host/css/CSSMediaRule.java | 2 +- .../javascript/host/css/CSSNamespaceRule.java | 2 +- .../javascript/host/css/CSSPageRule.java | 2 +- .../htmlunit/javascript/host/css/CSSRule.java | 2 +- .../javascript/host/css/CSSRuleList.java | 2 +- .../host/css/CSSStyleDeclaration.java | 18 +- .../javascript/host/css/CSSStyleRule.java | 2 +- .../javascript/host/css/CSSStyleSheet.java | 25 +- .../javascript/host/css/CSSSupportsRule.java | 2 +- .../javascript/host/css/CaretPosition.java | 2 +- .../host/css/ComputedCSSStyleDeclaration.java | 2 +- .../javascript/host/css/ComputedFont.java | 2 +- .../javascript/host/css/MediaQueryList.java | 2 +- .../javascript/host/css/StyleAttributes.java | 20 +- .../javascript/host/css/StyleMedia.java | 2 +- .../javascript/host/css/StyleSheet.java | 2 +- .../javascript/host/css/StyleSheetList.java | 2 +- .../javascript/host/css/WebKitCSSMatrix.java | 2 +- .../javascript/host/css/package-info.java | 2 +- .../javascript/host/dom/AbstractList.java | 2 +- .../htmlunit/javascript/host/dom/Attr.java | 2 +- .../javascript/host/dom/CDATASection.java | 2 +- .../javascript/host/dom/CharacterData.java | 2 +- .../htmlunit/javascript/host/dom/Comment.java | 2 +- .../host/dom/CustomElementRegistry.java | 2 +- .../javascript/host/dom/DOMError.java | 2 +- .../javascript/host/dom/DOMException.java | 2 +- .../host/dom/DOMImplementation.java | 6 +- .../javascript/host/dom/DOMMatrix.java | 2 +- .../host/dom/DOMMatrixReadOnly.java | 2 +- .../javascript/host/dom/DOMParser.java | 2 +- .../javascript/host/dom/DOMPoint.java | 2 +- .../javascript/host/dom/DOMPointReadOnly.java | 2 +- .../javascript/host/dom/DOMRectReadOnly.java | 2 +- .../javascript/host/dom/DOMRequest.java | 2 +- .../host/dom/DOMSettableTokenList.java | 2 +- .../javascript/host/dom/DOMStringList.java | 2 +- .../javascript/host/dom/DOMStringMap.java | 2 +- .../javascript/host/dom/DOMTokenList.java | 2 +- .../javascript/host/dom/Document.java | 411 +- .../javascript/host/dom/DocumentFragment.java | 2 +- .../javascript/host/dom/DocumentType.java | 2 +- .../javascript/host/dom/IdleDeadline.java | 2 +- .../javascript/host/dom/MediaList.java | 2 +- .../javascript/host/dom/MutationObserver.java | 6 +- .../javascript/host/dom/MutationRecord.java | 2 +- .../htmlunit/javascript/host/dom/Node.java | 6 +- .../javascript/host/dom/NodeFilter.java | 2 +- .../javascript/host/dom/NodeIterator.java | 2 +- .../javascript/host/dom/NodeList.java | 2 +- .../host/dom/ProcessingInstruction.java | 2 +- .../javascript/host/dom/RadioNodeList.java | 2 +- .../htmlunit/javascript/host/dom/Range.java | 7 +- .../javascript/host/dom/Selection.java | 21 +- .../javascript/host/dom/ShadowRoot.java | 2 +- .../htmlunit/javascript/host/dom/Text.java | 20 +- .../javascript/host/dom/TextRange.java | 2 +- .../javascript/host/dom/TreeWalker.java | 2 +- .../host/dom/WebKitMutationObserver.java | 2 +- .../javascript/host/dom/XPathEvaluator.java | 2 +- .../javascript/host/dom/XPathNSResolver.java | 2 +- .../javascript/host/dom/XPathResult.java | 2 +- .../javascript/host/dom/package-info.java | 2 +- .../host/event/AudioProcessingEvent.java | 2 +- .../host/event/BeforeInstallPromptEvent.java | 2 +- .../host/event/BeforeUnloadEvent.java | 2 +- .../javascript/host/event/BlobEvent.java | 2 +- .../javascript/host/event/ClipboardEvent.java | 2 +- .../javascript/host/event/CloseEvent.java | 2 +- .../host/event/CompositionEvent.java | 2 +- .../javascript/host/event/CustomEvent.java | 2 +- .../host/event/DeviceMotionEvent.java | 2 +- .../host/event/DeviceOrientationEvent.java | 2 +- .../javascript/host/event/DragEvent.java | 2 +- .../javascript/host/event/ErrorEvent.java | 2 +- .../htmlunit/javascript/host/event/Event.java | 388 +- .../javascript/host/event/EventHandler.java | 14 +- .../host/event/EventListenersContainer.java | 2 +- .../javascript/host/event/EventSource.java | 2 +- .../javascript/host/event/EventTarget.java | 6 +- .../javascript/host/event/FocusEvent.java | 2 +- .../javascript/host/event/GamepadEvent.java | 2 +- .../host/event/HashChangeEvent.java | 2 +- .../host/event/IDBVersionChangeEvent.java | 2 +- .../javascript/host/event/InputEvent.java | 81 +- .../javascript/host/event/KeyboardEvent.java | 312 +- .../host/event/MIDIConnectionEvent.java | 2 +- .../host/event/MIDIMessageEvent.java | 2 +- .../javascript/host/event/MSGestureEvent.java | 2 +- .../host/event/MediaEncryptedEvent.java | 2 +- .../host/event/MediaKeyMessageEvent.java | 2 +- .../host/event/MediaQueryListEvent.java | 2 +- .../host/event/MediaStreamEvent.java | 2 +- .../host/event/MediaStreamTrackEvent.java | 2 +- .../javascript/host/event/MessageEvent.java | 2 +- .../javascript/host/event/MouseEvent.java | 2 +- .../host/event/MouseScrollEvent.java | 2 +- .../host/event/MouseWheelEvent.java | 2 +- .../javascript/host/event/MutationEvent.java | 2 +- .../event/OfflineAudioCompletionEvent.java | 2 +- .../host/event/PageTransitionEvent.java | 2 +- .../javascript/host/event/PointerEvent.java | 2 +- .../javascript/host/event/PopStateEvent.java | 2 +- .../PresentationConnectionAvailableEvent.java | 2 +- .../PresentationConnectionCloseEvent.java | 2 +- .../javascript/host/event/ProgressEvent.java | 2 +- .../host/event/PromiseRejectionEvent.java | 2 +- .../host/event/RTCDataChannelEvent.java | 2 +- .../host/event/RTCPeerConnectionIceEvent.java | 2 +- .../javascript/host/event/SVGZoomEvent.java | 2 +- .../event/SecurityPolicyViolationEvent.java | 2 +- .../host/event/SpeechSynthesisEvent.java | 2 +- .../javascript/host/event/StorageEvent.java | 2 +- .../javascript/host/event/TextEvent.java | 2 +- .../javascript/host/event/TimeEvent.java | 2 +- .../javascript/host/event/TouchEvent.java | 2 +- .../javascript/host/event/TrackEvent.java | 2 +- .../host/event/TransitionEvent.java | 2 +- .../javascript/host/event/UIEvent.java | 2 +- .../host/event/WebGLContextEvent.java | 2 +- .../event/WebkitSpeechRecognitionError.java | 2 +- .../event/WebkitSpeechRecognitionEvent.java | 2 +- .../javascript/host/event/WheelEvent.java | 2 +- .../javascript/host/event/package-info.java | 2 +- .../javascript/host/fetch/Headers.java | 2 +- .../javascript/host/fetch/Request.java | 2 +- .../javascript/host/fetch/Response.java | 2 +- .../javascript/host/fetch/package-info.java | 2 +- .../htmlunit/javascript/host/file/Blob.java | 2 +- .../host/file/DataTransferItem.java | 2 +- .../host/file/DataTransferItemList.java | 2 +- .../htmlunit/javascript/host/file/File.java | 2 +- .../javascript/host/file/FileList.java | 2 +- .../javascript/host/file/FileReader.java | 2 +- .../javascript/host/file/FileSystem.java | 2 +- .../host/file/FileSystemDirectoryEntry.java | 2 +- .../host/file/FileSystemDirectoryReader.java | 2 +- .../javascript/host/file/FileSystemEntry.java | 2 +- .../host/file/FileSystemFileEntry.java | 2 +- .../javascript/host/file/package-info.java | 2 +- .../javascript/host/geo/Coordinates.java | 2 +- .../javascript/host/geo/Geolocation.java | 2 +- .../javascript/host/geo/Position.java | 2 +- .../javascript/host/geo/PositionError.java | 2 +- .../javascript/host/geo/package-info.java | 2 +- .../htmlunit/javascript/host/html/Audio.java | 2 +- .../javascript/host/html/DataTransfer.java | 2 +- .../javascript/host/html/DocumentProxy.java | 2 +- .../javascript/host/html/Enumerator.java | 2 +- .../host/html/HTMLAllCollection.java | 2 +- .../host/html/HTMLAnchorElement.java | 34 +- .../host/html/HTMLAppletElement.java | 2 +- .../javascript/host/html/HTMLAreaElement.java | 2 +- .../host/html/HTMLAudioElement.java | 2 +- .../host/html/HTMLBGSoundElement.java | 2 +- .../javascript/host/html/HTMLBRElement.java | 2 +- .../javascript/host/html/HTMLBaseElement.java | 2 +- .../host/html/HTMLBaseFontElement.java | 2 +- .../host/html/HTMLBlockElement.java | 2 +- .../javascript/host/html/HTMLBodyElement.java | 139 +- .../host/html/HTMLButtonElement.java | 2 +- .../host/html/HTMLCanvasElement.java | 2 +- .../javascript/host/html/HTMLCollection.java | 2 +- .../host/html/HTMLContentElement.java | 39 - .../javascript/host/html/HTMLDDElement.java | 2 +- .../host/html/HTMLDListElement.java | 2 +- .../javascript/host/html/HTMLDTElement.java | 2 +- .../javascript/host/html/HTMLDataElement.java | 2 +- .../host/html/HTMLDataListElement.java | 2 +- .../host/html/HTMLDetailsElement.java | 22 +- .../host/html/HTMLDialogElement.java | 2 +- .../host/html/HTMLDirectoryElement.java | 2 +- .../javascript/host/html/HTMLDivElement.java | 2 +- .../javascript/host/html/HTMLDocument.java | 32 +- .../javascript/host/html/HTMLElement.java | 564 +- .../host/html/HTMLEmbedElement.java | 2 +- .../host/html/HTMLFieldSetElement.java | 2 +- .../javascript/host/html/HTMLFontElement.java | 2 +- .../host/html/HTMLFormControlsCollection.java | 2 +- .../javascript/host/html/HTMLFormElement.java | 4 +- .../host/html/HTMLFrameElement.java | 2 +- .../host/html/HTMLFrameSetElement.java | 46 +- .../javascript/host/html/HTMLHRElement.java | 2 +- .../javascript/host/html/HTMLHeadElement.java | 2 +- .../host/html/HTMLHeadingElement.java | 2 +- .../javascript/host/html/HTMLHtmlElement.java | 11 +- .../host/html/HTMLIFrameElement.java | 8 +- .../host/html/HTMLImageElement.java | 2 +- .../host/html/HTMLInlineQuotationElement.java | 2 +- .../host/html/HTMLInputElement.java | 39 +- .../host/html/HTMLIsIndexElement.java | 2 +- .../javascript/host/html/HTMLLIElement.java | 2 +- .../host/html/HTMLLabelElement.java | 2 +- .../host/html/HTMLLegendElement.java | 2 +- .../javascript/host/html/HTMLLinkElement.java | 2 +- .../javascript/host/html/HTMLListElement.java | 2 +- .../javascript/host/html/HTMLMapElement.java | 2 +- .../host/html/HTMLMarqueeElement.java | 2 +- .../host/html/HTMLMediaElement.java | 2 +- .../javascript/host/html/HTMLMenuElement.java | 10 +- .../host/html/HTMLMenuItemElement.java | 5 +- .../javascript/host/html/HTMLMetaElement.java | 2 +- .../host/html/HTMLMeterElement.java | 2 +- .../javascript/host/html/HTMLModElement.java | 2 +- .../host/html/HTMLNextIdElement.java | 2 +- .../host/html/HTMLOListElement.java | 2 +- .../host/html/HTMLObjectElement.java | 2 +- .../host/html/HTMLOptGroupElement.java | 2 +- .../host/html/HTMLOptionElement.java | 2 +- .../host/html/HTMLOptionsCollection.java | 2 +- .../host/html/HTMLOutputElement.java | 2 +- .../host/html/HTMLParagraphElement.java | 2 +- .../host/html/HTMLParamElement.java | 2 +- .../host/html/HTMLPhraseElement.java | 2 +- .../host/html/HTMLPictureElement.java | 2 +- .../javascript/host/html/HTMLPreElement.java | 2 +- .../host/html/HTMLProgressElement.java | 2 +- .../host/html/HTMLQuoteElement.java | 2 +- .../host/html/HTMLScriptElement.java | 6 +- .../host/html/HTMLSelectElement.java | 2 +- .../host/html/HTMLShadowElement.java | 38 - .../javascript/host/html/HTMLSlotElement.java | 2 +- .../host/html/HTMLSourceElement.java | 2 +- .../javascript/host/html/HTMLSpanElement.java | 2 +- .../host/html/HTMLStyleElement.java | 2 +- .../host/html/HTMLTableCaptionElement.java | 2 +- .../host/html/HTMLTableCellElement.java | 2 +- .../host/html/HTMLTableColElement.java | 2 +- .../host/html/HTMLTableComponent.java | 2 +- .../host/html/HTMLTableDataCellElement.java | 2 +- .../host/html/HTMLTableElement.java | 13 +- .../host/html/HTMLTableHeaderCellElement.java | 2 +- .../host/html/HTMLTableRowElement.java | 2 +- .../host/html/HTMLTableSectionElement.java | 2 +- .../host/html/HTMLTemplateElement.java | 22 +- .../host/html/HTMLTextAreaElement.java | 2 +- .../javascript/host/html/HTMLTimeElement.java | 2 +- .../host/html/HTMLTitleElement.java | 2 +- .../host/html/HTMLTrackElement.java | 2 +- .../host/html/HTMLUListElement.java | 2 +- .../host/html/HTMLUnknownElement.java | 2 +- .../host/html/HTMLVideoElement.java | 2 +- .../htmlunit/javascript/host/html/Image.java | 2 +- .../javascript/host/html/LabelsHelper.java | 2 +- .../htmlunit/javascript/host/html/Option.java | 2 +- .../javascript/host/html/RowContainer.java | 2 +- .../javascript/host/html/ValidityState.java | 2 +- .../javascript/host/html/package-info.java | 2 +- .../javascript/host/idb/IDBCursor.java | 2 +- .../host/idb/IDBCursorWithValue.java | 2 +- .../javascript/host/idb/IDBDatabase.java | 2 +- .../javascript/host/idb/IDBFactory.java | 2 +- .../javascript/host/idb/IDBIndex.java | 2 +- .../javascript/host/idb/IDBKeyRange.java | 2 +- .../javascript/host/idb/IDBMutableFile.java | 2 +- .../javascript/host/idb/IDBObjectStore.java | 2 +- .../javascript/host/idb/IDBOpenDBRequest.java | 2 +- .../javascript/host/idb/IDBRequest.java | 2 +- .../javascript/host/idb/IDBTransaction.java | 2 +- .../javascript/host/idb/package-info.java | 2 +- .../javascript/host/intl/Collator.java | 2 +- .../javascript/host/intl/DateTimeFormat.java | 25 +- .../htmlunit/javascript/host/intl/Intl.java | 2 +- .../javascript/host/intl/NumberFormat.java | 2 +- .../javascript/host/intl/V8BreakIterator.java | 2 +- .../javascript/host/intl/package-info.java | 2 +- .../javascript/host/media/AnalyserNode.java | 2 +- .../javascript/host/media/AudioBuffer.java | 2 +- .../host/media/AudioBufferSourceNode.java | 2 +- .../javascript/host/media/AudioContext.java | 4 +- .../host/media/AudioDestinationNode.java | 2 +- .../javascript/host/media/AudioListener.java | 2 +- .../javascript/host/media/AudioNode.java | 2 +- .../javascript/host/media/AudioParam.java | 2 +- .../host/media/BaseAudioContext.java | 2 +- .../host/media/BiquadFilterNode.java | 2 +- .../host/media/ChannelMergerNode.java | 2 +- .../host/media/ChannelSplitterNode.java | 2 +- .../host/media/ConstantSourceNode.java | 2 +- .../javascript/host/media/ConvolverNode.java | 2 +- .../javascript/host/media/DelayNode.java | 2 +- .../host/media/DynamicsCompressorNode.java | 2 +- .../javascript/host/media/GainNode.java | 2 +- .../javascript/host/media/IIRFilterNode.java | 2 +- .../host/media/InputDeviceCapabilities.java | 2 +- .../host/media/MediaDeviceInfo.java | 2 +- .../javascript/host/media/MediaDevices.java | 12 +- .../media/MediaElementAudioSourceNode.java | 2 +- .../javascript/host/media/MediaError.java | 2 +- .../javascript/host/media/MediaKeyError.java | 2 +- .../host/media/MediaKeySession.java | 2 +- .../host/media/MediaKeyStatusMap.java | 2 +- .../host/media/MediaKeySystemAccess.java | 2 +- .../javascript/host/media/MediaKeys.java | 2 +- .../javascript/host/media/MediaRecorder.java | 2 +- .../javascript/host/media/MediaSource.java | 2 +- .../javascript/host/media/MediaStream.java | 2 +- .../MediaStreamAudioDestinationNode.java | 2 +- .../media/MediaStreamAudioSourceNode.java | 2 +- .../host/media/MediaStreamTrack.java | 2 +- .../host/media/OfflineAudioContext.java | 2 +- .../javascript/host/media/OscillatorNode.java | 2 +- .../javascript/host/media/PannerNode.java | 2 +- .../host/media/PeriodicSyncManager.java | 2 +- .../javascript/host/media/PeriodicWave.java | 2 +- .../javascript/host/media/RemotePlayback.java | 2 +- .../host/media/ScriptProcessorNode.java | 2 +- .../javascript/host/media/SourceBuffer.java | 2 +- .../host/media/SourceBufferList.java | 2 +- .../host/media/StereoPannerNode.java | 2 +- .../javascript/host/media/TextTrack.java | 2 +- .../javascript/host/media/TextTrackCue.java | 2 +- .../host/media/TextTrackCueList.java | 2 +- .../javascript/host/media/TextTrackList.java | 2 +- .../javascript/host/media/TimeRanges.java | 2 +- .../javascript/host/media/VTTCue.java | 2 +- .../host/media/VideoPlaybackQuality.java | 2 +- .../javascript/host/media/WaveShaperNode.java | 2 +- .../host/media/WebkitMediaStream.java | 2 +- .../host/media/midi/MIDIAccess.java | 2 +- .../javascript/host/media/midi/MIDIInput.java | 2 +- .../host/media/midi/MIDIInputMap.java | 2 +- .../host/media/midi/MIDIOutput.java | 2 +- .../host/media/midi/MIDIOutputMap.java | 2 +- .../javascript/host/media/midi/MIDIPort.java | 2 +- .../host/media/midi/package-info.java | 2 +- .../javascript/host/media/package-info.java | 2 +- .../host/media/presentation/Presentation.java | 2 +- .../PresentationAvailability.java | 2 +- .../presentation/PresentationConnection.java | 2 +- .../presentation/PresentationRequest.java | 2 +- .../host/media/presentation/package-info.java | 2 +- .../host/media/rtc/MozRTCIceCandidate.java | 2 +- .../host/media/rtc/MozRTCPeerConnection.java | 2 +- .../media/rtc/MozRTCSessionDescription.java | 2 +- .../host/media/rtc/RTCCertificate.java | 2 +- .../host/media/rtc/RTCIceCandidate.java | 2 +- .../host/media/rtc/RTCPeerConnection.java | 2 +- .../host/media/rtc/RTCSessionDescription.java | 2 +- .../host/media/rtc/RTCStatsReport.java | 2 +- .../media/rtc/WebkitRTCPeerConnection.java | 2 +- .../host/media/rtc/package-info.java | 2 +- .../host/network/NetworkInformation.java | 2 +- .../javascript/host/network/package-info.java | 2 +- .../javascript/host/package-info.java | 2 +- .../host/payment/PaymentAddress.java | 2 +- .../host/payment/PaymentRequest.java | 2 +- .../host/payment/PaymentResponse.java | 2 +- .../javascript/host/payment/package-info.java | 2 +- .../host/performance/Performance.java | 2 +- .../host/performance/PerformanceEntry.java | 2 +- .../host/performance/PerformanceMark.java | 2 +- .../host/performance/PerformanceMeasure.java | 2 +- .../performance/PerformanceNavigation.java | 2 +- .../PerformanceNavigationTiming.java | 2 +- .../PerformanceResourceTiming.java | 2 +- .../host/performance/PerformanceTiming.java | 2 +- .../host/performance/package-info.java | 2 +- .../javascript/host/security/Credential.java | 2 +- .../host/security/CredentialsContainer.java | 2 +- .../host/security/FederatedCredential.java | 2 +- .../host/security/PasswordCredential.java | 2 +- .../host/security/package-info.java | 2 +- .../host/speech/SpeechSynthesis.java | 2 +- .../speech/SpeechSynthesisErrorEvent.java | 2 +- .../host/speech/SpeechSynthesisUtterance.java | 2 +- .../host/speech/SpeechSynthesisVoice.java | 2 +- .../host/speech/WebkitSpeechGrammar.java | 2 +- .../host/speech/WebkitSpeechGrammarList.java | 2 +- .../host/speech/WebkitSpeechRecognition.java | 2 +- .../javascript/host/speech/package-info.java | 2 +- .../host/svg/MatrixTransformer.java | 2 +- .../javascript/host/svg/SVGAElement.java | 2 +- .../javascript/host/svg/SVGAngle.java | 2 +- .../host/svg/SVGAnimateElement.java | 2 +- .../host/svg/SVGAnimateMotionElement.java | 2 +- .../host/svg/SVGAnimateTransformElement.java | 2 +- .../javascript/host/svg/SVGAnimatedAngle.java | 2 +- .../host/svg/SVGAnimatedBoolean.java | 2 +- .../host/svg/SVGAnimatedEnumeration.java | 2 +- .../host/svg/SVGAnimatedInteger.java | 2 +- .../host/svg/SVGAnimatedLength.java | 2 +- .../host/svg/SVGAnimatedLengthList.java | 2 +- .../host/svg/SVGAnimatedNumber.java | 2 +- .../host/svg/SVGAnimatedNumberList.java | 2 +- .../svg/SVGAnimatedPreserveAspectRatio.java | 2 +- .../javascript/host/svg/SVGAnimatedRect.java | 2 +- .../host/svg/SVGAnimatedString.java | 2 +- .../host/svg/SVGAnimatedTransformList.java | 2 +- .../host/svg/SVGAnimationElement.java | 2 +- .../javascript/host/svg/SVGCircleElement.java | 2 +- .../host/svg/SVGClipPathElement.java | 2 +- .../SVGComponentTransferFunctionElement.java | 2 +- .../javascript/host/svg/SVGDefsElement.java | 2 +- .../javascript/host/svg/SVGDescElement.java | 2 +- .../javascript/host/svg/SVGElement.java | 264 +- .../host/svg/SVGEllipseElement.java | 2 +- .../host/svg/SVGFEBlendElement.java | 2 +- .../host/svg/SVGFEColorMatrixElement.java | 2 +- .../svg/SVGFEComponentTransferElement.java | 2 +- .../host/svg/SVGFECompositeElement.java | 12 +- .../host/svg/SVGFEConvolveMatrixElement.java | 2 +- .../host/svg/SVGFEDiffuseLightingElement.java | 2 +- .../host/svg/SVGFEDisplacementMapElement.java | 2 +- .../host/svg/SVGFEDistantLightElement.java | 2 +- .../host/svg/SVGFEDropShadowElement.java | 2 +- .../host/svg/SVGFEFloodElement.java | 2 +- .../host/svg/SVGFEFuncAElement.java | 2 +- .../host/svg/SVGFEFuncBElement.java | 2 +- .../host/svg/SVGFEFuncGElement.java | 2 +- .../host/svg/SVGFEFuncRElement.java | 2 +- .../host/svg/SVGFEGaussianBlurElement.java | 2 +- .../host/svg/SVGFEImageElement.java | 2 +- .../host/svg/SVGFEMergeElement.java | 2 +- .../host/svg/SVGFEMergeNodeElement.java | 2 +- .../host/svg/SVGFEMorphologyElement.java | 2 +- .../host/svg/SVGFEOffsetElement.java | 2 +- .../host/svg/SVGFEPointLightElement.java | 2 +- .../svg/SVGFESpecularLightingElement.java | 2 +- .../host/svg/SVGFESpotLightElement.java | 2 +- .../javascript/host/svg/SVGFETileElement.java | 2 +- .../host/svg/SVGFETurbulenceElement.java | 2 +- .../javascript/host/svg/SVGFilterElement.java | 2 +- .../host/svg/SVGForeignObjectElement.java | 2 +- .../javascript/host/svg/SVGGElement.java | 2 +- .../host/svg/SVGGeometryElement.java | 2 +- .../host/svg/SVGGradientElement.java | 2 +- .../host/svg/SVGGraphicsElement.java | 2 +- .../javascript/host/svg/SVGImageElement.java | 2 +- .../javascript/host/svg/SVGLength.java | 2 +- .../javascript/host/svg/SVGLengthList.java | 2 +- .../javascript/host/svg/SVGLineElement.java | 2 +- .../host/svg/SVGLinearGradientElement.java | 2 +- .../javascript/host/svg/SVGMPathElement.java | 2 +- .../javascript/host/svg/SVGMarkerElement.java | 11 +- .../javascript/host/svg/SVGMaskElement.java | 2 +- .../javascript/host/svg/SVGMatrix.java | 2 +- .../host/svg/SVGMetadataElement.java | 2 +- .../javascript/host/svg/SVGNumber.java | 2 +- .../javascript/host/svg/SVGNumberList.java | 2 +- .../javascript/host/svg/SVGPathElement.java | 2 +- .../javascript/host/svg/SVGPathSeg.java | 2 +- .../javascript/host/svg/SVGPathSegArcAbs.java | 2 +- .../javascript/host/svg/SVGPathSegArcRel.java | 2 +- .../host/svg/SVGPathSegClosePath.java | 2 +- .../host/svg/SVGPathSegCurvetoCubicAbs.java | 2 +- .../host/svg/SVGPathSegCurvetoCubicRel.java | 2 +- .../svg/SVGPathSegCurvetoCubicSmoothAbs.java | 2 +- .../svg/SVGPathSegCurvetoCubicSmoothRel.java | 2 +- .../svg/SVGPathSegCurvetoQuadraticAbs.java | 2 +- .../svg/SVGPathSegCurvetoQuadraticRel.java | 2 +- .../SVGPathSegCurvetoQuadraticSmoothAbs.java | 2 +- .../SVGPathSegCurvetoQuadraticSmoothRel.java | 2 +- .../host/svg/SVGPathSegLinetoAbs.java | 2 +- .../svg/SVGPathSegLinetoHorizontalAbs.java | 2 +- .../svg/SVGPathSegLinetoHorizontalRel.java | 2 +- .../host/svg/SVGPathSegLinetoRel.java | 2 +- .../host/svg/SVGPathSegLinetoVerticalAbs.java | 2 +- .../host/svg/SVGPathSegLinetoVerticalRel.java | 2 +- .../javascript/host/svg/SVGPathSegList.java | 2 +- .../host/svg/SVGPathSegMovetoAbs.java | 2 +- .../host/svg/SVGPathSegMovetoRel.java | 2 +- .../host/svg/SVGPatternElement.java | 2 +- .../javascript/host/svg/SVGPoint.java | 2 +- .../javascript/host/svg/SVGPointList.java | 2 +- .../host/svg/SVGPolygonElement.java | 2 +- .../host/svg/SVGPolylineElement.java | 2 +- .../host/svg/SVGPreserveAspectRatio.java | 2 +- .../host/svg/SVGRadialGradientElement.java | 2 +- .../htmlunit/javascript/host/svg/SVGRect.java | 2 +- .../javascript/host/svg/SVGRectElement.java | 2 +- .../javascript/host/svg/SVGSVGElement.java | 2 +- .../javascript/host/svg/SVGScriptElement.java | 2 +- .../javascript/host/svg/SVGSetElement.java | 2 +- .../javascript/host/svg/SVGStopElement.java | 2 +- .../javascript/host/svg/SVGStringList.java | 2 +- .../javascript/host/svg/SVGStyleElement.java | 2 +- .../javascript/host/svg/SVGSwitchElement.java | 2 +- .../javascript/host/svg/SVGSymbolElement.java | 2 +- .../javascript/host/svg/SVGTSpanElement.java | 2 +- .../host/svg/SVGTextContentElement.java | 2 +- .../javascript/host/svg/SVGTextElement.java | 2 +- .../host/svg/SVGTextPathElement.java | 2 +- .../host/svg/SVGTextPositioningElement.java | 2 +- .../javascript/host/svg/SVGTitleElement.java | 2 +- .../javascript/host/svg/SVGTransform.java | 2 +- .../javascript/host/svg/SVGTransformList.java | 2 +- .../javascript/host/svg/SVGUnitTypes.java | 2 +- .../javascript/host/svg/SVGUseElement.java | 2 +- .../javascript/host/svg/SVGViewElement.java | 2 +- .../javascript/host/svg/package-info.java | 2 +- .../htmlunit/javascript/host/webkitURL.java | 2 +- .../worker/DedicatedWorkerGlobalScope.java | 2 +- .../javascript/host/worker/ServiceWorker.java | 2 +- .../host/worker/ServiceWorkerContainer.java | 2 +- .../worker/ServiceWorkerRegistration.java | 2 +- .../javascript/host/worker/SyncManager.java | 2 +- .../javascript/host/worker/Worker.java | 2 +- .../javascript/host/worker/package-info.java | 2 +- .../javascript/host/xml/FormData.java | 2 +- .../javascript/host/xml/XMLDocument.java | 2 +- .../javascript/host/xml/XMLHttpRequest.java | 40 +- .../host/xml/XMLHttpRequestEventTarget.java | 44 +- .../host/xml/XMLHttpRequestUpload.java | 2 +- .../javascript/host/xml/XMLSerializer.java | 2 +- .../javascript/host/xml/XSLTProcessor.java | 2 +- .../javascript/host/xml/package-info.java | 2 +- .../htmlunit/javascript/package-info.java | 2 +- .../regexp/HtmlUnitRegExpProxy.java | 2 +- .../regexp/RegExpJsToJavaConverter.java | 2 +- .../javascript/regexp/package-info.java | 2 +- .../htmlunit/package-info.java | 2 +- .../htmlunit/protocol/AnyHandler.java | 2 +- .../protocol/about/AboutURLConnection.java | 2 +- .../htmlunit/protocol/about/Handler.java | 2 +- .../htmlunit/protocol/about/package-info.java | 2 +- .../protocol/data/DataURLConnection.java | 2 +- .../protocol/data/DataUrlDecoder.java | 2 +- .../htmlunit/protocol/data/Handler.java | 2 +- .../htmlunit/protocol/data/package-info.java | 2 +- .../htmlunit/protocol/javascript/Handler.java | 2 +- .../javascript/JavaScriptURLConnection.java | 2 +- .../protocol/javascript/package-info.java | 2 +- .../htmlunit/protocol/package-info.java | 2 +- .../htmlunit/svg/SvgAltGlyph.java | 2 +- .../htmlunit/svg/SvgAltGlyphDef.java | 2 +- .../htmlunit/svg/SvgAltGlyphItem.java | 2 +- .../htmlunit/svg/SvgAnchor.java | 2 +- .../htmlunit/svg/SvgAnimate.java | 2 +- .../htmlunit/svg/SvgAnimateColor.java | 2 +- .../htmlunit/svg/SvgAnimateMotion.java | 2 +- .../htmlunit/svg/SvgAnimateTransform.java | 2 +- .../htmlunit/svg/SvgCircle.java | 2 +- .../htmlunit/svg/SvgClipPath.java | 2 +- .../htmlunit/svg/SvgColorProfile.java | 2 +- .../htmlunit/svg/SvgCursor.java | 2 +- .../htmlunit/svg/SvgDefs.java | 2 +- .../htmlunit/svg/SvgDesc.java | 2 +- .../htmlunit/svg/SvgElement.java | 2 +- .../htmlunit/svg/SvgElementFactory.java | 2 +- .../htmlunit/svg/SvgEllipse.java | 2 +- .../htmlunit/svg/SvgFeBlend.java | 2 +- .../htmlunit/svg/SvgFeColorMatrix.java | 2 +- .../htmlunit/svg/SvgFeComponentTransfer.java | 2 +- .../htmlunit/svg/SvgFeComposite.java | 2 +- .../htmlunit/svg/SvgFeConvolveMatrix.java | 2 +- .../htmlunit/svg/SvgFeDiffuseLighting.java | 2 +- .../htmlunit/svg/SvgFeDisplacementMap.java | 2 +- .../htmlunit/svg/SvgFeDistantLight.java | 2 +- .../htmlunit/svg/SvgFeFlood.java | 2 +- .../htmlunit/svg/SvgFeFuncA.java | 2 +- .../htmlunit/svg/SvgFeFuncB.java | 2 +- .../htmlunit/svg/SvgFeFuncG.java | 2 +- .../htmlunit/svg/SvgFeFuncR.java | 2 +- .../htmlunit/svg/SvgFeGaussianBlur.java | 2 +- .../htmlunit/svg/SvgFeImage.java | 2 +- .../htmlunit/svg/SvgFeMerge.java | 2 +- .../htmlunit/svg/SvgFeMergeNode.java | 2 +- .../htmlunit/svg/SvgFeMorphology.java | 2 +- .../htmlunit/svg/SvgFeOffset.java | 2 +- .../htmlunit/svg/SvgFePointLight.java | 2 +- .../htmlunit/svg/SvgFeSpecularLighting.java | 2 +- .../htmlunit/svg/SvgFeSpotLight.java | 2 +- .../htmlunit/svg/SvgFeTile.java | 2 +- .../htmlunit/svg/SvgFeTurbulence.java | 2 +- .../htmlunit/svg/SvgFilter.java | 2 +- .../htmlunit/svg/SvgFont.java | 2 +- .../htmlunit/svg/SvgFontFace.java | 2 +- .../htmlunit/svg/SvgFontFaceFormat.java | 2 +- .../htmlunit/svg/SvgFontFaceName.java | 2 +- .../htmlunit/svg/SvgFontFaceSrc.java | 2 +- .../htmlunit/svg/SvgFontFaceURI.java | 2 +- .../htmlunit/svg/SvgForeignObject.java | 2 +- .../htmlunit/svg/SvgGlyph.java | 2 +- .../htmlunit/svg/SvgGlyphRef.java | 2 +- .../htmlunit/svg/SvgGroup.java | 2 +- .../htmlunit/svg/SvgHKern.java | 2 +- .../htmlunit/svg/SvgImage.java | 2 +- .../htmlunit/svg/SvgLine.java | 2 +- .../htmlunit/svg/SvgLinearGradient.java | 2 +- .../htmlunit/svg/SvgMPath.java | 2 +- .../htmlunit/svg/SvgMarker.java | 2 +- .../htmlunit/svg/SvgMask.java | 2 +- .../htmlunit/svg/SvgMetadata.java | 2 +- .../htmlunit/svg/SvgMissingGlyph.java | 2 +- .../htmlunit/svg/SvgPath.java | 2 +- .../htmlunit/svg/SvgPattern.java | 2 +- .../htmlunit/svg/SvgPolygon.java | 2 +- .../htmlunit/svg/SvgPolyline.java | 2 +- .../htmlunit/svg/SvgRadialGradient.java | 2 +- .../htmlunit/svg/SvgRect.java | 2 +- .../htmlunit/svg/SvgScript.java | 22 +- .../gargoylesoftware/htmlunit/svg/SvgSet.java | 2 +- .../htmlunit/svg/SvgStop.java | 2 +- .../htmlunit/svg/SvgStyle.java | 2 +- .../htmlunit/svg/SvgSwitch.java | 2 +- .../htmlunit/svg/SvgSymbol.java | 2 +- .../htmlunit/svg/SvgTRef.java | 2 +- .../htmlunit/svg/SvgTSpan.java | 2 +- .../htmlunit/svg/SvgText.java | 2 +- .../htmlunit/svg/SvgTextPath.java | 2 +- .../htmlunit/svg/SvgTitle.java | 2 +- .../gargoylesoftware/htmlunit/svg/SvgUse.java | 2 +- .../htmlunit/svg/SvgVKern.java | 2 +- .../htmlunit/svg/SvgView.java | 2 +- .../htmlunit/svg/package-info.java | 2 +- .../htmlunit/util/Cookie.java | 27 +- .../htmlunit/util/DebuggingWebConnection.java | 2 +- .../htmlunit/util/EncodingSniffer.java | 2 +- .../util/FalsifyingWebConnection.java | 2 +- .../htmlunit/util/HeaderUtils.java | 2 +- .../htmlunit/util/KeyDataPair.java | 2 +- .../htmlunit/util/MimeType.java | 2 +- .../htmlunit/util/NameValuePair.java | 2 +- .../htmlunit/util/StringUtils.java | 2 +- .../htmlunit/util/TextUtils.java | 2 +- .../htmlunit/util/UrlUtils.java | 102 +- .../htmlunit/util/WebClientUtils.java | 2 +- .../htmlunit/util/WebConnectionWrapper.java | 2 +- .../htmlunit/util/WebResponseWrapper.java | 2 +- .../htmlunit/util/XmlUtils.java | 2 +- .../htmlunit/util/package-info.java | 2 +- .../websocket/JettyWebSocketAdapter.java | 50 +- .../htmlunit/websocket/WebSocketAdapter.java | 4 +- .../websocket/WebSocketCookieStore.java | 2 +- .../htmlunit/websocket/package-info.java | 2 +- .../htmlunit/webstart/WebStartHandler.java | 2 +- .../htmlunit/webstart/package-info.java | 2 +- .../htmlunit/xml/XmlPage.java | 2 +- .../htmlunit/xml/package-info.java | 2 +- .../java/netscape/javascript/JSException.java | 2 +- .../java/netscape/javascript/JSObject.java | 2 +- .../netscape/javascript/package-info.java | 2 +- src/main/java/netscape/package-info.java | 2 +- .../htmlunit/AbstractPageTest.java | 2 +- .../htmlunit/BinaryPageTest.java | 2 +- .../htmlunit/BrowserParameterizedRunner.java | 2 +- .../htmlunit/BrowserRunner.java | 20 +- .../htmlunit/BrowserRunnerTest.java | 2 +- .../htmlunit/BrowserVersion2Test.java | 6 +- .../htmlunit/BrowserVersionFeaturesTest.java | 2 +- .../htmlunit/BrowserVersionTest.java | 8 +- .../gargoylesoftware/htmlunit/CacheTest.java | 2 +- .../htmlunit/CodeChecker.java | 2 +- .../htmlunit/CodeStyleTest.java | 2 +- .../htmlunit/CookieManager2Test.java | 5 +- .../htmlunit/CookieManager3Test.java | 2 +- .../htmlunit/CookieManager4Test.java | 376 +- .../htmlunit/CookieManager5Test.java | 233 + .../htmlunit/CookieManagerTest.java | 32 +- .../DefaultCredentialsProvider2Test.java | 8 +- .../DefaultCredentialsProvider3Test.java | 2 +- .../DefaultCredentialsProviderTest.java | 2 +- .../htmlunit/DefaultPageCreator2Test.java | 4 +- .../htmlunit/DefaultPageCreatorTest.java | 115 +- .../htmlunit/DocumentationTests.java | 2 +- .../htmlunit/ErrorOutputChecker.java | 2 +- .../htmlunit/ErrorOutputCheckerTest.java | 2 +- .../htmlunit/ExternalTest.java | 50 +- .../FailingHttpStatusCodeExceptionTest.java | 2 +- .../htmlunit/History2Test.java | 2 +- .../htmlunit/HistoryTest.java | 2 +- .../htmlunit/HtmlUnitCookieStoreTest.java | 2 +- .../htmlunit/HttpWebConnection2Test.java | 2 +- .../htmlunit/HttpWebConnection3Test.java | 440 +- .../HttpWebConnectionInsecureSSLTest.java | 39 +- ...nInsecureSSLWithClientCertificateTest.java | 52 +- .../htmlunit/HttpWebConnectionProxyTest.java | 4 +- .../htmlunit/HttpWebConnectionTest.java | 2 +- .../HttpWebConnectionTruststoreTest.java | 33 +- .../htmlunit/ImmediateRefreshHandlerTest.java | 2 +- .../htmlunit/IncorrectnessListenerTest.java | 2 +- .../htmlunit/InsecureHttpsServer.java | 6 +- .../htmlunit/LocalTestServer.java | 2 +- .../gargoylesoftware/htmlunit/MiniServer.java | 2 +- .../htmlunit/MockWebConnectionTest.java | 2 +- .../htmlunit/NiceRefreshHandlerTest.java | 2 +- ...celyResynchronizingAjaxControllerTest.java | 2 +- .../htmlunit/NoHttpResponseTest.java | 2 +- .../htmlunit/NotYetImplementedTest.java | 7 +- .../ObjectInstantiationExceptionTest.java | 2 +- .../htmlunit/PageReloadTest.java | 22 +- .../htmlunit/PrimitiveWebServer.java | 2 +- .../htmlunit/ProxyAutoConfigTest.java | 2 +- .../htmlunit/ScriptExceptionTest.java | 2 +- .../htmlunit/ScriptPreProcessorTest.java | 2 +- .../htmlunit/SgmlPage2Test.java | 2 +- .../htmlunit/SgmlPageTest.java | 2 +- .../htmlunit/SimpleWebTestCase.java | 4 +- .../htmlunit/SocksProxyTest.java | 6 +- .../htmlunit/StringWebResponseTest.java | 2 +- .../htmlunit/TestCaseTest.java | 10 +- .../htmlunit/TextPageTest.java | 2 +- .../htmlunit/TopLevelWindowTest.java | 2 +- .../htmlunit/WaitingRefreshHandlerTest.java | 2 +- .../htmlunit/WebAssertTest.java | 2 +- .../htmlunit/WebClient2Test.java | 6 +- .../htmlunit/WebClient3Test.java | 2 +- .../htmlunit/WebClient4Test.java | 10 +- .../htmlunit/WebClient5Test.java | 2 +- .../htmlunit/WebClient6Test.java | 57 +- .../htmlunit/WebClient7Test.java | 2 +- .../htmlunit/WebClient8Test.java | 2 +- .../htmlunit/WebClientTest.java | 80 +- .../WebClientWaitForBackgroundJobsTest.java | 2 +- .../htmlunit/WebDriverTestCase.java | 180 +- .../htmlunit/WebRequestTest.java | 2 +- .../htmlunit/WebResponse2Test.java | 2 +- .../htmlunit/WebResponseData2Test.java | 2 +- .../htmlunit/WebResponseDataTest.java | 2 +- .../htmlunit/WebResponseTest.java | 2 +- .../htmlunit/WebServerTestCase.java | 4 +- .../htmlunit/WebTestCase.java | 93 +- .../htmlunit/WebWindowListenerTest.java | 2 +- .../msxml/MSXMLActiveXObjectFactoryTest.java | 2 +- .../javascript/msxml/MSXMLTestHelper.java | 6 +- .../javascript/msxml/XMLDOMAttributeTest.java | 110 +- .../msxml/XMLDOMCDATASectionTest.java | 401 +- .../javascript/msxml/XMLDOMCommentTest.java | 369 +- .../javascript/msxml/XMLDOMDocument2Test.java | 226 +- .../javascript/msxml/XMLDOMDocument3Test.java | 58 +- .../msxml/XMLDOMDocumentFragmentTest.java | 73 +- .../javascript/msxml/XMLDOMDocumentTest.java | 842 +- .../msxml/XMLDOMDocumentTypeTest.java | 37 +- .../javascript/msxml/XMLDOMElementTest.java | 339 +- .../msxml/XMLDOMImplementationTest.java | 45 +- .../msxml/XMLDOMNamedNodeMapTest.java | 53 +- .../javascript/msxml/XMLDOMNodeListTest.java | 37 +- .../msxml/XMLDOMParseErrorTest.java | 96 +- .../XMLDOMProcessingInstructionTest.java | 262 +- .../javascript/msxml/XMLDOMTextTest.java | 387 +- .../javascript/msxml/XMLHTTPRequestTest.java | 508 +- .../javascript/msxml/XMLSerializerTest.java | 66 +- .../javascript/msxml/XSLProcessor2Test.java | 2 +- .../javascript/msxml/XSLProcessorTest.java | 32 +- .../htmlunit/annotations/StandardsMode.java | 2 +- .../annotations/ToRunWithRealBrowsers.java | 2 +- .../htmlunit/archunit/ArchitectureTest.java | 46 +- .../htmlunit/attachment/AttachmentTest.java | 4 +- .../htmlunit/doc/FaqTest.java | 53 +- .../general/ElementChildNodesTest.java | 295 +- .../general/ElementClosesItselfTest.java | 4 +- .../htmlunit/general/ElementCreationTest.java | 9 +- .../ElementDefaultStyleDisplayTest.java | 4 +- .../general/ElementOuterHtmlTest.java | 2 +- .../general/ElementOwnPropertiesTest.java | 7479 +++--- .../general/ElementPropertiesTest.java | 516 +- .../htmlunit/general/HostClassNameTest.java | 15 +- .../htmlunit/general/HostConstantsTest.java | 10 +- .../htmlunit/general/HostExtractor.java | 4 +- .../htmlunit/general/HostTestsTest.java | 2 +- .../htmlunit/general/HostTypeOfTest.java | 22 +- .../huge/ElementClosesElementTest.java | 1760 +- .../htmlunit/general/huge/HostParentOf.java | 27 +- .../general/huge/HostParentOfATest.java | 19 +- .../general/huge/HostParentOfBTest.java | 2 +- .../general/huge/HostParentOfCTest.java | 6 +- .../general/huge/HostParentOfDTest.java | 48 +- .../general/huge/HostParentOfFTest.java | 2 +- .../general/huge/HostParentOfHTest.java | 65 +- .../general/huge/HostParentOfITest.java | 15 +- .../general/huge/HostParentOfNTest.java | 35 +- .../general/huge/HostParentOfPTest.java | 26 +- .../general/huge/HostParentOfS2Test.java | 2743 ++ .../general/huge/HostParentOfSTest.java | 26 +- .../general/huge/HostParentOfTTest.java | 8 +- .../general/huge/HostParentOfWTest.java | 23 +- .../htmlunit/html/AttributesTest.java | 4 +- .../htmlunit/html/BaseFrameElement2Test.java | 2 +- .../htmlunit/html/BaseFrameElementTest.java | 2 +- .../htmlunit/html/ClickableElement2Test.java | 2 +- .../htmlunit/html/ClickableElementTest.java | 2 +- .../html/DefaultElementFactoryTest.java | 2 +- .../htmlunit/html/DisabledElementTest.java | 2 +- .../htmlunit/html/DomAttrTest.java | 2 +- .../htmlunit/html/DomCommentTest.java | 2 +- .../html/DomDocumentFragmentTest.java | 2 +- .../htmlunit/html/DomElement2Test.java | 2 +- .../htmlunit/html/DomElementTest.java | 2 +- .../htmlunit/html/DomNamespaceNodeTest.java | 2 +- .../htmlunit/html/DomNode2Test.java | 2 +- .../htmlunit/html/DomNodeIterator2Test.java | 2 +- .../htmlunit/html/DomNodeIteratorTest.java | 2 +- .../htmlunit/html/DomNodeListTest.java | 2 +- .../htmlunit/html/DomNodeTest.java | 10 +- .../htmlunit/html/DomTextTest.java | 2 +- .../htmlunit/html/DomTreeWalkerTest.java | 2 +- .../htmlunit/html/FocusableElement2Test.java | 706 +- .../htmlunit/html/FocusableElementTest.java | 2 +- .../htmlunit/html/HtmlAnchor2Test.java | 478 +- .../htmlunit/html/HtmlAnchorTest.java | 76 +- .../htmlunit/html/HtmlApplet2Test.java | 6 +- .../htmlunit/html/HtmlAppletTest.java | 2 +- .../htmlunit/html/HtmlArea2Test.java | 2 +- .../htmlunit/html/HtmlAreaTest.java | 2 +- .../htmlunit/html/HtmlAttrTest.java | 2 +- .../html/HtmlBackgroundSoundTest.java | 2 +- .../htmlunit/html/HtmlBaseFontTest.java | 2 +- .../htmlunit/html/HtmlBaseTest.java | 2 +- .../htmlunit/html/HtmlBodyTest.java | 2 +- .../htmlunit/html/HtmlBreakTest.java | 2 +- .../htmlunit/html/HtmlButton2Test.java | 2 +- .../htmlunit/html/HtmlButtonInput2Test.java | 2 +- .../htmlunit/html/HtmlButtonInputTest.java | 2 +- .../htmlunit/html/HtmlButtonTest.java | 2 +- .../htmlunit/html/HtmlCanvasTest.java | 2 +- .../htmlunit/html/HtmlCaptionTest.java | 2 +- .../htmlunit/html/HtmlCheckBoxInput2Test.java | 212 +- .../htmlunit/html/HtmlCheckBoxInputTest.java | 2 +- .../htmlunit/html/HtmlColorInput2Test.java | 2 +- .../htmlunit/html/HtmlColorInputTest.java | 2 +- .../htmlunit/html/HtmlDateInput2Test.java | 2 +- .../htmlunit/html/HtmlDateInputTest.java | 2 +- .../htmlunit/html/HtmlDateTimeInput2Test.java | 2 +- .../html/HtmlDateTimeLocalInputTest.java | 2 +- .../html/HtmlDefinitionDescriptionTest.java | 2 +- .../htmlunit/html/HtmlDefinitionListTest.java | 2 +- .../htmlunit/html/HtmlDirectoryTest.java | 2 +- .../htmlunit/html/HtmlDivision2Test.java | 2 +- .../htmlunit/html/HtmlDivisionTest.java | 2 +- .../htmlunit/html/HtmlElement2Test.java | 2 +- .../htmlunit/html/HtmlElementTest.java | 2 +- .../htmlunit/html/HtmlEmailInput2Test.java | 2 +- .../htmlunit/html/HtmlEmailInputTest.java | 2 +- .../htmlunit/html/HtmlEmbedTest.java | 2 +- .../htmlunit/html/HtmlFieldSetTest.java | 2 +- .../htmlunit/html/HtmlFileInput2Test.java | 100 +- .../htmlunit/html/HtmlFileInputTest.java | 50 +- .../htmlunit/html/HtmlFontTest.java | 2 +- .../htmlunit/html/HtmlForm2Test.java | 2 +- .../htmlunit/html/HtmlFormTest.java | 14 +- .../htmlunit/html/HtmlFrame2Test.java | 2 +- .../htmlunit/html/HtmlFrameSetTest.java | 2 +- .../htmlunit/html/HtmlFrameTest.java | 2 +- .../htmlunit/html/HtmlHeadTest.java | 2 +- .../htmlunit/html/HtmlHeading2Test.java | 6 +- .../htmlunit/html/HtmlHeadingTest.java | 2 +- .../htmlunit/html/HtmlHiddenInput2Test.java | 2 +- .../htmlunit/html/HtmlHiddenInputTest.java | 2 +- .../htmlunit/html/HtmlHorizontalRuleTest.java | 2 +- .../htmlunit/html/HtmlHtmlTest.java | 2 +- .../htmlunit/html/HtmlImage2Test.java | 2 +- .../htmlunit/html/HtmlImageDownloadTest.java | 2 +- .../htmlunit/html/HtmlImageInput2Test.java | 2 +- .../htmlunit/html/HtmlImageInputTest.java | 243 +- .../htmlunit/html/HtmlImageTest.java | 2 +- .../htmlunit/html/HtmlInlineFrame2Test.java | 40 +- .../htmlunit/html/HtmlInlineFrameTest.java | 2 +- .../htmlunit/html/HtmlInput2Test.java | 2 +- .../htmlunit/html/HtmlInputTest.java | 2 +- .../htmlunit/html/HtmlInsertedTextTest.java | 2 +- .../htmlunit/html/HtmlIsIndex2Test.java | 2 +- .../htmlunit/html/HtmlIsIndexTest.java | 2 +- .../htmlunit/html/HtmlItalicTest.java | 2 +- .../htmlunit/html/HtmlLabel2Test.java | 2 +- .../htmlunit/html/HtmlLabelTest.java | 20 +- .../htmlunit/html/HtmlLegendTest.java | 2 +- .../htmlunit/html/HtmlLink2Test.java | 51 +- .../htmlunit/html/HtmlLinkTest.java | 22 +- .../htmlunit/html/HtmlListItemTest.java | 2 +- .../htmlunit/html/HtmlMapTest.java | 2 +- .../htmlunit/html/HtmlMenuTest.java | 2 +- .../htmlunit/html/HtmlMetaTest.java | 2 +- .../htmlunit/html/HtmlModificationTest.java | 2 +- .../htmlunit/html/HtmlMonthInput2Test.java | 2 +- .../htmlunit/html/HtmlMonthInputTest.java | 2 +- .../htmlunit/html/HtmlNoFrames2Test.java | 2 +- .../htmlunit/html/HtmlNoFramesTest.java | 2 +- .../htmlunit/html/HtmlNoScript2Test.java | 2 +- .../htmlunit/html/HtmlNoScriptTest.java | 2 +- .../htmlunit/html/HtmlNumberInput2Test.java | 2 +- .../htmlunit/html/HtmlNumberInputTest.java | 1051 +- .../htmlunit/html/HtmlObject2Test.java | 2 +- .../htmlunit/html/HtmlObjectTest.java | 2 +- .../htmlunit/html/HtmlOption2Test.java | 27 +- .../htmlunit/html/HtmlOptionGroup2Test.java | 2 +- .../htmlunit/html/HtmlOptionGroupTest.java | 2 +- .../htmlunit/html/HtmlOptionTest.java | 2 +- .../htmlunit/html/HtmlOrderedList2Test.java | 2 +- .../htmlunit/html/HtmlOrderedListTest.java | 2 +- .../htmlunit/html/HtmlPage2Test.java | 107 +- .../htmlunit/html/HtmlPage3Test.java | 107 +- .../htmlunit/html/HtmlPage4Test.java | 2 +- .../htmlunit/html/HtmlPageTest.java | 9 +- .../htmlunit/html/HtmlParagraphTest.java | 2 +- .../htmlunit/html/HtmlParameterTest.java | 2 +- .../htmlunit/html/HtmlPasswordInput2Test.java | 2 +- .../htmlunit/html/HtmlPasswordInputTest.java | 2 +- .../html/HtmlPreformattedText2Test.java | 2 +- .../html/HtmlPreformattedTextTest.java | 2 +- .../htmlunit/html/HtmlProgressTest.java | 2 +- .../htmlunit/html/HtmlQuoteTest.java | 2 +- .../html/HtmlRadioButtonInput2Test.java | 243 +- .../html/HtmlRadioButtonInputTest.java | 2 +- .../htmlunit/html/HtmlRangeInput2Test.java | 2 +- .../htmlunit/html/HtmlRangeInputTest.java | 2 +- .../htmlunit/html/HtmlResetInput2Test.java | 2 +- .../htmlunit/html/HtmlResetInputTest.java | 2 +- .../htmlunit/html/HtmlRpTest.java | 2 +- .../htmlunit/html/HtmlRtTest.java | 2 +- .../htmlunit/html/HtmlScript2Test.java | 381 +- .../htmlunit/html/HtmlScript3Test.java | 24 +- .../htmlunit/html/HtmlScriptTest.java | 31 +- .../htmlunit/html/HtmlSearchInput2Test.java | 2 +- .../htmlunit/html/HtmlSearchInputTest.java | 2 +- .../htmlunit/html/HtmlSelect2Test.java | 2 +- .../htmlunit/html/HtmlSelectTest.java | 2 +- .../htmlunit/html/HtmlSerializerTest.java | 3 +- .../htmlunit/html/HtmlSlotTest.java | 2 +- .../htmlunit/html/HtmlSpan2Test.java | 2 +- .../htmlunit/html/HtmlSpanTest.java | 2 +- .../htmlunit/html/HtmlStyle2Test.java | 2 +- .../htmlunit/html/HtmlStyleTest.java | 2 +- .../htmlunit/html/HtmlSubmitInput2Test.java | 2 +- .../htmlunit/html/HtmlSubmitInputTest.java | 2 +- .../htmlunit/html/HtmlSvgTest.java | 2 +- .../htmlunit/html/HtmlTable2Test.java | 2 +- .../htmlunit/html/HtmlTableCellTest.java | 2 +- .../htmlunit/html/HtmlTableColumnTest.java | 2 +- .../htmlunit/html/HtmlTableRowTest.java | 2 +- .../htmlunit/html/HtmlTableSection2Test.java | 2 +- .../htmlunit/html/HtmlTableSectionTest.java | 2 +- .../htmlunit/html/HtmlTableTest.java | 2 +- .../htmlunit/html/HtmlTelInput2Test.java | 2 +- .../htmlunit/html/HtmlTelInputTest.java | 2 +- .../htmlunit/html/HtmlTemplateTest.java | 2 +- .../htmlunit/html/HtmlTextArea2Test.java | 2 +- .../htmlunit/html/HtmlTextAreaTest.java | 2 +- .../htmlunit/html/HtmlTextInput2Test.java | 2 +- .../htmlunit/html/HtmlTextInputTest.java | 2 +- .../htmlunit/html/HtmlTimeInput2Test.java | 2 +- .../htmlunit/html/HtmlTimeInputTest.java | 2 +- .../htmlunit/html/HtmlTitle2Test.java | 2 +- .../htmlunit/html/HtmlTitleTest.java | 2 +- .../htmlunit/html/HtmlUnknownElementTest.java | 2 +- .../htmlunit/html/HtmlUnorderedList2Test.java | 2 +- .../htmlunit/html/HtmlUnorderedListTest.java | 2 +- .../htmlunit/html/HtmlUrlInput2Test.java | 2 +- .../htmlunit/html/HtmlUrlInputTest.java | 2 +- .../htmlunit/html/HtmlWeekInput2Test.java | 2 +- .../htmlunit/html/HtmlWeekInputTest.java | 2 +- .../htmlunit/html/HtmlWordBreakTest.java | 2 +- ...itionalCommentExpressionEvaluatorTest.java | 2 +- .../html/IEConditionalCommentsTest.java | 2 +- .../htmlunit/html/LoggingRefreshHandler.java | 2 +- .../htmlunit/html/MalformedHtml2Test.java | 2 +- .../htmlunit/html/MalformedHtmlTest.java | 186 +- .../html/NamedAttrNodeMapImplTest.java | 2 +- .../htmlunit/html/XHtmlPage2Test.java | 2 +- .../htmlunit/html/XHtmlPageTest.java | 2 +- .../htmlunit/html/XmlSerializerTest.java | 2 +- .../htmlunit/html/impl/SimpleRangeTest.java | 2 +- .../htmlunit/html/parser/HTMLParser2Test.java | 265 +- .../htmlunit/html/parser/HTMLParser3Test.java | 4 +- .../htmlunit/html/parser/HTMLParser4Test.java | 194 +- .../html/parser/HTMLParserListenerTest.java | 2 +- .../htmlunit/html/parser/HTMLParserTest.java | 2 +- .../HtmlSerializerInnerOuterText2Test.java | 1910 ++ .../HtmlSerializerNormalizedText2Test.java | 1905 ++ .../HtmlSerializerNormalizedTextTest.java | 302 + .../HtmlSerializerVisibleText2Test.java | 269 +- .../HtmlSerializerVisibleTextTest.java | 8 +- .../html/xpath/HtmlUnitXPath2Test.java | 2 +- .../html/xpath/HtmlUnitXPathTest.java | 2 +- .../htmlunit/javascript/ArgumentsTest.java | 2 +- .../javascript/AttributeCaseTest.java | 2 +- .../javascript/DebugFrameImplTest.java | 2 +- .../javascript/FunctionsWrapperTest.java | 2 +- .../javascript/GlobalFunctionsTest.java | 64 +- .../HtmlUnitContextFactoryTest.java | 2 +- .../IEConditionalCompilationTest.java | 2 +- .../javascript/IEWeirdSyntaxTest.java | 2 +- .../htmlunit/javascript/IteratorTest.java | 2 +- .../javascript/JavaScriptEngine2Test.java | 24 +- .../javascript/JavaScriptEngineTest.java | 7 +- .../JavascriptErrorListener2Test.java | 2 +- .../JavascriptErrorListenerTest.java | 2 +- .../javascript/MockActiveXObject.java | 2 +- .../htmlunit/javascript/NativeArrayTest.java | 707 +- .../htmlunit/javascript/NativeDateTest.java | 115 +- .../htmlunit/javascript/NativeErrorTest.java | 112 +- .../javascript/NativeFunctionTest.java | 121 +- .../htmlunit/javascript/NativeGlobalTest.java | 23 +- .../htmlunit/javascript/NativeJSONTest.java | 9 +- .../htmlunit/javascript/NativeNumberTest.java | 162 +- .../htmlunit/javascript/NativeObjectTest.java | 140 +- .../htmlunit/javascript/NativeRegExpTest.java | 8 +- .../htmlunit/javascript/NativeStringTest.java | 148 +- .../javascript/PostponedActionTest.java | 2 +- .../htmlunit/javascript/RhinoTest.java | 2 +- .../javascript/ScriptRuntimeTest.java | 16 +- .../javascript/ScriptableObjectTest.java | 2 +- .../javascript/SimpleScriptable2Test.java | 2 +- .../javascript/SimpleScriptableTest.java | 2 +- .../htmlunit/javascript/ThreadTest.java | 2 +- .../JavaScriptJobManagerMinimalTest.java | 2 +- .../background/JavaScriptJobManagerTest.java | 2 +- .../javascript/background/MemoryLeakTest.java | 2 +- .../configuration/ClassConfigurationTest.java | 2 +- .../JavaScriptConfigurationTest.java | 2 +- .../javascript/host/ActiveXObject2Test.java | 4 +- .../javascript/host/ActiveXObjectTest.java | 2 +- .../javascript/host/ApplicationCacheTest.java | 2 +- .../javascript/host/BoxObjectTest.java | 2 +- .../javascript/host/ClientRectListTest.java | 2 +- .../javascript/host/ClientRectTest.java | 2 +- .../javascript/host/Console2Test.java | 2 +- .../htmlunit/javascript/host/ConsoleTest.java | 2 +- .../htmlunit/javascript/host/ElementTest.java | 343 +- .../javascript/host/ExternalTest.java | 2 +- .../javascript/host/FontFaceSetTest.java | 2 +- .../javascript/host/FontFaceTest.java | 2 +- .../javascript/host/History2Test.java | 24 +- .../htmlunit/javascript/host/HistoryTest.java | 2 +- .../javascript/host/Location2Test.java | 153 +- .../javascript/host/LocationTest.java | 2 +- .../htmlunit/javascript/host/MapTest.java | 46 +- .../javascript/host/MessageChannelTest.java | 2 +- .../javascript/host/MimeTypeTest.java | 2 +- .../javascript/host/NamedNodeMapTest.java | 2 +- .../javascript/host/NamespaceTest.java | 2 +- .../javascript/host/Navigator2Test.java | 9 +- .../javascript/host/NavigatorTest.java | 146 +- .../javascript/host/NetscapeTest.java | 26 +- .../javascript/host/NotificationTest.java | 2 +- .../htmlunit/javascript/host/Popup2Test.java | 2 +- .../htmlunit/javascript/host/PopupTest.java | 2 +- .../htmlunit/javascript/host/PromiseTest.java | 26 +- .../htmlunit/javascript/host/ReflectTest.java | 2 +- .../htmlunit/javascript/host/ScreenTest.java | 2 +- .../htmlunit/javascript/host/SetTest.java | 22 +- .../htmlunit/javascript/host/StorageTest.java | 2 +- .../htmlunit/javascript/host/SymbolTest.java | 2 +- .../javascript/host/TextDecoderTest.java | 2 +- .../javascript/host/TextEncoderTest.java | 2 +- .../javascript/host/URLSearchParamsTest.java | 55 +- .../htmlunit/javascript/host/URLTest.java | 630 +- .../htmlunit/javascript/host/WeakMapTest.java | 2 +- .../htmlunit/javascript/host/WeakSetTest.java | 2 +- .../javascript/host/WebSocketTest.java | 126 +- .../htmlunit/javascript/host/Window2Test.java | 739 +- .../htmlunit/javascript/host/Window3Test.java | 565 +- .../host/WindowConcurrency2Test.java | 2 +- .../host/WindowConcurrencyTest.java | 2 +- .../htmlunit/javascript/host/WindowTest.java | 2 +- .../host/arrays/ArrayBufferTest.java | 2 +- .../host/arrays/ArrayBufferViewTest.java | 2 +- .../javascript/host/arrays/DataViewTest.java | 2 +- .../host/arrays/Float32ArrayTest.java | 6 +- .../host/arrays/Float64ArrayTest.java | 6 +- .../host/arrays/Int16ArrayTest.java | 6 +- .../host/arrays/Int32ArrayTest.java | 6 +- .../javascript/host/arrays/Int8ArrayTest.java | 6 +- .../host/arrays/SharedArrayBufferTest.java | 2 +- .../host/arrays/Uint16ArrayTest.java | 6 +- .../host/arrays/Uint32ArrayTest.java | 6 +- .../host/arrays/Uint8ArrayTest.java | 6 +- .../host/arrays/Uint8ClampedArrayTest.java | 6 +- .../host/canvas/CanvasGradientTest.java | 2 +- .../canvas/CanvasRenderingContext2D2Test.java | 1550 -- .../canvas/CanvasRenderingContext2DTest.java | 2554 +- .../javascript/host/canvas/ImageDataTest.java | 157 +- .../host/canvas/IntersectionObserverTest.java | 2 +- .../javascript/host/crypto/CryptoTest.java | 35 +- .../host/crypto/SubtleCryptoTest.java | 73 +- .../host/css/CSSCharsetRuleTest.java | 2 +- .../host/css/CSSFontFaceRuleTest.java | 8 +- .../host/css/CSSImportRuleTest.java | 5 +- .../host/css/CSSKeyframesRuleTest.java | 2 +- .../javascript/host/css/CSSMediaRuleTest.java | 2 +- .../javascript/host/css/CSSRuleListTest.java | 2 +- .../javascript/host/css/CSSSelector2Test.java | 2 +- .../javascript/host/css/CSSSelectorTest.java | 779 +- .../host/css/CSSStyleDeclaration2Test.java | 30 +- .../host/css/CSSStyleDeclaration3Test.java | 29 +- .../host/css/CSSStyleDeclaration4Test.java | 2 +- .../host/css/CSSStyleDeclarationTest.java | 1024 +- .../javascript/host/css/CSSStyleRuleTest.java | 2 +- .../host/css/CSSStyleSheet2Test.java | 2 +- .../host/css/CSSStyleSheet3Test.java | 27 +- .../host/css/CSSStyleSheetTest.java | 166 +- .../htmlunit/javascript/host/css/CSSTest.java | 12 +- .../css/ComputedCSSStyleDeclarationTest.java | 710 +- .../javascript/host/css/ComputedFontTest.java | 94 +- .../host/css/MediaQueryListTest.java | 2 +- .../css/StyleAttributesIterable2Test.java | 2 +- .../host/css/StyleAttributesIterableTest.java | 12 +- .../host/css/StyleAttributesTest.java | 2 +- .../javascript/host/css/StyleMediaTest.java | 2 +- .../host/css/StyleSheetListTest.java | 2 +- .../css/property/ElementClientWidthTest.java | 503 +- .../css/property/ElementOffsetHeightTest.java | 2 +- .../css/property/ElementOffsetWidthTest.java | 4 +- .../javascript/host/dom/AttrTest.java | 4 +- .../javascript/host/dom/CDATASectionTest.java | 2 +- .../host/dom/CharacterDataTest.java | 2 +- .../javascript/host/dom/CommentTest.java | 2 +- .../javascript/host/dom/DOMExceptionTest.java | 3 +- .../host/dom/DOMImplementationTest.java | 166 +- .../javascript/host/dom/DOMParserTest.java | 4 +- .../javascript/host/dom/DOMStringMapTest.java | 2 +- .../javascript/host/dom/DOMTokenListTest.java | 258 +- .../javascript/host/dom/Document2Test.java | 10 +- .../host/dom/DocumentFragmentTest.java | 2 +- .../javascript/host/dom/DocumentTest.java | 1144 +- .../javascript/host/dom/DocumentTypeTest.java | 10 +- .../javascript/host/dom/EventNodeTest.java | 2 +- .../host/dom/MutationObserverTest.java | 2 +- .../javascript/host/dom/Node2Test.java | 2 +- .../javascript/host/dom/NodeFilterTest.java | 2 +- .../javascript/host/dom/NodeIteratorTest.java | 4 +- .../javascript/host/dom/NodeListTest.java | 24 +- .../javascript/host/dom/NodeTest.java | 451 +- .../javascript/host/dom/RangeTest.java | 41 +- .../javascript/host/dom/Selection2Test.java | 2 +- .../javascript/host/dom/SelectionTest.java | 196 +- .../javascript/host/dom/TextRangeTest.java | 2 +- .../javascript/host/dom/TextTest.java | 2 +- .../javascript/host/dom/TreeWalkerTest.java | 2 +- .../host/dom/XPathEvaluatorTest.java | 2 +- .../javascript/host/dom/XPathResultTest.java | 2 +- .../host/event/AudioProcessingEventTest.java | 39 +- .../event/BeforeInstallPromptEventTest.java | 66 +- .../host/event/BeforeUnloadEvent2Test.java | 2 +- .../host/event/BeforeUnloadEventTest.java | 2 +- .../javascript/host/event/BlobEventTest.java | 82 +- .../javascript/host/event/CloseEventTest.java | 50 +- .../host/event/CompositionEventTest.java | 84 +- .../host/event/CustomEventTest.java | 83 +- .../host/event/DeviceMotionEventTest.java | 88 +- .../event/DeviceOrientationEventTest.java | 92 +- .../javascript/host/event/DragEventTest.java | 80 +- .../javascript/host/event/ErrorEventTest.java | 80 +- .../javascript/host/event/Event2Test.java | 140 +- .../javascript/host/event/Event3Test.java | 2 +- .../javascript/host/event/Event4Test.java | 2 +- .../host/event/EventHandlerTest.java | 56 +- .../event/EventListenersContainerTest.java | 29 +- .../host/event/EventTargetTest.java | 2 +- .../javascript/host/event/EventTest.java | 602 +- .../javascript/host/event/FocusEventTest.java | 80 +- .../host/event/GamepadEventTest.java | 80 +- .../host/event/HashChangeEventTest.java | 85 +- .../javascript/host/event/InputEventTest.java | 345 + .../host/event/KeyboardEvent2Test.java | 2 +- .../host/event/KeyboardEventTest.java | 542 +- .../host/event/MessageEventTest.java | 37 +- .../javascript/host/event/MouseEventTest.java | 176 +- .../host/event/MutationEventTest.java | 93 +- .../OfflineAudioCompletionEventTest.java | 80 +- .../host/event/PageTransitionEventTest.java | 80 +- .../host/event/PointerEventTest.java | 84 +- .../host/event/PopStateEventTest.java | 79 +- .../host/event/ProgressEventTest.java | 41 +- .../host/event/StorageEventTest.java | 80 +- .../javascript/host/event/TimeEventTest.java | 80 +- .../javascript/host/event/TouchEventTest.java | 80 +- .../javascript/host/event/TrackEventTest.java | 80 +- .../host/event/TransitionEventTest.java | 80 +- .../javascript/host/event/UIEventTest.java | 87 +- .../host/event/WebGLContextEventTest.java | 15 +- .../javascript/host/event/WheelEventTest.java | 80 +- .../javascript/host/file/BlobTest.java | 2 +- .../javascript/host/file/FileListTest.java | 2 +- .../javascript/host/file/FileReaderTest.java | 25 +- .../javascript/host/file/FileTest.java | 25 +- .../javascript/host/geo/GeolocationTest.java | 16 +- .../javascript/host/html/EnumeratorTest.java | 2 +- .../javascript/host/html/FormChildTest.java | 2 +- .../host/html/HTMLAllCollectionTest.java | 2 +- .../host/html/HTMLAnchorElement2Test.java | 724 +- .../host/html/HTMLAnchorElementTest.java | 2 +- .../host/html/HTMLAppletElement2Test.java | 2 +- .../host/html/HTMLAppletElementTest.java | 4 +- .../host/html/HTMLAreaElementTest.java | 5 +- .../host/html/HTMLAudioElementTest.java | 2 +- .../host/html/HTMLBRElementTest.java | 6 +- .../host/html/HTMLBaseElementTest.java | 4 +- .../host/html/HTMLBaseFontElementTest.java | 2 +- .../host/html/HTMLBodyElementTest.java | 2 +- .../host/html/HTMLButtonElementTest.java | 2 +- .../host/html/HTMLCanvasElementTest.java | 245 +- .../host/html/HTMLCollection2Test.java | 2 +- .../host/html/HTMLCollectionTest.java | 8 +- .../host/html/HTMLDDElementTest.java | 2 +- .../host/html/HTMLDListElementTest.java | 6 +- .../host/html/HTMLDTElementTest.java | 2 +- .../host/html/HTMLDataElementTest.java | 2 +- .../host/html/HTMLDetailsElementTest.java | 135 + .../host/html/HTMLDirectoryElementTest.java | 6 +- .../host/html/HTMLDivElementTest.java | 2 +- .../host/html/HTMLDocument2Test.java | 17 +- .../host/html/HTMLDocument3Test.java | 2 +- .../host/html/HTMLDocumentTest.java | 538 +- .../host/html/HTMLDocumentWrite2Test.java | 2 +- .../host/html/HTMLDocumentWriteTest.java | 2 +- .../host/html/HTMLElement2Test.java | 529 +- .../host/html/HTMLElement3Test.java | 2 +- .../javascript/host/html/HTMLElementTest.java | 1867 +- .../host/html/HTMLEmbedElementTest.java | 12 +- .../host/html/HTMLFieldSetElementTest.java | 11 +- .../host/html/HTMLFormElement2Test.java | 2 +- .../host/html/HTMLFormElementTest.java | 353 +- .../host/html/HTMLFrameElement2Test.java | 22 +- .../host/html/HTMLFrameElementTest.java | 2 +- .../host/html/HTMLFrameSetElementTest.java | 2 +- .../host/html/HTMLHRElementTest.java | 2 +- .../host/html/HTMLHeadingElementTest.java | 2 +- .../host/html/HTMLHtmlElementTest.java | 30 +- .../host/html/HTMLIFrameElement2Test.java | 246 +- .../host/html/HTMLIFrameElement3Test.java | 4 +- .../host/html/HTMLIFrameElementTest.java | 2 +- .../host/html/HTMLImageElement2Test.java | 2 +- .../host/html/HTMLImageElementTest.java | 30 +- .../host/html/HTMLInputElement2Test.java | 2 +- .../host/html/HTMLInputElementTest.java | 754 +- .../host/html/HTMLLabelElementTest.java | 2 +- .../host/html/HTMLLegendElementTest.java | 2 +- .../host/html/HTMLLinkElementTest.java | 3 +- .../host/html/HTMLMapElementTest.java | 2 +- .../host/html/HTMLMarqueeElementTest.java | 2 +- .../host/html/HTMLMediaElementTest.java | 2 +- .../host/html/HTMLMenuElementTest.java | 14 +- .../host/html/HTMLMetaElementTest.java | 2 +- .../host/html/HTMLMeterElementTest.java | 2 +- .../host/html/HTMLOListElementTest.java | 4 +- .../host/html/HTMLObjectElement2Test.java | 2 +- .../host/html/HTMLObjectElementTest.java | 2 +- .../host/html/HTMLOptGroupElementTest.java | 2 +- .../host/html/HTMLOptionElement2Test.java | 463 +- .../host/html/HTMLOptionElementTest.java | 2 +- .../host/html/HTMLOptionsCollectionTest.java | 116 +- .../host/html/HTMLOutputElementTest.java | 2 +- .../host/html/HTMLParagraphElementTest.java | 6 +- .../host/html/HTMLParamElementTest.java | 2 +- .../host/html/HTMLPhraseElementTest.java | 2 +- .../host/html/HTMLPreElementTest.java | 6 +- .../host/html/HTMLProgressElementTest.java | 2 +- .../host/html/HTMLQuoteElementTest.java | 2 +- .../host/html/HTMLScriptElementTest.java | 5 +- .../host/html/HTMLSelectElement2Test.java | 2 +- .../host/html/HTMLSelectElementTest.java | 185 +- .../host/html/HTMLSpanElementTest.java | 2 +- .../host/html/HTMLStyleElementTest.java | 2 +- .../html/HTMLTableCaptionElementTest.java | 2 +- .../host/html/HTMLTableCellElementTest.java | 2 +- .../host/html/HTMLTableColElementTest.java | 4 +- .../host/html/HTMLTableElement2Test.java | 2 +- .../host/html/HTMLTableElementTest.java | 22 +- .../host/html/HTMLTableRowElementTest.java | 2 +- .../html/HTMLTableSectionElementTest.java | 2 +- .../host/html/HTMLTemplateElementTest.java | 26 +- .../host/html/HTMLTextAreaElement2Test.java | 2 +- .../host/html/HTMLTextAreaElementTest.java | 2 +- .../host/html/HTMLTextElementTest.java | 2 +- .../host/html/HTMLTimeElementTest.java | 2 +- .../host/html/HTMLTitleElementTest.java | 2 +- .../host/html/HTMLUListElementTest.java | 4 +- .../host/html/HTMLVideoElementTest.java | 2 +- .../host/intl/DateTimeFormatTest.java | 114 +- .../javascript/host/intl/IntlTest.java | 21 +- .../host/intl/V8BreakIteratorTest.java | 82 +- .../host/media/AudioContextTest.java | 2 +- .../javascript/host/media/AudioParamTest.java | 2 +- .../host/media/BaseAudioContextTest.java | 2 +- .../javascript/host/media/GainNodeTest.java | 2 +- .../host/media/MediaDevicesTest.java | 83 + .../host/media/MediaSourceTest.java | 2 +- .../host/media/OfflineAudioContextTest.java | 2 +- .../host/media/PeriodicSyncManagerTest.java | 2 +- .../host/network/NetworkInformationTest.java | 2 +- .../PerformanceNavigationTest.java | 2 +- .../host/performance/PerformanceTest.java | 2 +- .../performance/PerformanceTimingTest.java | 2 +- .../javascript/host/svg/SVGAngleTest.java | 2 +- .../host/svg/SVGPathElementTest.java | 2 +- .../host/svg/SVGSVGElementTest.java | 2 +- .../host/svg/SVGTSpanElementTest.java | 2 +- .../htmlunit/javascript/host/svg/SVGTest.java | 2 +- .../host/svg/SVGTextContentElementTest.java | 2 +- .../host/svg/SVGTextElementTest.java | 2 +- .../host/svg/SVGTextPathElementTest.java | 2 +- .../DedicatedWorkerGlobalScopeTest.java | 4 +- .../javascript/host/worker/WorkerTest.java | 2 +- .../javascript/host/xml/FormDataTest.java | 135 +- .../javascript/host/xml/XMLDocument2Test.java | 299 +- .../javascript/host/xml/XMLDocument3Test.java | 35 +- .../javascript/host/xml/XMLDocumentTest.java | 490 +- .../host/xml/XMLHttpRequest2Test.java | 288 +- .../host/xml/XMLHttpRequest3Test.java | 2 +- .../host/xml/XMLHttpRequest4Test.java | 100 +- .../host/xml/XMLHttpRequest5Test.java | 2 +- .../host/xml/XMLHttpRequestCORSTest.java | 204 +- .../xml/XMLHttpRequestEventTargetTest.java | 284 +- .../host/xml/XMLHttpRequestLifeCycleTest.java | 459 +- .../host/xml/XMLHttpRequestTest.java | 586 +- .../host/xml/XMLSerializerTest.java | 162 +- .../host/xml/XSLTProcessorTest.java | 91 +- .../regexp/HtmlUnitRegExpProxy2Test.java | 2 +- .../regexp/HtmlUnitRegExpProxy3Test.java | 2 +- ...xyGlobalPropertiesStringFunctionsTest.java | 151 +- ...mlUnitRegExpProxyGlobalPropertiesTest.java | 92 +- ...UnitRegExpProxyInstancePropertiesTest.java | 2 +- .../regexp/HtmlUnitRegExpProxyTest.java | 20 +- .../regexp/RegExpJsToJavaConverterTest.java | 2 +- .../regexp/mozilla/MozillaTestGenerator.java | 2 +- .../mozilla/js1_2/AlphanumericTest.java | 2 +- .../regexp/mozilla/js1_2/AsteriskTest.java | 2 +- .../regexp/mozilla/js1_2/BackslashTest.java | 2 +- .../regexp/mozilla/js1_2/BackspaceTest.java | 2 +- .../regexp/mozilla/js1_2/BeginLineTest.java | 2 +- .../mozilla/js1_2/CharacterClassTest.java | 2 +- .../regexp/mozilla/js1_2/CompileTest.java | 2 +- .../regexp/mozilla/js1_2/DigitTest.java | 2 +- .../regexp/mozilla/js1_2/DotTest.java | 2 +- .../regexp/mozilla/js1_2/EndLineTest.java | 2 +- .../regexp/mozilla/js1_2/EverythingTest.java | 2 +- .../regexp/mozilla/js1_2/ExecTest.java | 2 +- .../regexp/mozilla/js1_2/FlagsTest.java | 2 +- .../regexp/mozilla/js1_2/GlobalTest.java | 2 +- .../regexp/mozilla/js1_2/HexadecimalTest.java | 2 +- .../regexp/mozilla/js1_2/IgnoreCaseTest.java | 2 +- .../regexp/mozilla/js1_2/IntervalTest.java | 2 +- .../regexp/mozilla/js1_2/OctalTest.java | 2 +- .../regexp/mozilla/js1_2/ParenthesesTest.java | 2 +- .../regexp/mozilla/js1_2/PlusTest.java | 2 +- .../mozilla/js1_2/QuestionMarkTest.java | 2 +- .../regexp/mozilla/js1_2/SimpleFormTest.java | 2 +- .../regexp/mozilla/js1_2/SourceTest.java | 2 +- .../mozilla/js1_2/StringReplaceTest.java | 2 +- .../mozilla/js1_2/StringSearchTest.java | 2 +- .../regexp/mozilla/js1_2/StringSplitTest.java | 2 +- .../regexp/mozilla/js1_2/TestTest.java | 2 +- .../htmlunit/libraries/ChartJsTest.java | 87 + .../htmlunit/libraries/CurvyCornersTest.java | 2 +- .../htmlunit/libraries/Dojo102Test.java | 2 +- .../htmlunit/libraries/Dojo193Test.java | 2 +- .../htmlunit/libraries/DojoTestBase.java | 16 +- .../htmlunit/libraries/ExtJS22Test.java | 2 +- .../htmlunit/libraries/GWT250Test.java | 2 +- .../htmlunit/libraries/JQuery1x11x3Test.java | 4 +- .../htmlunit/libraries/JQuery1x8x2Test.java | 2 +- .../htmlunit/libraries/JQuery3x3x1Test.java | 2 +- .../htmlunit/libraries/JQueryTestBase.java | 70 +- .../libraries/LibraryDependencyTest.java | 2 +- .../htmlunit/libraries/MochiKitTest.java | 2 +- .../htmlunit/libraries/MooTools121Test.java | 8 +- .../libraries/PolymerWebComponentsTest.java | 2 +- .../libraries/Prototype150rc1Test.java | 2 +- .../htmlunit/libraries/Prototype160Test.java | 2 +- .../htmlunit/libraries/Prototype161Test.java | 2 +- .../htmlunit/libraries/Prototype171Test.java | 2 +- .../htmlunit/libraries/PrototypeTestBase.java | 2 +- .../htmlunit/libraries/Sarissa0993Test.java | 2 +- .../htmlunit/libraries/TinyMceTest.java | 2 +- .../htmlunit/libraries/VueTest.java | 2 +- .../htmlunit/libraries/YuiTest.java | 6 +- .../protocol/data/DataURLDecoder2Test.java | 2 +- .../protocol/data/DataURLDecoderTest.java | 4 +- .../htmlunit/runners/BrowserStatement.java | 2 +- .../runners/BrowserVersionClassRunner.java | 25 +- ...owserVersionClassRunnerWithParameters.java | 2 +- .../FrameworkMethodWithParameters.java | 2 +- .../runners/StandardsFrameworkMethod.java | 2 +- .../htmlunit/runners/StandardsTestClass.java | 2 +- .../htmlunit/runners/TestCaseCorrector.java | 2 +- .../htmlunit/selenium/SeleniumTest.java | 2 +- .../htmlunit/selenium/TypingTest.java | 6 +- .../htmlunit/source/ElementTestSource.java | 6 +- .../htmlunit/source/JQueryExtractor.java | 2 +- .../htmlunit/source/Patch.java | 2 +- .../htmlunit/source/TestCaseCreator.java | 2 +- .../htmlunit/svg/SvgAltGlyphDefTest.java | 2 +- .../htmlunit/svg/SvgAltGlyphItemTest.java | 2 +- .../htmlunit/svg/SvgAltGlyphTest.java | 2 +- .../htmlunit/svg/SvgAnchorTest.java | 2 +- .../htmlunit/svg/SvgAnimateColorTest.java | 2 +- .../htmlunit/svg/SvgAnimateMotionTest.java | 2 +- .../htmlunit/svg/SvgAnimateTest.java | 2 +- .../htmlunit/svg/SvgAnimateTransformTest.java | 2 +- .../htmlunit/svg/SvgCircleTest.java | 2 +- .../htmlunit/svg/SvgClipPathTest.java | 2 +- .../htmlunit/svg/SvgColorProfileTest.java | 2 +- .../htmlunit/svg/SvgCursorTest.java | 2 +- .../htmlunit/svg/SvgDefsTest.java | 2 +- .../htmlunit/svg/SvgDescTest.java | 2 +- .../htmlunit/svg/SvgElementTest.java | 2 +- .../htmlunit/svg/SvgEllipseTest.java | 2 +- .../htmlunit/svg/SvgFeBlendTest.java | 2 +- .../htmlunit/svg/SvgFeColorMatrixTest.java | 2 +- .../svg/SvgFeComponentTransferTest.java | 2 +- .../htmlunit/svg/SvgFeCompositeTest.java | 2 +- .../htmlunit/svg/SvgFeConvolveMatrixTest.java | 2 +- .../svg/SvgFeDiffuseLightingTest.java | 2 +- .../svg/SvgFeDisplacementMapTest.java | 2 +- .../htmlunit/svg/SvgFeDistantLightTest.java | 2 +- .../htmlunit/svg/SvgFeFloodTest.java | 2 +- .../htmlunit/svg/SvgFeFuncATest.java | 2 +- .../htmlunit/svg/SvgFeFuncBTest.java | 2 +- .../htmlunit/svg/SvgFeFuncGTest.java | 2 +- .../htmlunit/svg/SvgFeFuncRTest.java | 2 +- .../htmlunit/svg/SvgFeGaussianBlurTest.java | 2 +- .../htmlunit/svg/SvgFeImageTest.java | 2 +- .../htmlunit/svg/SvgFeMergeNodeTest.java | 2 +- .../htmlunit/svg/SvgFeMergeTest.java | 2 +- .../htmlunit/svg/SvgFeMorphologyTest.java | 2 +- .../htmlunit/svg/SvgFeOffsetTest.java | 2 +- .../htmlunit/svg/SvgFePointLightTest.java | 2 +- .../svg/SvgFeSpecularLightingTest.java | 2 +- .../htmlunit/svg/SvgFeSpotLightTest.java | 2 +- .../htmlunit/svg/SvgFeTileTest.java | 2 +- .../htmlunit/svg/SvgFeTurbulenceTest.java | 2 +- .../htmlunit/svg/SvgFilterTest.java | 2 +- .../htmlunit/svg/SvgFontFaceFormatTest.java | 2 +- .../htmlunit/svg/SvgFontFaceNameTest.java | 2 +- .../htmlunit/svg/SvgFontFaceSrcTest.java | 2 +- .../htmlunit/svg/SvgFontFaceTest.java | 2 +- .../htmlunit/svg/SvgFontFaceURITest.java | 2 +- .../htmlunit/svg/SvgFontTest.java | 2 +- .../htmlunit/svg/SvgForeignObjectTest.java | 2 +- .../htmlunit/svg/SvgGlyphRefTest.java | 2 +- .../htmlunit/svg/SvgGlyphTest.java | 2 +- .../htmlunit/svg/SvgGroupTest.java | 2 +- .../htmlunit/svg/SvgHKernTest.java | 2 +- .../htmlunit/svg/SvgImageTest.java | 2 +- .../htmlunit/svg/SvgJavaScriptTest.java | 2 +- .../htmlunit/svg/SvgLineTest.java | 2 +- .../htmlunit/svg/SvgLinearGradientTest.java | 2 +- .../htmlunit/svg/SvgMPathTest.java | 2 +- .../htmlunit/svg/SvgMarkerTest.java | 2 +- .../htmlunit/svg/SvgMaskTest.java | 2 +- .../htmlunit/svg/SvgMatrixTest.java | 39 +- .../htmlunit/svg/SvgMetadataTest.java | 2 +- .../htmlunit/svg/SvgMissingGlyphTest.java | 2 +- .../htmlunit/svg/SvgPathTest.java | 2 +- .../htmlunit/svg/SvgPatternTest.java | 2 +- .../htmlunit/svg/SvgPolygonTest.java | 2 +- .../htmlunit/svg/SvgPolylineTest.java | 2 +- .../htmlunit/svg/SvgRadialGradientTest.java | 2 +- .../htmlunit/svg/SvgRectTest.java | 2 +- .../htmlunit/svg/SvgScriptTest.java | 18 +- .../htmlunit/svg/SvgSetTest.java | 2 +- .../htmlunit/svg/SvgStopTest.java | 2 +- .../htmlunit/svg/SvgStyleTest.java | 2 +- .../htmlunit/svg/SvgSwitchTest.java | 2 +- .../htmlunit/svg/SvgSymbolTest.java | 2 +- .../htmlunit/svg/SvgTRefTest.java | 2 +- .../htmlunit/svg/SvgTSpanTest.java | 2 +- .../htmlunit/svg/SvgTextPathTest.java | 2 +- .../htmlunit/svg/SvgTextTest.java | 2 +- .../htmlunit/svg/SvgTitleTest.java | 2 +- .../htmlunit/svg/SvgUseTest.java | 2 +- .../htmlunit/svg/SvgVKernTest.java | 2 +- .../htmlunit/svg/SvgViewTest.java | 2 +- .../htmlunit/util/CookieTest.java | 2 +- .../util/DebuggingWebConnectionTest.java | 2 +- .../htmlunit/util/EncodingSnifferTest.java | 2 +- .../util/FalsifyingWebConnectionTest.java | 2 +- .../htmlunit/util/MemoryLeakDetector.java | 2 +- .../htmlunit/util/ServletContentWrapper.java | 2 +- .../htmlunit/util/StringUtilsTest.java | 2 +- .../htmlunit/util/TextUtilsTest.java | 2 +- .../htmlunit/util/UrlUtilsTest.java | 24 +- .../util/WebConnectionWrapperTest.java | 2 +- .../htmlunit/xml/XmlPage2Test.java | 2 +- .../htmlunit/xml/XmlPageTest.java | 2 +- .../htmlunit/javascript/host/canvas/4x6.png | Bin 0 -> 162 bytes ...tyleDeclaration2Test.properties.Chrome.txt | 7 + ...SStyleDeclaration2Test.properties.Edge.txt | 6 + ...yleDeclaration2Test.properties2.Chrome.txt | 7 + ...StyleDeclaration2Test.properties2.Edge.txt | 6 + ...StyleDeclarationTest.properties.Chrome.txt | 7 + ...SSStyleDeclarationTest.properties.Edge.txt | 6 + ...tionTest.properties.notAttached.Chrome.txt | 7 + ...rationTest.properties.notAttached.Edge.txt | 6 + src/test-hu/resources/event_coordinates.html | 1 - src/test-hu/resources/insecureSSL.keystore | Bin 1378 -> 0 bytes src/test-hu/resources/insecureSSL.pfx | Bin 0 -> 2631 bytes .../libraries/DWR/2.0.5/gi/OpenAjax.js | 12 +- .../ExtJS/2.2/examples/core/pagebus.js | 2 +- .../GWT/2.5.0/DynaTable/DynaTable.html | 2 +- .../libraries/GWT/2.5.0/Hello/Hello.html | 2 +- .../libraries/GWT/2.5.0/JSON/JSON.html | 2 +- .../libraries/GWT/2.5.0/Mail/Mail.html | 2 +- .../raw/BlogMessages.java.html | 2 +- .../raw/BlogMessages.properties.html | 2 +- .../raw/ColorConstants.java.html | 2 +- .../raw/ColorConstants.properties.html | 2 +- .../raw/ContactDatabase.java.html | 2 +- .../raw/ContactInfoForm.java.html | 2 +- .../raw/ContactTreeViewModel.java.html | 2 +- .../raw/ErrorMessages.java.html | 2 +- .../raw/ErrorMessages.properties.html | 2 +- .../raw/ExampleConstants.java.html | 2 +- .../raw/ExampleConstants.properties.html | 2 +- .../raw/PluralMessages.java.html | 2 +- .../raw/PluralMessages_fr.properties.html | 2 +- .../raw/RangeLabelPager.java.html | 2 +- .../raw/ShowMorePagerPanel.java.html | 2 +- .../1.4.1/doc/html/MochiKit/Visual.html | 2 +- .../1.4.1/doc/rst/MochiKit/Sortable.rst | 2 +- .../1.4.1/doc/rst/MochiKit/Visual.rst | 2 +- .../libraries/chartjs/2.9.4/LICENSE.md | 9 + .../libraries/chartjs/2.9.4/README.md | 32 + .../libraries/chartjs/2.9.4/bower.json | 16 + .../libraries/chartjs/2.9.4/composer.json | 26 + .../chartjs/2.9.4/dist/Chart.bundle.js | 20776 ++++++++++++++++ .../chartjs/2.9.4/dist/Chart.bundle.min.js | 7 + .../libraries/chartjs/2.9.4/dist/Chart.css | 47 + .../libraries/chartjs/2.9.4/dist/Chart.js | 16172 ++++++++++++ .../chartjs/2.9.4/dist/Chart.min.css | 1 + .../libraries/chartjs/2.9.4/dist/Chart.min.js | 7 + .../simple_bar_chart.Chrome.expected | 1 + .../simple_bar_chart.Chrome_NYI.expected | 1 + .../simple_bar_chart.Edge.expected | 1 + .../simple_bar_chart.Edge_NYI.expected | 1 + .../expectations/simple_bar_chart.FF.expected | 1 + .../simple_bar_chart.FF78.expected | 1 + .../simple_bar_chart.FF78_NYI.expected | 1 + .../simple_bar_chart.FF_NYI.expected | 1 + .../expectations/simple_bar_chart.IE.expected | 1 + .../simple_bar_chart.IE_NYI.expected | 1 + .../libraries/chartjs/2.9.4/package.json | 69 + .../chartjs/2.9.4/simple_bar_chart.html | 70 + .../libraries/dojo/1.0.2/dojo/OpenAjax.js | 2 +- .../libraries/dojo/1.9.3/dojo/OpenAjax.js | 2 +- .../expectations/dojo_tests_request.NYI.txt | 50 +- .../jQuery/1.8.2/jquery/src/sizzle/grunt.js | 39 - .../1.8.2/jquery/src/sizzle/package.json | 31 - .../jQuery/1.8.2/jquery/test/qunit/grunt.js | 114 - .../1.8.2/jquery/test/qunit/package.json | 37 - 2058 files changed, 81906 insertions(+), 23344 deletions(-) delete mode 100644 src/main/java/com/gargoylesoftware/htmlunit/html/HtmlContent.java create mode 100644 src/main/java/com/gargoylesoftware/htmlunit/html/serializer/HtmlSerializerInnerOuterText.java create mode 100644 src/main/java/com/gargoylesoftware/htmlunit/html/serializer/HtmlSerializerNormalizedText.java rename src/main/java/com/gargoylesoftware/htmlunit/html/{ => serializer}/HtmlSerializerVisibleText.java (89%) create mode 100644 src/main/java/com/gargoylesoftware/htmlunit/html/serializer/package-info.java create mode 100644 src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitSameSiteHandler.java delete mode 100644 src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLContentElement.java delete mode 100644 src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLShadowElement.java create mode 100644 src/test-hu/java/com/gargoylesoftware/htmlunit/CookieManager5Test.java create mode 100644 src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfS2Test.java create mode 100644 src/test-hu/java/com/gargoylesoftware/htmlunit/html/serializer/HtmlSerializerInnerOuterText2Test.java create mode 100644 src/test-hu/java/com/gargoylesoftware/htmlunit/html/serializer/HtmlSerializerNormalizedText2Test.java create mode 100644 src/test-hu/java/com/gargoylesoftware/htmlunit/html/serializer/HtmlSerializerNormalizedTextTest.java rename src/test-hu/java/com/gargoylesoftware/htmlunit/html/{ => serializer}/HtmlSerializerVisibleText2Test.java (83%) rename src/test-hu/java/com/gargoylesoftware/htmlunit/html/{ => serializer}/HtmlSerializerVisibleTextTest.java (97%) delete mode 100644 src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2D2Test.java create mode 100644 src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/InputEventTest.java create mode 100644 src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDetailsElementTest.java create mode 100644 src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaDevicesTest.java create mode 100644 src/test-hu/java/com/gargoylesoftware/htmlunit/libraries/ChartJsTest.java create mode 100644 src/test-hu/resources/com/gargoylesoftware/htmlunit/javascript/host/canvas/4x6.png delete mode 100644 src/test-hu/resources/insecureSSL.keystore create mode 100644 src/test-hu/resources/insecureSSL.pfx create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/LICENSE.md create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/README.md create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/bower.json create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/composer.json create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/dist/Chart.bundle.js create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/dist/Chart.bundle.min.js create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/dist/Chart.css create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/dist/Chart.js create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/dist/Chart.min.css create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/dist/Chart.min.js create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/expectations/simple_bar_chart.Chrome.expected create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/expectations/simple_bar_chart.Chrome_NYI.expected create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/expectations/simple_bar_chart.Edge.expected create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/expectations/simple_bar_chart.Edge_NYI.expected create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/expectations/simple_bar_chart.FF.expected create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/expectations/simple_bar_chart.FF78.expected create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/expectations/simple_bar_chart.FF78_NYI.expected create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/expectations/simple_bar_chart.FF_NYI.expected create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/expectations/simple_bar_chart.IE.expected create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/expectations/simple_bar_chart.IE_NYI.expected create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/package.json create mode 100644 src/test-hu/resources/libraries/chartjs/2.9.4/simple_bar_chart.html delete mode 100644 src/test-hu/resources/libraries/jQuery/1.8.2/jquery/src/sizzle/grunt.js delete mode 100644 src/test-hu/resources/libraries/jQuery/1.8.2/jquery/src/sizzle/package.json delete mode 100644 src/test-hu/resources/libraries/jQuery/1.8.2/jquery/test/qunit/grunt.js delete mode 100644 src/test-hu/resources/libraries/jQuery/1.8.2/jquery/test/qunit/package.json diff --git a/src/main/java/com/gargoylesoftware/htmlunit/AbstractPage.java b/src/main/java/com/gargoylesoftware/htmlunit/AbstractPage.java index 451dc9d22..beb02eae6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/AbstractPage.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/AbstractPage.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/AjaxController.java b/src/main/java/com/gargoylesoftware/htmlunit/AjaxController.java index 4d7ad3eec..32ad86023 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/AjaxController.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/AjaxController.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/AlertHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/AlertHandler.java index 9e1e6f025..1ddd0bd34 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/AlertHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/AlertHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/AppletConfirmHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/AppletConfirmHandler.java index 557b6f3a3..f2ff42fcf 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/AppletConfirmHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/AppletConfirmHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersion.java b/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersion.java index 82e5135b4..ea14edbad 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersion.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersion.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -49,7 +49,7 @@ * .setUserAgent(userAgent) * .build(); * - *

But keep in mind this now one still behaves like a FF78, only the stuff reported to the + *

But keep in mind this new one still behaves like a FF78, only the stuff reported to the * outside is changed. This is more or less the same you can do with real browsers installing * plugins like UserAgentSwitcher. * @@ -94,7 +94,7 @@ public final class BrowserVersion implements Serializable { private static final String PLATFORM_WIN64 = "Win64"; /** Latest Firefox. */ - public static final BrowserVersion FIREFOX = new BrowserVersion(84, "FF"); + public static final BrowserVersion FIREFOX = new BrowserVersion(88, "FF"); /** Firefox 78 ESR. */ public static final BrowserVersion FIREFOX_78 = new BrowserVersion(78, "FF78"); @@ -103,10 +103,10 @@ public final class BrowserVersion implements Serializable { public static final BrowserVersion INTERNET_EXPLORER = new BrowserVersion(11, "IE"); /** Latest Edge */ - public static final BrowserVersion EDGE = new BrowserVersion(87, "Edge"); + public static final BrowserVersion EDGE = new BrowserVersion(90, "Edge"); /** Latest Chrome. */ - public static final BrowserVersion CHROME = new BrowserVersion(87, "Chrome"); + public static final BrowserVersion CHROME = new BrowserVersion(90, "Chrome"); /** * Array with all supported browsers @@ -212,9 +212,9 @@ public final class BrowserVersion implements Serializable { // CHROME (Win10 64bit) CHROME.applicationVersion_ = "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/" - + CHROME.getBrowserVersionNumeric() + ".0.4280.66 Safari/537.36"; + + CHROME.getBrowserVersionNumeric() + ".0.4430.72 Safari/537.36"; CHROME.userAgent_ = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/" - + CHROME.getBrowserVersionNumeric() + ".0.4280.66 Safari/537.36"; + + CHROME.getBrowserVersionNumeric() + ".0.4430.72 Safari/537.36"; CHROME.applicationCodeName_ = "Mozilla"; CHROME.vendor_ = "Google Inc."; @@ -239,7 +239,7 @@ public final class BrowserVersion implements Serializable { CHROME.htmlAcceptHeader_ = "text/html,application/xhtml+xml,application/xml;" + "q=0.9,image/avif,image/webp,image/apng,*/*;" + "q=0.8,application/signed-exchange;v=b3;q=0.9"; - CHROME.imgAcceptHeader_ = "image/avif,image/webp,image/apng,image/*,*/*;q=0.8"; + CHROME.imgAcceptHeader_ = "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8"; CHROME.cssAcceptHeader_ = "text/css,*/*;q=0.1"; CHROME.scriptAcceptHeader_ = "*/*"; // there are other issues with Chrome; a different productSub, etc. @@ -253,11 +253,11 @@ public final class BrowserVersion implements Serializable { // EDGE (Win10 64bit) EDGE.applicationVersion_ = "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/" - + EDGE.getBrowserVersionNumeric() + ".0.4280.67 Safari/537.36 Edg/" - + EDGE.getBrowserVersionNumeric() + ".0.664.47"; + + EDGE.getBrowserVersionNumeric() + ".0.4430.72 Safari/537.36 Edg/" + + EDGE.getBrowserVersionNumeric() + ".0.818.41"; EDGE.userAgent_ = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/" - + EDGE.getBrowserVersionNumeric() + ".0.4280.67 Safari/537.36 Edg/" - + EDGE.getBrowserVersionNumeric() + ".0.664.47"; + + EDGE.getBrowserVersionNumeric() + ".0.4430.72 Safari/537.36 Edg/" + + EDGE.getBrowserVersionNumeric() + ".0.818.41"; EDGE.applicationCodeName_ = "Mozilla"; EDGE.vendor_ = "Google Inc."; @@ -282,7 +282,7 @@ public final class BrowserVersion implements Serializable { EDGE.htmlAcceptHeader_ = "text/html,application/xhtml+xml,application/xml;" + "q=0.9,image/webp,image/apng,*/*;" + "q=0.8,application/signed-exchange;v=b3;q=0.9"; - EDGE.imgAcceptHeader_ = "image/webp,image/apng,image/*,*/*;q=0.8"; + EDGE.imgAcceptHeader_ = "image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8"; EDGE.cssAcceptHeader_ = "text/css,*/*;q=0.1"; EDGE.scriptAcceptHeader_ = "*/*"; // there are other issues with Chrome; a different productSub, etc. @@ -427,7 +427,7 @@ public final class BrowserVersion implements Serializable { // flush plugin (windows version) final PluginConfiguration flash = new PluginConfiguration("Shockwave Flash", - "Shockwave Flash 32.0 r0", "32.0.0.387", "Flash.ocx"); //NOPMD + "Shockwave Flash 32.0 r0", "32.0.0.445", "Flash.ocx"); //NOPMD flash.getMimeTypes().add(new PluginConfiguration.MimeType("application/x-shockwave-flash", "Shockwave Flash", "swf")); INTERNET_EXPLORER.plugins_.add(flash); @@ -988,6 +988,10 @@ public BrowserVersionBuilder setApplicationCodeName(final String applicationCode } /** + * Changes the browser language property. This is used for various output + * formating. If you like change the language the browser requests from the server + * you have to adjust the {@link #setAcceptLanguageHeader(String)}. + * * @param browserLanguage the browserLanguage to set * @return this for fluent use */ diff --git a/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java b/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java index d58104151..ab8074e31 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -278,7 +278,7 @@ public enum BrowserVersionFeatures { FORM_PARAMETRS_NOT_SUPPORTED_FOR_IMAGE, /** Form submit forces a real request also if only the hash was changed. */ - @BrowserFeature({CHROME, EDGE, FF}) + @BrowserFeature({CHROME, EDGE, FF, FF78}) FORM_SUBMISSION_DOWNLOWDS_ALSO_IF_ONLY_HASH_CHANGED, /** Form submit takes care of fields outside the form linked to the form @@ -302,6 +302,10 @@ public enum BrowserVersionFeatures { @BrowserFeature(IE) FORM_SUBMISSION_URL_WITHOUT_HASH, + /** If the frame src has 'about:' scheme use always 'about:blank' as source. */ + @BrowserFeature({FF, FF78, IE}) + FRAME_LOCATION_ABOUT_BLANK_FOR_ABOUT_SCHEME, + /** */ @BrowserFeature(IE) HTMLABBREVIATED, @@ -586,6 +590,10 @@ public enum BrowserVersionFeatures { @BrowserFeature(IE) JS_ANCHORS_REQUIRES_NAME_OR_ID, + /** The anchor hostname setter ignores blank url's. */ + @BrowserFeature({FF, FF78}) + JS_ANCHOR_HOSTNAME_IGNORE_BLANK, + /** The anchor pathname detects url's starting with one letter as file url's. */ @BrowserFeature({CHROME, EDGE, IE}) JS_ANCHOR_PATHNAME_DETECT_WIN_DRIVES_URL, @@ -614,6 +622,10 @@ public enum BrowserVersionFeatures { @BrowserFeature({FF, FF78}) JS_ANCHOR_PROTOCOL_HTTP_FOR_BROKEN_URL, + /** The anchor protocol property setter throws an error if the protocol is not valid. */ + @BrowserFeature(IE) + JS_ANCHOR_PROTOCOL_INVALID_THROWS, + /** An area element without a href attribute is focusable. */ @BrowserFeature({FF, FF78}) JS_AREA_WITHOUT_HREF_FOCUSABLE, @@ -702,10 +714,6 @@ public enum BrowserVersionFeatures { @BrowserFeature(IE) JS_DATE_WITH_LEFT_TO_RIGHT_MARK, - /** */ - @BrowserFeature(IE) - JS_DEFERRED, - /** Javascript doctyp.entities returns null (FF10). */ @BrowserFeature(IE) JS_DOCTYPE_ENTITIES_NULL, @@ -898,6 +906,14 @@ public enum BrowserVersionFeatures { @BrowserFeature({FF, FF78}) JS_EVENT_DISTINGUISH_PRINTABLE_KEY, + /** Javascript InputEvent reads the inputType property from data. */ + @BrowserFeature({FF, FF78}) + JS_EVENT_INPUT_CTOR_INPUTTYPE, + + /** Javascript KeyboardEvent reads the which property from data. */ + @BrowserFeature({FF, FF78, IE}) + JS_EVENT_KEYBOARD_CTOR_WHICH, + /** do not trigger the onload event if the frame content * was not shown because of the csp. */ @BrowserFeature({FF, FF78}) @@ -1020,6 +1036,14 @@ public enum BrowserVersionFeatures { @BrowserFeature({CHROME, EDGE, FF, FF78}) JS_INPUT_IGNORE_NEGATIVE_SELECTION_START, + /** FF accepts all chars. */ + @BrowserFeature({FF, FF78, IE}) + JS_INPUT_NUMBER_ACCEPT_ALL, + + /** FF commat at end is not an integer. */ + @BrowserFeature(FF) + JS_INPUT_NUMBER_DOT_AT_END_IS_DOUBLE, + /** Chrome/FF returns null for selectionStart/selectionEnd. */ @BrowserFeature({CHROME, EDGE, FF, FF78}) JS_INPUT_NUMBER_SELECTION_START_END_NULL, @@ -1255,7 +1279,7 @@ public enum BrowserVersionFeatures { JS_STORAGE_PRESERVED_INCLUDED, /** Stylesheet list contains only active style sheets. */ - @BrowserFeature({CHROME, EDGE}) + @BrowserFeature({CHROME, EDGE, FF}) JS_STYLESHEETLIST_ACTIVE_ONLY, /** IE supports accessing unsupported style elements via getter diff --git a/src/main/java/com/gargoylesoftware/htmlunit/Cache.java b/src/main/java/com/gargoylesoftware/htmlunit/Cache.java index 879b88665..d794a2803 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/Cache.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/Cache.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -217,7 +217,7 @@ protected void deleteOverflow() { */ protected boolean isCacheable(final WebRequest request, final WebResponse response) { return HttpMethod.GET == response.getWebRequest().getHttpMethod() - && WebClient.URL_ABOUT_BLANK != request.getUrl() + && UrlUtils.URL_ABOUT_BLANK != request.getUrl() && isCacheableContent(response); } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/CollectingAlertHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/CollectingAlertHandler.java index e39d9c4b0..dda937aae 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/CollectingAlertHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/CollectingAlertHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/ConfirmHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/ConfirmHandler.java index daa78002a..a7478b072 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/ConfirmHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/ConfirmHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/CookieManager.java b/src/main/java/com/gargoylesoftware/htmlunit/CookieManager.java index 8ff31596c..2a9e045a9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/CookieManager.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/CookieManager.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProvider.java b/src/main/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProvider.java index fffc9a101..da42a1cef 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProvider.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProvider.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/DefaultCssErrorHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/DefaultCssErrorHandler.java index 2cc45c9b4..1af7defb8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/DefaultCssErrorHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/DefaultCssErrorHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/DefaultPageCreator.java b/src/main/java/com/gargoylesoftware/htmlunit/DefaultPageCreator.java index 2de69b461..84e2782ef 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/DefaultPageCreator.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/DefaultPageCreator.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -82,6 +82,12 @@ public class DefaultPageCreator implements PageCreator, Serializable { private static final byte[] markerUTF16BE_ = {(byte) 0xfe, (byte) 0xff}; private static final byte[] markerUTF16LE_ = {(byte) 0xff, (byte) 0xfe}; + /** + * See http://tools.ietf.org/html/draft-abarth-mime-sniff-05 + */ + private static final String[] htmlPatterns = {"!DOCTYPE HTML", "HTML", "HEAD", "SCRIPT", + "IFRAME", "H1", "DIV", "FONT", "TABLE", "A", "STYLE", "TITLE", "B", "BODY", "BR", "P", "!--" }; + private static final HTMLParser htmlParser_ = new HtmlUnitNekoHtmlParser(); /** @@ -110,7 +116,8 @@ public static PageType determinePageType(final String contentType) { return PageType.UNKNOWN; } - switch (contentType) { + final String contentTypeLC = contentType.toLowerCase(Locale.ROOT); + switch (contentTypeLC) { case MimeType.TEXT_HTML: case "image/svg+xml": return PageType.HTML; @@ -126,11 +133,11 @@ public static PageType determinePageType(final String contentType) { return PageType.XML; default: - if (contentType.endsWith("+xml")) { + if (contentTypeLC.endsWith("+xml")) { return PageType.XML; } - if (contentType.startsWith("text/")) { + if (contentTypeLC.startsWith("text/")) { return PageType.TEXT; } @@ -138,6 +145,54 @@ public static PageType determinePageType(final String contentType) { } } + /** + * Determines the kind of page to create from the content type. + * @param webResponse the response to investigate + * @exception IOException if an IO problem occurs + * @return "xml", "html", "javascript", "text" or "unknown" + */ + public static PageType determinePageType(final WebResponse webResponse) throws IOException { + final String contentType = webResponse.getContentType(); + if (!StringUtils.isEmpty(contentType)) { + return determinePageType(contentType); + } + + // sniff - http://tools.ietf.org/html/draft-abarth-mime-sniff-05 + try (InputStream contentAsStream = webResponse.getContentAsStream()) { + final byte[] bytes = read(contentAsStream, 512); + if (bytes.length == 0) { + return determinePageType(MimeType.TEXT_PLAIN); + } + + if (startsWith(bytes, markerUTF8_) || startsWith(bytes, markerUTF16BE_) + || startsWith(bytes, markerUTF16LE_)) { + return determinePageType(MimeType.TEXT_PLAIN); + } + + if (isBinary(bytes)) { + return determinePageType(MimeType.APPLICATION_OCTET_STREAM); + } + + final String asAsciiString = new String(bytes, "ASCII").trim().toUpperCase(Locale.ROOT); + for (final String htmlPattern : htmlPatterns) { + try { + if ('<' == asAsciiString.charAt(0)) { + if (asAsciiString.startsWith(htmlPattern, 1)) { + final char spaceOrBracket = asAsciiString.charAt(htmlPattern.length() + 1); + if (' ' == spaceOrBracket || '>' == spaceOrBracket) { + return determinePageType(MimeType.TEXT_HTML); + } + } + } + } + catch (final ArrayIndexOutOfBoundsException e) { + // ignore and try next + } + } + } + return determinePageType(MimeType.TEXT_PLAIN); + } + /** * Creates an instance. */ @@ -155,9 +210,7 @@ public DefaultPageCreator() { */ @Override public Page createPage(final WebResponse webResponse, final WebWindow webWindow) throws IOException { - final String contentType = determineContentType(webResponse); - - final PageType pageType = determinePageType(contentType); + final PageType pageType = determinePageType(webResponse); switch (pageType) { case HTML: return createHtmlPage(webResponse, webWindow); @@ -181,46 +234,6 @@ public Page createPage(final WebResponse webResponse, final WebWindow webWindow) } } - /** - * Tries to determine the content type. - * TODO: implement a content type sniffer based on the - * Content-Type Processing Model - * @param webResponse the response from the server - * @return the sniffed mime type - * @exception IOException if an IO problem occurs - */ - private static String determineContentType(final WebResponse webResponse) - throws IOException { - - final String contentType = webResponse.getContentType(); - if (!StringUtils.isEmpty(contentType)) { - return contentType.toLowerCase(Locale.ROOT); - } - - try (InputStream contentAsStream = webResponse.getContentAsStream()) { - final byte[] bytes = read(contentAsStream, 500); - if (bytes.length == 0) { - return MimeType.TEXT_PLAIN; - } - - final String asAsciiString = new String(bytes, "ASCII").toUpperCase(Locale.ROOT); - if (asAsciiString.contains("")) { - return MimeType.APPLICATION_JAVASCRIPT; - } - else if (isBinary(bytes)) { - return MimeType.APPLICATION_OCTET_STREAM; - } - } - return MimeType.TEXT_PLAIN; - } - /** * {@inheritDoc} */ diff --git a/src/main/java/com/gargoylesoftware/htmlunit/DialogWindow.java b/src/main/java/com/gargoylesoftware/htmlunit/DialogWindow.java index 037528872..0a40bcc7d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/DialogWindow.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/DialogWindow.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/DownloadedContent.java b/src/main/java/com/gargoylesoftware/htmlunit/DownloadedContent.java index e57f53edc..a2a9d5c1a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/DownloadedContent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/DownloadedContent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/ElementNotFoundException.java b/src/main/java/com/gargoylesoftware/htmlunit/ElementNotFoundException.java index 73472a97d..65d7fa989 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/ElementNotFoundException.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/ElementNotFoundException.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/FailingHttpStatusCodeException.java b/src/main/java/com/gargoylesoftware/htmlunit/FailingHttpStatusCodeException.java index 2f982e991..ca7da9f6f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/FailingHttpStatusCodeException.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/FailingHttpStatusCodeException.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/FormEncodingType.java b/src/main/java/com/gargoylesoftware/htmlunit/FormEncodingType.java index 2c46fd40a..340f2e26e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/FormEncodingType.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/FormEncodingType.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/FrameContentHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/FrameContentHandler.java index 410ef4d09..91eebef92 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/FrameContentHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/FrameContentHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/History.java b/src/main/java/com/gargoylesoftware/htmlunit/History.java index c6bd6091e..798d9179d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/History.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/History.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/HttpHeader.java b/src/main/java/com/gargoylesoftware/htmlunit/HttpHeader.java index 18c507ad6..41ac4710b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/HttpHeader.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/HttpHeader.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/HttpMethod.java b/src/main/java/com/gargoylesoftware/htmlunit/HttpMethod.java index fa66f95dc..ed67e25a8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/HttpMethod.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/HttpMethod.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java b/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java index 61979557b..54be6f3ef 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -255,16 +255,17 @@ private void setProxy(final HttpRequestBase httpRequest, final WebRequest webReq if (webRequest.getProxyHost() == null) { requestBuilder.setProxy(null); httpRequest.setConfig(requestBuilder.build()); + return; + } + + final HttpHost proxy = new HttpHost(webRequest.getProxyHost(), + webRequest.getProxyPort(), webRequest.getProxyScheme()); + if (webRequest.isSocksProxy()) { + SocksConnectionSocketFactory.setSocksProxy(getHttpContext(), proxy); } else { - final HttpHost proxy = new HttpHost(webRequest.getProxyHost(), webRequest.getProxyPort()); - if (webRequest.isSocksProxy()) { - SocksConnectionSocketFactory.setSocksProxy(getHttpContext(), proxy); - } - else { - requestBuilder.setProxy(proxy); - httpRequest.setConfig(requestBuilder.build()); - } + requestBuilder.setProxy(proxy); + httpRequest.setConfig(requestBuilder.build()); } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/ImmediateRefreshHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/ImmediateRefreshHandler.java index 500a1bc1f..b5ef36c40 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/ImmediateRefreshHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/ImmediateRefreshHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/IncorrectnessListener.java b/src/main/java/com/gargoylesoftware/htmlunit/IncorrectnessListener.java index 86e575816..0ba0deb81 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/IncorrectnessListener.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/IncorrectnessListener.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/IncorrectnessListenerImpl.java b/src/main/java/com/gargoylesoftware/htmlunit/IncorrectnessListenerImpl.java index 421f77f0a..79d36988b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/IncorrectnessListenerImpl.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/IncorrectnessListenerImpl.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/MockWebConnection.java b/src/main/java/com/gargoylesoftware/htmlunit/MockWebConnection.java index c97039473..8dc4aa113 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/MockWebConnection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/MockWebConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/NiceRefreshHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/NiceRefreshHandler.java index 8c873cbff..d7b58f3d8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/NiceRefreshHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/NiceRefreshHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/NicelyResynchronizingAjaxController.java b/src/main/java/com/gargoylesoftware/htmlunit/NicelyResynchronizingAjaxController.java index 6b0b262ef..08fcd9128 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/NicelyResynchronizingAjaxController.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/NicelyResynchronizingAjaxController.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/NotYetImplementedException.java b/src/main/java/com/gargoylesoftware/htmlunit/NotYetImplementedException.java index 71e7e247c..3da181f64 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/NotYetImplementedException.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/NotYetImplementedException.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/ObjectInstantiationException.java b/src/main/java/com/gargoylesoftware/htmlunit/ObjectInstantiationException.java index b14434e73..9e5a684aa 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/ObjectInstantiationException.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/ObjectInstantiationException.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/OnbeforeunloadHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/OnbeforeunloadHandler.java index 9fd6c2bd9..878ebec47 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/OnbeforeunloadHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/OnbeforeunloadHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/Page.java b/src/main/java/com/gargoylesoftware/htmlunit/Page.java index e7eedd046..b94e835ce 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/Page.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/Page.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/PageCreator.java b/src/main/java/com/gargoylesoftware/htmlunit/PageCreator.java index 1bb934394..c4a3cec82 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/PageCreator.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/PageCreator.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/PluginConfiguration.java b/src/main/java/com/gargoylesoftware/htmlunit/PluginConfiguration.java index f0eac54a9..575bf7f0c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/PluginConfiguration.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/PluginConfiguration.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/PromptHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/PromptHandler.java index b7261af8c..45db71d29 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/PromptHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/PromptHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/ProxyAutoConfig.java b/src/main/java/com/gargoylesoftware/htmlunit/ProxyAutoConfig.java index 5c415ea46..69cd8944d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/ProxyAutoConfig.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/ProxyAutoConfig.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -52,8 +52,7 @@ private ProxyAutoConfig() { * @return semicolon-separated result */ public static String evaluate(final String content, final URL url) { - final Context cx = Context.enter(); - try { + try (Context cx = Context.enter()) { final ProxyAutoConfig config = new ProxyAutoConfig(); final Scriptable scope = cx.initSafeStandardObjects(); @@ -79,9 +78,6 @@ public static String evaluate(final String content, final URL url) { final Object result = f.call(cx, scope, scope, functionArgs); return Context.toString(result); } - finally { - Context.exit(); - } } private void defineMethod(final String methodName, final Scriptable scope) { diff --git a/src/main/java/com/gargoylesoftware/htmlunit/ProxyConfig.java b/src/main/java/com/gargoylesoftware/htmlunit/ProxyConfig.java index 1fed09369..9f4dadc68 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/ProxyConfig.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/ProxyConfig.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,12 +24,14 @@ * class. One instance of this class exists for each WebClient instance. * * @author Daniel Gredler + * @author Ronald Brill * @see WebClientOptions#getProxyConfig() */ public class ProxyConfig implements Serializable { private String proxyHost_; private int proxyPort_; + private String proxyScheme_; private boolean isSocksProxy_; private final Map proxyBypassHosts_ = new HashMap<>(); private String proxyAutoConfigUrl_; @@ -39,27 +41,30 @@ public class ProxyConfig implements Serializable { * Creates a new instance. */ public ProxyConfig() { - this(null, 0); + this(null, 0, null, false); } /** * Creates a new instance. * @param proxyHost the proxy host * @param proxyPort the proxy port + * @param proxyScheme the scheme http/https; null defaults to http */ - public ProxyConfig(final String proxyHost, final int proxyPort) { - this(proxyHost, proxyPort, false); + public ProxyConfig(final String proxyHost, final int proxyPort, final String proxyScheme) { + this(proxyHost, proxyPort, proxyScheme, false); } /** * Creates a new instance. * @param proxyHost the proxy host * @param proxyPort the proxy port + * @param proxyScheme the scheme http/https * @param isSocks whether SOCKS proxy or not */ - public ProxyConfig(final String proxyHost, final int proxyPort, final boolean isSocks) { + public ProxyConfig(final String proxyHost, final int proxyPort, final String proxyScheme, final boolean isSocks) { proxyHost_ = proxyHost; proxyPort_ = proxyPort; + proxyScheme_ = proxyScheme; isSocksProxy_ = isSocks; } @@ -95,6 +100,22 @@ public void setProxyPort(final int proxyPort) { proxyPort_ = proxyPort; } + /** + * Returns the proxy scheme used to perform HTTP requests. + * @return the proxy scheme used to perform HTTP requests + */ + public String getProxyScheme() { + return proxyScheme_; + } + + /** + * Sets the proxy scheme used to perform HTTP requests. + * @param proxyScheme the proxy scheme used to perform HTTP requests + */ + public void setProxyPort(final String proxyScheme) { + proxyScheme_ = proxyScheme; + } + /** * Returns whether SOCKS proxy or not. * @return whether SOCKS proxy or not diff --git a/src/main/java/com/gargoylesoftware/htmlunit/RefreshHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/RefreshHandler.java index 61004f310..e1f123604 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/RefreshHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/RefreshHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/ScriptException.java b/src/main/java/com/gargoylesoftware/htmlunit/ScriptException.java index 4409528db..6e746c748 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/ScriptException.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/ScriptException.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/ScriptPreProcessor.java b/src/main/java/com/gargoylesoftware/htmlunit/ScriptPreProcessor.java index 27a9758bb..fe4b4155e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/ScriptPreProcessor.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/ScriptPreProcessor.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/ScriptResult.java b/src/main/java/com/gargoylesoftware/htmlunit/ScriptResult.java index 4b5048df1..0f74ef701 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/ScriptResult.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/ScriptResult.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/SgmlPage.java b/src/main/java/com/gargoylesoftware/htmlunit/SgmlPage.java index d781f2c65..9e1c73a5e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/SgmlPage.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/SgmlPage.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -42,6 +42,7 @@ import com.gargoylesoftware.htmlunit.html.DomNodeList; import com.gargoylesoftware.htmlunit.html.DomText; import com.gargoylesoftware.htmlunit.html.DomTreeWalker; +import com.gargoylesoftware.htmlunit.util.UrlUtils; /** * A basic class of Standard Generalized Markup Language (SGML), e.g. HTML and XML. @@ -270,7 +271,7 @@ public DomAttr createAttribute(final String name) { public URL getUrl() { final WebResponse wr = getWebResponse(); if (null == wr) { - return WebClient.URL_ABOUT_BLANK; + return UrlUtils.URL_ABOUT_BLANK; } return getWebResponse().getWebRequest().getUrl(); } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/SilentCssErrorHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/SilentCssErrorHandler.java index 649048103..fd4066aa6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/SilentCssErrorHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/SilentCssErrorHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/StatusHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/StatusHandler.java index 9496fe411..d747437f9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/StatusHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/StatusHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/StorageHolder.java b/src/main/java/com/gargoylesoftware/htmlunit/StorageHolder.java index be77754e9..4716615b5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/StorageHolder.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/StorageHolder.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/StringWebResponse.java b/src/main/java/com/gargoylesoftware/htmlunit/StringWebResponse.java index fafd5c598..d2d4bdb6e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/StringWebResponse.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/StringWebResponse.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/TextPage.java b/src/main/java/com/gargoylesoftware/htmlunit/TextPage.java index 176c3ac2b..936507909 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/TextPage.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/TextPage.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/ThreadedRefreshHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/ThreadedRefreshHandler.java index 1d2530052..c64d8f024 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/ThreadedRefreshHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/ThreadedRefreshHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/TopLevelWindow.java b/src/main/java/com/gargoylesoftware/htmlunit/TopLevelWindow.java index 59aa331d9..b3a0a760e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/TopLevelWindow.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/TopLevelWindow.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,6 +18,7 @@ import org.apache.commons.logging.LogFactory; import com.gargoylesoftware.htmlunit.html.HtmlPage; +import com.gargoylesoftware.htmlunit.util.UrlUtils; /** * A window representing a top level browser window. @@ -72,7 +73,7 @@ public WebWindow getTopWindow() { @Override protected boolean isJavaScriptInitializationNeeded(final Page page) { return getScriptableObject() == null - || page.getUrl() == WebClient.URL_ABOUT_BLANK + || page.getUrl() == UrlUtils.URL_ABOUT_BLANK || !(page.getWebResponse() instanceof StringWebResponse); // TODO: find a better way to distinguish content written by document.open(),... } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/UnexpectedPage.java b/src/main/java/com/gargoylesoftware/htmlunit/UnexpectedPage.java index 9c69e168b..6d724a725 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/UnexpectedPage.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/UnexpectedPage.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/Version.java b/src/main/java/com/gargoylesoftware/htmlunit/Version.java index 2ecf1c878..ee7dde6ef 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/Version.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/Version.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WaitingRefreshHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/WaitingRefreshHandler.java index 70dcb37d8..e898e6741 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WaitingRefreshHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WaitingRefreshHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebAssert.java b/src/main/java/com/gargoylesoftware/htmlunit/WebAssert.java index d17e2984c..cfacd3fd7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebAssert.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebAssert.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebClient.java b/src/main/java/com/gargoylesoftware/htmlunit/WebClient.java index 6ad9ba619..707ba8d74 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebClient.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebClient.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -82,6 +82,8 @@ import com.gargoylesoftware.htmlunit.html.FrameWindow.PageDenied; import com.gargoylesoftware.htmlunit.html.HtmlInlineFrame; import com.gargoylesoftware.htmlunit.html.HtmlPage; +import com.gargoylesoftware.htmlunit.html.XHtmlPage; +import com.gargoylesoftware.htmlunit.html.parser.HTMLParser; import com.gargoylesoftware.htmlunit.html.parser.HTMLParserListener; import com.gargoylesoftware.htmlunit.httpclient.HtmlUnitBrowserCompatCookieSpec; import com.gargoylesoftware.htmlunit.javascript.AbstractJavaScriptEngine; @@ -198,20 +200,36 @@ public class WebClient implements Serializable, AutoCloseable { private Cache cache_ = new Cache(); /** target "_blank". */ - private static final String TARGET_BLANK = "_blank"; - /** target "_parent". */ - private static final String TARGET_SELF = "_self"; + public static final String TARGET_BLANK = "_blank"; + + /** target "_self". */ + public static final String TARGET_SELF = "_self"; + /** target "_parent". */ private static final String TARGET_PARENT = "_parent"; /** target "_top". */ private static final String TARGET_TOP = "_top"; - /** "about:". */ - public static final String ABOUT_SCHEME = "about:"; - /** "about:blank". */ - public static final String ABOUT_BLANK = ABOUT_SCHEME + "blank"; - /** URL for "about:blank". */ - public static final URL URL_ABOUT_BLANK = UrlUtils.toUrlSafe(ABOUT_BLANK); + /** + * "about:". + * @deprecated as of version 2.47.0; use UrlUtils.ABOUT_BLANK instead + */ + @Deprecated + public static final String ABOUT_SCHEME = UrlUtils.ABOUT_SCHEME; + + /** + * "about:blank". + * @deprecated as of version 2.47.0; use UrlUtils.ABOUT_BLANK instead + */ + @Deprecated + public static final String ABOUT_BLANK = UrlUtils.ABOUT_BLANK; + + /** + * URL for "about:blank". + * @deprecated as of version 2.47.0; use UrlUtils.URL_ABOUT_BLANK instead + */ + @Deprecated + public static final URL URL_ABOUT_BLANK = UrlUtils.URL_ABOUT_BLANK; private ScriptPreProcessor scriptPreProcessor_; @@ -248,7 +266,19 @@ public WebClient(final BrowserVersion browserVersion) { * @param proxyPort the port to use on the proxy server */ public WebClient(final BrowserVersion browserVersion, final String proxyHost, final int proxyPort) { - this(browserVersion, true, proxyHost, proxyPort); + this(browserVersion, true, proxyHost, proxyPort, null); + } + + /** + * Creates an instance that will use the specified {@link BrowserVersion} and proxy server. + * @param browserVersion the browser version to simulate + * @param proxyHost the server that will act as proxy or null for no proxy + * @param proxyPort the port to use on the proxy server + * @param proxyScheme the scheme http/https + */ + public WebClient(final BrowserVersion browserVersion, + final String proxyHost, final int proxyPort, final String proxyScheme) { + this(browserVersion, true, proxyHost, proxyPort, proxyScheme); } /** @@ -260,6 +290,19 @@ public WebClient(final BrowserVersion browserVersion, final String proxyHost, fi */ public WebClient(final BrowserVersion browserVersion, final boolean javaScriptEngineEnabled, final String proxyHost, final int proxyPort) { + this(browserVersion, javaScriptEngineEnabled, proxyHost, proxyPort, null); + } + + /** + * Creates an instance that will use the specified {@link BrowserVersion} and proxy server. + * @param browserVersion the browser version to simulate + * @param javaScriptEngineEnabled set to false if the simulated browser should not support javaScript + * @param proxyHost the server that will act as proxy or null for no proxy + * @param proxyPort the port to use on the proxy server + * @param proxyScheme the scheme http/https + */ + public WebClient(final BrowserVersion browserVersion, final boolean javaScriptEngineEnabled, + final String proxyHost, final int proxyPort, final String proxyScheme) { WebAssert.notNull("browserVersion", browserVersion); browserVersion_ = browserVersion; @@ -269,7 +312,7 @@ public WebClient(final BrowserVersion browserVersion, final boolean javaScriptEn getOptions().setProxyConfig(new ProxyConfig()); } else { - getOptions().setProxyConfig(new ProxyConfig(proxyHost, proxyPort)); + getOptions().setProxyConfig(new ProxyConfig(proxyHost, proxyPort, proxyScheme)); } webConnection_ = new HttpWebConnection(this); // this has to be done after the browser version was set @@ -467,28 +510,6 @@

P getPage(final WebWindow webWindow, final WebRequest webReques return (P) webWindow.getEnclosedPage(); } - /** - * INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
- * - *

Open a new web window and populate it with a page loaded by - * {@link #getPage(WebWindow,WebRequest)}

- * - * @param opener the web window that initiated the request - * @param target the name of the window to be opened (the name that will be passed into the - * JavaScript open() method) - * @param params any parameters - * @param

the page type - * @return the new page - * @throws FailingHttpStatusCodeException if the server returns a failing status code AND the property - * {@link WebClientOptions#setThrowExceptionOnFailingStatusCode(boolean)} is set to true. - * @throws IOException if an IO problem occurs - */ - @SuppressWarnings("unchecked") - public

P getPage(final WebWindow opener, final String target, final WebRequest params) - throws FailingHttpStatusCodeException, IOException { - return (P) getPage(openTargetWindow(opener, target, TARGET_SELF), params); - } - /** * Convenient method to build a URL and load it into the current WebWindow as it would be done * by {@link #getPage(WebWindow, WebRequest)}. @@ -560,7 +581,33 @@ public

P getPage(final WebRequest request) throws IOException, */ public Page loadWebResponseInto(final WebResponse webResponse, final WebWindow webWindow) throws IOException, FailingHttpStatusCodeException { + return loadWebResponseInto(webResponse, webWindow, false); + } + /** + * INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
+ * + *

Creates a page based on the specified response and inserts it into the specified window. All page + * initialization and event notification is handled here.

+ * + *

Note that if the page created is an attachment page, and an {@link AttachmentHandler} has been + * registered with this client, the page is not loaded into the specified window; in this case, + * the page is loaded into a new window, and attachment handling is delegated to the registered + * AttachmentHandler.

+ * + * @param webResponse the response that will be used to create the new page + * @param webWindow the window that the new page will be placed within + * @param forceAttachment handle this as attachment (is set to true if the call was triggered from + * anchor with download property set). + * @throws IOException if an IO error occurs + * @throws FailingHttpStatusCodeException if the server returns a failing status code AND the property + * {@link WebClientOptions#setThrowExceptionOnFailingStatusCode(boolean)} is set to true + * @return the newly created page + * @see #setAttachmentHandler(AttachmentHandler) + */ + public Page loadWebResponseInto(final WebResponse webResponse, final WebWindow webWindow, + final boolean forceAttachment) + throws IOException, FailingHttpStatusCodeException { WebAssert.notNull("webResponse", webResponse); WebAssert.notNull("webWindow", webWindow); @@ -573,7 +620,8 @@ public Page loadWebResponseInto(final WebResponse webResponse, final WebWindow w return webWindow.getEnclosedPage(); } - if (attachmentHandler_ != null && attachmentHandler_.isAttachment(webResponse)) { + if (attachmentHandler_ != null + && (forceAttachment || attachmentHandler_.isAttachment(webResponse))) { if (attachmentHandler_.handleAttachment(webResponse)) { // the handling is done by the attachment handler; // do not open a new window @@ -1024,8 +1072,7 @@ public WebWindow openWindow(final URL url, final String windowName, final WebWin if (getBrowserVersion().hasFeature(DIALOGWINDOW_REFERER) && openerPage != null && openerPage.getUrl() != null) { - final String referer = openerPage.getUrl().toExternalForm(); - request.setAdditionalHeader(HttpHeader.REFERER, referer); + request.setRefererlHeader(openerPage.getUrl()); } getPage(window, request); } @@ -1153,8 +1200,7 @@ public DialogWindow openDialogWindow(final URL url, final WebWindow opener, fina request.setCharset(UTF_8); if (getBrowserVersion().hasFeature(DIALOGWINDOW_REFERER) && openerPage != null) { - final String referer = openerPage.getUrl().toExternalForm(); - request.setAdditionalHeader(HttpHeader.REFERER, referer); + request.setRefererlHeader(openerPage.getUrl()); } getPage(window, request); @@ -1303,11 +1349,16 @@ private WebResponse makeWebResponseForDataUrl(final WebRequest webRequest) throw private static WebResponse makeWebResponseForAboutUrl(final WebRequest webRequest) throws MalformedURLException { final URL url = webRequest.getUrl(); - final String urlWithoutQuery = StringUtils.substringBefore(url.toExternalForm(), "?"); - if (!"blank".equalsIgnoreCase(StringUtils.substringAfter(urlWithoutQuery, WebClient.ABOUT_SCHEME))) { - throw new MalformedURLException(url + " is not supported, only about:blank is supported now."); + final String urlString = url.toExternalForm(); + if (UrlUtils.ABOUT_BLANK.equalsIgnoreCase(urlString)) { + return new StringWebResponse("", UrlUtils.URL_ABOUT_BLANK); + } + + final String urlWithoutQuery = StringUtils.substringBefore(urlString, "?"); + if (!"blank".equalsIgnoreCase(StringUtils.substringAfter(urlWithoutQuery, UrlUtils.ABOUT_SCHEME))) { + throw new MalformedURLException(url + " is not supported, only about:blank is supported at the moment."); } - return new StringWebResponse("", URL_ABOUT_BLANK); + return new StringWebResponse("", url); } /** @@ -1438,7 +1489,7 @@ private WebResponse makeWebResponseForJavaScriptUrl(final WebWindow webWindow, f */ public WebResponse loadWebResponse(final WebRequest webRequest) throws IOException { switch (webRequest.getUrl().getProtocol()) { - case "about": + case UrlUtils.ABOUT: return makeWebResponseForAboutUrl(webRequest); case "file": @@ -1514,6 +1565,7 @@ else if (value.startsWith("SOCKS")) { else if (!proxyConfig.shouldBypassProxy(webRequest.getUrl().getHost())) { webRequest.setProxyHost(proxyConfig.getProxyHost()); webRequest.setProxyPort(proxyConfig.getProxyPort()); + webRequest.setProxyScheme(proxyConfig.getProxyScheme()); webRequest.setSocksProxy(proxyConfig.isSocksProxy()); } } @@ -2037,7 +2089,7 @@ else if (window instanceof FrameWindow) { final FrameWindow fw = (FrameWindow) window; final String enclosingPageState = fw.getEnclosingPage().getDocumentElement().getReadyState(); final URL frameUrl = fw.getEnclosedPage().getUrl(); - if (!DomNode.READY_STATE_COMPLETE.equals(enclosingPageState) || frameUrl == URL_ABOUT_BLANK) { + if (!DomNode.READY_STATE_COMPLETE.equals(enclosingPageState) || frameUrl == UrlUtils.URL_ABOUT_BLANK) { return; } @@ -2280,14 +2332,18 @@ private static class LoadJob { private final WebResponse response_; private final WeakReference originalPage_; private final WebRequest request_; + private final boolean forceAttachment_; - LoadJob(final WebRequest request, final WebWindow requestingWindow, final String target, - final WebResponse response) { + // we can't us the WebRequest from the WebResponse because + // we need the original request e.g. after a redirect + LoadJob(final WebRequest request, final WebResponse response, + final WebWindow requestingWindow, final String target, final boolean forceAttachment) { request_ = request; requestingWindow_ = requestingWindow; target_ = target; response_ = response; originalPage_ = new WeakReference<>(requestingWindow.getEnclosedPage()); + forceAttachment_ = forceAttachment; } public boolean isOutdated() { @@ -2318,10 +2374,14 @@ public boolean isOutdated() { * @param request the request to perform * @param checkHash if true check for hashChenage * @param forceLoad if true always load the request even if there is already the same in the queue + * @param forceAttachment if true the AttachmentHandler isAttachment() method is not called, the + * response has to be handled as attachment in any case * @param description information about the origin of the request. Useful for debugging. */ public void download(final WebWindow requestingWindow, final String target, - final WebRequest request, final boolean checkHash, final boolean forceLoad, final String description) { + final WebRequest request, final boolean checkHash, final boolean forceLoad, + final boolean forceAttachment, final String description) { + final WebWindow targetWindow = resolveWindow(requestingWindow, target); final URL url = request.getUrl(); boolean justHashJump = false; @@ -2350,11 +2410,11 @@ public void download(final WebWindow requestingWindow, final String target, synchronized (loadQueue_) { // verify if this load job doesn't already exist - for (final LoadJob loadJob : loadQueue_) { - if (loadJob.response_ == null) { + for (final LoadJob otherLoadJob : loadQueue_) { + if (otherLoadJob.response_ == null) { continue; } - final WebRequest otherRequest = loadJob.request_; + final WebRequest otherRequest = otherLoadJob.request_; final URL otherUrl = otherRequest.getUrl(); // TODO: investigate but it seems that IE considers query string too but not FF @@ -2378,7 +2438,7 @@ public void download(final WebWindow requestingWindow, final String target, LOG.error("NoHttpResponseException while downloading; generating a NoHttpResponse", e); response = new WebResponse(RESPONSE_DATA_NO_HTTP_RESPONSE, request, 0); } - loadJob = new LoadJob(request, requestingWindow, target, response); + loadJob = new LoadJob(request, response, requestingWindow, target, forceAttachment); } catch (final IOException e) { throw new RuntimeException(e); @@ -2428,9 +2488,9 @@ public void loadDownloadedResponses() throws FailingHttpStatusCodeException, IOE continue; } - final WebWindow win = openTargetWindow(loadJob.requestingWindow_, loadJob.target_, "_self"); + final WebWindow win = openTargetWindow(loadJob.requestingWindow_, loadJob.target_, TARGET_SELF); final Page pageBeforeLoad = win.getEnclosedPage(); - loadWebResponseInto(loadJob.response_, win); + loadWebResponseInto(loadJob.response_, win, loadJob.forceAttachment_); // start execution here. if (scriptEngine_ != null) { @@ -2605,4 +2665,46 @@ public boolean isJavaScriptEnabled() { public boolean isJavaScriptEngineEnabled() { return javaScriptEngineEnabled_; } + + /** + * Parses the given XHtml code string and loads the resulting XHtmlPage into + * the current window. + * + * @param htmlCode the html code as string + * @return the HtmlPage + * @throws IOException in case of error + */ + public HtmlPage loadHtmlCodeIntoCurrentWindow(final String htmlCode) throws IOException { + final HTMLParser htmlParser = getPageCreator().getHtmlParser(); + final WebWindow webWindow = getCurrentWindow(); + + final StringWebResponse webResponse = + new StringWebResponse(htmlCode, new URL("http://htmlunit.sourceforge.net/dummy.html")); + final HtmlPage page = new HtmlPage(webResponse, webWindow); + webWindow.setEnclosedPage(page); + + htmlParser.parse(webResponse, page, true); + return page; + } + + /** + * Parses the given XHtml code string and loads the resulting XHtmlPage into + * the current window. + * + * @param xhtmlCode the xhtml code as string + * @return the XHtmlPage + * @throws IOException in case of error + */ + public XHtmlPage loadXHtmlCodeIntoCurrentWindow(final String xhtmlCode) throws IOException { + final HTMLParser htmlParser = getPageCreator().getHtmlParser(); + final WebWindow webWindow = getCurrentWindow(); + + final StringWebResponse webResponse = + new StringWebResponse(xhtmlCode, new URL("http://htmlunit.sourceforge.net/dummy.html")); + final XHtmlPage page = new XHtmlPage(webResponse, webWindow); + webWindow.setEnclosedPage(page); + + htmlParser.parse(webResponse, page, true); + return page; + } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebClientInternals.java b/src/main/java/com/gargoylesoftware/htmlunit/WebClientInternals.java index aff434436..247b5fda2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebClientInternals.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebClientInternals.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebClientOptions.java b/src/main/java/com/gargoylesoftware/htmlunit/WebClientOptions.java index cdd8de555..85cf8e8f2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebClientOptions.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebClientOptions.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebConnection.java b/src/main/java/com/gargoylesoftware/htmlunit/WebConnection.java index b19e740a4..ba27691c4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebConnection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebConsole.java b/src/main/java/com/gargoylesoftware/htmlunit/WebConsole.java index 692f68c4e..c2e44ba2b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebConsole.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebConsole.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebRequest.java b/src/main/java/com/gargoylesoftware/htmlunit/WebRequest.java index 970b99300..864807331 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebRequest.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebRequest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import java.io.ObjectOutputStream; import java.io.Serializable; import java.net.IDN; +import java.net.MalformedURLException; import java.net.URL; import java.nio.charset.Charset; import java.util.Collections; @@ -63,6 +64,7 @@ public enum HttpHint { private String url_; // String instead of java.net.URL because "about:blank" URLs don't serialize correctly private String proxyHost_; private int proxyPort_; + private String proxyScheme_; private boolean isSocksProxy_; private HttpMethod httpMethod_ = HttpMethod.GET; private FormEncodingType encodingType_ = FormEncodingType.URL_ENCODED; @@ -98,7 +100,7 @@ public WebRequest(final URL url, final String acceptHeader, final String acceptE * @return a new request for about:blank */ public static WebRequest newAboutBlankRequest() { - return new WebRequest(WebClient.URL_ABOUT_BLANK, "*/*", "gzip, deflate"); + return new WebRequest(UrlUtils.URL_ABOUT_BLANK, "*/*", "gzip, deflate"); } /** @@ -246,6 +248,22 @@ public void setProxyPort(final int proxyPort) { proxyPort_ = proxyPort; } + /** + * Returns the proxy scheme to use. + * @return the proxy scheme to use + */ + public String getProxyScheme() { + return proxyScheme_; + } + + /** + * Sets the proxy scheme to use. + * @param proxyScheme the proxy scheme to use + */ + public void setProxyScheme(final String proxyScheme) { + proxyScheme_ = proxyScheme; + } + /** * Returns whether SOCKS proxy or not. * @return whether SOCKS proxy or not @@ -412,6 +430,23 @@ public String getAdditionalHeader(final String name) { return additionalHeaders_.get(newKey); } + /** + * Sets the referer HTTP header - only if the provided url is valid. + * @param url the url for the referer HTTP header + */ + public void setRefererlHeader(final URL url) { + if (url == null || !url.getProtocol().startsWith("http")) { + return; + } + + try { + setAdditionalHeader(HttpHeader.REFERER, UrlUtils.getUrlWithoutRef(url).toExternalForm()); + } + catch (final MalformedURLException e) { + // bad luck us the whole url from the pager + } + } + /** * Sets the specified name/value pair in the additional HTTP headers. * @param name the name of the additional HTTP header diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebResponse.java b/src/main/java/com/gargoylesoftware/htmlunit/WebResponse.java index ec9fdf7d1..954776e1d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebResponse.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebResponse.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebResponseData.java b/src/main/java/com/gargoylesoftware/htmlunit/WebResponseData.java index 4a5fbdddf..6c87c2c6a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebResponseData.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebResponseData.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebResponseFromCache.java b/src/main/java/com/gargoylesoftware/htmlunit/WebResponseFromCache.java index ad00d818e..3c9c873ec 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebResponseFromCache.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebResponseFromCache.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebWindow.java b/src/main/java/com/gargoylesoftware/htmlunit/WebWindow.java index 7297ee6e3..80fc5f434 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebWindow.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebWindow.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebWindowAdapter.java b/src/main/java/com/gargoylesoftware/htmlunit/WebWindowAdapter.java index 5c02d4e72..ce5a9883a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebWindowAdapter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebWindowAdapter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebWindowEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/WebWindowEvent.java index fc47cd498..a56e66fb6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebWindowEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebWindowEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebWindowImpl.java b/src/main/java/com/gargoylesoftware/htmlunit/WebWindowImpl.java index b97b44076..d611f8cb7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebWindowImpl.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebWindowImpl.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebWindowListener.java b/src/main/java/com/gargoylesoftware/htmlunit/WebWindowListener.java index 77187d0b8..8f83dc91e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebWindowListener.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebWindowListener.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/WebWindowNotFoundException.java b/src/main/java/com/gargoylesoftware/htmlunit/WebWindowNotFoundException.java index 0ead570b1..dbc259a75 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/WebWindowNotFoundException.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/WebWindowNotFoundException.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLActiveXObjectFactory.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLActiveXObjectFactory.java index b5dca2613..28998f171 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLActiveXObjectFactory.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLActiveXObjectFactory.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLConfiguration.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLConfiguration.java index f64de59d7..bc8e37226 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLConfiguration.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLConfiguration.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLJavaScriptEnvironment.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLJavaScriptEnvironment.java index 5b326d1e9..833447b11 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLJavaScriptEnvironment.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLJavaScriptEnvironment.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLScriptable.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLScriptable.java index e0e40c350..9e6c6b6a5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLScriptable.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/MSXMLScriptable.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -104,7 +104,7 @@ public Scriptable getPrototype(final Class javaScrip @Override protected boolean isReadOnlySettable(final String name, final Object value) { - throw ScriptRuntime.typeError3("msg.set.prop.no.setter", + throw ScriptRuntime.typeErrorById("msg.set.prop.no.setter", name, getClassName(), Context.toString(value)); } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMAttribute.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMAttribute.java index e9f0940af..8b912d077 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMAttribute.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMAttribute.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCDATASection.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCDATASection.java index 404efad42..41b4ddc32 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCDATASection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCDATASection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCharacterData.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCharacterData.java index a14f18293..dd950ff83 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCharacterData.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCharacterData.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMComment.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMComment.java index f7c4a508e..d44564fb4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMComment.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMComment.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocument.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocument.java index fa8388405..0ab9ba0ee 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocument.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocument.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentFragment.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentFragment.java index c12846dc3..05e7e8e84 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentFragment.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentFragment.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentType.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentType.java index 874106a50..e78c1f164 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentType.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentType.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMElement.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMElement.java index 1753616ed..b5639dd37 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMImplementation.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMImplementation.java index 6b96e659c..55d5df33e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMImplementation.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMImplementation.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNamedNodeMap.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNamedNodeMap.java index f26d10104..1f5afd32d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNamedNodeMap.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNamedNodeMap.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNode.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNode.java index b2233c82b..bbdb987f4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNodeList.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNodeList.java index 0ac66d2d3..ef612ba2e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNodeList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNodeList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMParseError.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMParseError.java index 975abf85e..17e7af622 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMParseError.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMParseError.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMProcessingInstruction.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMProcessingInstruction.java index b6c561357..884185883 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMProcessingInstruction.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMProcessingInstruction.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMSelection.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMSelection.java index ab46a08c5..2d2507da4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMSelection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMSelection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMText.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMText.java index 07fddbf97..31d843555 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMText.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMText.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLHTTPRequest.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLHTTPRequest.java index b1cb11ffe..d98986341 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLHTTPRequest.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLHTTPRequest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLSerializer.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLSerializer.java index a70d2af54..b262b1fa0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLSerializer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLSerializer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XSLProcessor.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XSLProcessor.java index 2bda2e313..a91420e99 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XSLProcessor.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XSLProcessor.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XSLTemplate.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XSLTemplate.java index 2100081a1..720ee3793 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XSLTemplate.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XSLTemplate.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/package-info.java index c4759053e..9a8ee21f0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/attachment/Attachment.java b/src/main/java/com/gargoylesoftware/htmlunit/attachment/Attachment.java index ba70484c2..7c8d9f5b3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/attachment/Attachment.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/attachment/Attachment.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/attachment/AttachmentHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/attachment/AttachmentHandler.java index a2f1f3d9a..d706a1813 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/attachment/AttachmentHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/attachment/AttachmentHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -48,9 +48,10 @@ public interface AttachmentHandler extends Serializable { /** - * Handles the specified attached page. + * Handles the specified attached page. This is some kind of information + * that the page was handled as attachment. * This method will only be called if {@link #handleAttachment(WebResponse)} - * has retund false for the response.. + * has returned false for the response.. * @param page an attached page, which doesn't get loaded inline */ void handleAttachment(Page page); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/attachment/CollectingAttachmentHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/attachment/CollectingAttachmentHandler.java index bd0fc6774..57d506c75 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/attachment/CollectingAttachmentHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/attachment/CollectingAttachmentHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/attachment/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/attachment/package-info.java index 9863db437..d85f333d1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/attachment/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/attachment/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/css/StyleElement.java b/src/main/java/com/gargoylesoftware/htmlunit/css/StyleElement.java index 643bb04eb..424382dc9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/css/StyleElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/css/StyleElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/css/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/css/package-info.java index 4a872fdc4..5b2ca3e8b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/css/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/css/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/AbstractDomNodeList.java b/src/main/java/com/gargoylesoftware/htmlunit/html/AbstractDomNodeList.java index f14ef81b9..481a59f56 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/AbstractDomNodeList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/AbstractDomNodeList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/BaseFrameElement.java b/src/main/java/com/gargoylesoftware/htmlunit/html/BaseFrameElement.java index 764205cd4..031008f91 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/BaseFrameElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/BaseFrameElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,6 +14,7 @@ */ package com.gargoylesoftware.htmlunit.html; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.FRAME_LOCATION_ABOUT_BLANK_FOR_ABOUT_SCHEME; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.URL_MINIMAL_QUERY_ENCODING; import java.io.IOException; @@ -29,7 +30,6 @@ import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; import com.gargoylesoftware.htmlunit.FrameContentHandler; -import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.SgmlPage; import com.gargoylesoftware.htmlunit.WebClient; @@ -80,7 +80,7 @@ protected BaseFrameElement(final String qualifiedName, final SgmlPage page, // if created by the HTMLParser the src attribute is not set via setAttribute() or some other method but is // part of the given attributes already. final String src = getSrcAttribute(); - if (src != ATTRIBUTE_NOT_DEFINED && !WebClient.ABOUT_BLANK.equals(src)) { + if (src != ATTRIBUTE_NOT_DEFINED && !UrlUtils.ABOUT_BLANK.equals(src)) { loadSrcWhenAddedToPage_ = true; } } @@ -117,8 +117,12 @@ private void init() { public void loadInnerPage() throws FailingHttpStatusCodeException { String source = getSrcAttribute(); - if (source.isEmpty() || StringUtils.startsWithIgnoreCase(source, WebClient.ABOUT_SCHEME)) { - source = WebClient.ABOUT_BLANK; + if (source.isEmpty()) { + source = UrlUtils.ABOUT_BLANK; + } + else if (StringUtils.startsWithIgnoreCase(source, UrlUtils.ABOUT_SCHEME) + && hasFeature(FRAME_LOCATION_ABOUT_BLANK_FOR_ABOUT_SCHEME)) { + source = UrlUtils.ABOUT_BLANK; } loadInnerPageIfPossible(source); @@ -127,9 +131,9 @@ public void loadInnerPage() throws FailingHttpStatusCodeException { if (enclosedPage != null && enclosedPage.isHtmlPage()) { final HtmlPage htmlPage = (HtmlPage) enclosedPage; - final AbstractJavaScriptEngine jsEngine = getPage().getWebClient().getJavaScriptEngine(); + final AbstractJavaScriptEngine jsEngine = htmlPage.getWebClient().getJavaScriptEngine(); if (jsEngine != null && jsEngine.isScriptRunning()) { - final PostponedAction action = new PostponedAction(getPage()) { + final PostponedAction action = new PostponedAction(getPage(), "BaseFrame.loadInnerPage") { @Override public void execute() throws Exception { htmlPage.setReadyState(READY_STATE_COMPLETE); @@ -173,7 +177,7 @@ private void loadInnerPageIfPossible(final String src) throws FailingHttpStatusC final WebClient webClient = getPage().getWebClient(); final FrameContentHandler handler = webClient.getFrameContentHandler(); if (null != handler && !handler.loadFrameDocument(this)) { - source = WebClient.ABOUT_BLANK; + source = UrlUtils.ABOUT_BLANK; } if (!source.isEmpty()) { @@ -188,7 +192,7 @@ private void loadInnerPageIfPossible(final String src) throws FailingHttpStatusC final WebRequest request = new WebRequest(url); request.setCharset(getPage().getCharset()); - request.setAdditionalHeader(HttpHeader.REFERER, getPage().getUrl().toExternalForm()); + request.setRefererlHeader(getPage().getUrl()); if (isAlreadyLoadedByAncestor(url, request.getCharset())) { notifyIncorrectness("Recursive src attribute of " + getTagName() + ": url=[" + source + "]. Ignored."); @@ -387,7 +391,7 @@ protected void setAttributeNS(final String namespaceURI, final String qualifiedN // do not use equals() here // see HTMLIFrameElement2Test.documentCreateElement_onLoad_srcAboutBlank() - if (SRC_ATTRIBUTE.equals(qualifiedName) && WebClient.ABOUT_BLANK != attributeValue) { + if (SRC_ATTRIBUTE.equals(qualifiedName) && UrlUtils.ABOUT_BLANK != attributeValue) { if (isAttachedToPage()) { loadSrc(); } @@ -410,7 +414,7 @@ public Attr setAttributeNode(final Attr attribute) { final Attr result = super.setAttributeNode(attribute); - if (SRC_ATTRIBUTE.equals(qualifiedName) && !WebClient.ABOUT_BLANK.equals(attributeValue)) { + if (SRC_ATTRIBUTE.equals(qualifiedName) && !UrlUtils.ABOUT_BLANK.equals(attributeValue)) { if (isAttachedToPage()) { loadSrc(); } @@ -426,6 +430,11 @@ private void loadSrc() { loadSrcWhenAddedToPage_ = false; final String src = getSrcAttribute(); + // recreate a window if the old one was closed + if (enclosedWindow_.isClosed()) { + init(); + } + final AbstractJavaScriptEngine jsEngine = getPage().getWebClient().getJavaScriptEngine(); // When src is set from a script, loading is postponed until script finishes // in fact this implementation is probably wrong: JavaScript URL should be @@ -436,7 +445,7 @@ private void loadSrc() { } else { final Page pageInFrame = getEnclosedPage(); - final PostponedAction action = new PostponedAction(getPage()) { + final PostponedAction action = new PostponedAction(getPage(), "BaseFrame.loadSrc") { @Override public void execute() throws Exception { if (!src.isEmpty() && getSrcAttribute().equals(src)) { @@ -454,15 +463,6 @@ public boolean isStillAlive() { } } - @Override - protected void onAddedToPage() { - super.onAddedToPage(); - - if (loadSrcWhenAddedToPage_) { - loadSrc(); - } - } - /** * INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
* @@ -505,13 +505,57 @@ public DomNode cloneNode(final boolean deep) { return clone; } - /** - * Remove our window also. - * {@inheritDoc} - */ + @Override + protected void onAddedToPage() { + super.onAddedToPage(); + + if (loadSrcWhenAddedToPage_) { + loadSrc(); + } + } + @Override public void remove() { super.remove(); + loadSrcWhenAddedToPage_ = true; getEnclosedWindow().close(); } + + @Override + public final void removeAttribute(final String attributeName) { + super.removeAttribute(attributeName); + + // TODO find a better implementation without all the code duplication + if (isAttachedToPage()) { + loadSrcWhenAddedToPage_ = false; + final String src = getSrcAttribute(); + + final AbstractJavaScriptEngine jsEngine = getPage().getWebClient().getJavaScriptEngine(); + // When src is set from a script, loading is postponed until script finishes + // in fact this implementation is probably wrong: JavaScript URL should be + // first evaluated and only loading, when any, should be postponed. + if (jsEngine == null || !jsEngine.isScriptRunning()) { + loadInnerPageIfPossible(src); + } + else { + final Page pageInFrame = getEnclosedPage(); + final PostponedAction action = new PostponedAction(getPage(), "BaseFrame.removeAttribute") { + @Override + public void execute() throws Exception { + loadInnerPage(); + } + + @Override + public boolean isStillAlive() { + // skip if page in frame has already been changed + return super.isStillAlive() && pageInFrame == getEnclosedPage(); + } + }; + jsEngine.addPostponedAction(action); + } + } + else { + loadSrcWhenAddedToPage_ = true; + } + } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/CharacterDataChangeEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/html/CharacterDataChangeEvent.java index 49459aeda..6d577d8b3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/CharacterDataChangeEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/CharacterDataChangeEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/CharacterDataChangeListener.java b/src/main/java/com/gargoylesoftware/htmlunit/html/CharacterDataChangeListener.java index fc7bdf96d..daba9266f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/CharacterDataChangeListener.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/CharacterDataChangeListener.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactory.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactory.java index 495cdad4a..16aa57779 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactory.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactory.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -67,7 +67,7 @@ public class DefaultElementFactory implements ElementFactory { HtmlBlink.TAG_NAME, HtmlBlockQuote.TAG_NAME, HtmlBody.TAG_NAME, HtmlBold.TAG_NAME, HtmlBreak.TAG_NAME, HtmlButton.TAG_NAME, HtmlCanvas.TAG_NAME, HtmlCaption.TAG_NAME, HtmlCenter.TAG_NAME, HtmlCitation.TAG_NAME, HtmlCode.TAG_NAME, - HtmlCommand.TAG_NAME, HtmlContent.TAG_NAME, HtmlData.TAG_NAME, HtmlDataList.TAG_NAME, + HtmlCommand.TAG_NAME, HtmlData.TAG_NAME, HtmlDataList.TAG_NAME, HtmlDefinition.TAG_NAME, HtmlDefinitionDescription.TAG_NAME, HtmlDeletedText.TAG_NAME, HtmlDetails.TAG_NAME, HtmlDialog.TAG_NAME, HtmlDirectory.TAG_NAME, HtmlDivision.TAG_NAME, HtmlDefinitionList.TAG_NAME, @@ -285,10 +285,6 @@ public HtmlElement createElementNS(final SgmlPage page, final String namespaceUR element = new HtmlCommand(qualifiedName, page, attributeMap); break; - case HtmlContent.TAG_NAME: - element = new HtmlContent(qualifiedName, page, attributeMap); - break; - case HtmlData.TAG_NAME: element = new HtmlData(qualifiedName, page, attributeMap); break; diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DisabledElement.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DisabledElement.java index 65207cde3..1dc03b133 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DisabledElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DisabledElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DoTypeProcessor.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DoTypeProcessor.java index 0c048381d..b55227231 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DoTypeProcessor.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DoTypeProcessor.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomAttr.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomAttr.java index b9e72115c..5f56477b0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomAttr.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomAttr.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomCDataSection.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomCDataSection.java index d7a8edddb..849ba323c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomCDataSection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomCDataSection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomChangeEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomChangeEvent.java index 64493ec4c..ad4e4d522 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomChangeEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomChangeEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomChangeListener.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomChangeListener.java index 4d5fbde4b..976e3e5de 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomChangeListener.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomChangeListener.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomCharacterData.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomCharacterData.java index e98d9da92..91622b097 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomCharacterData.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomCharacterData.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomComment.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomComment.java index 8ff812005..4be17cef2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomComment.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomComment.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomDocumentFragment.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomDocumentFragment.java index b7f6003b5..2d557daf6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomDocumentFragment.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomDocumentFragment.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomDocumentType.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomDocumentType.java index 17a1157e5..a89caa58a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomDocumentType.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomDocumentType.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomElement.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomElement.java index b7b0c8b51..63dd41a18 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -850,7 +850,11 @@ public String toString() { * Simulates clicking on this element, returning the page in the window that has the focus * after the element has been clicked. Note that the returned page may or may not be the same * as the original page, depending on the type of element being clicked, the presence of JavaScript - * action listeners, etc. + * action listeners, etc.
+ * This only clicks the element if it is visible and enabled (isDisplayed() & !isDisabled()). + * In case the element is not visible and/or disabled, only a log output is generated. + *
+ * If you circumvent the visible/disabled check use click(shiftKey, ctrlKey, altKey, true, true, false) * * @param

the page type * @return the page contained in the current window as returned by {@link WebClient#getCurrentWindow()} @@ -864,7 +868,11 @@ public

P click() throws IOException { * Simulates clicking on this element, returning the page in the window that has the focus * after the element has been clicked. Note that the returned page may or may not be the same * as the original page, depending on the type of element being clicked, the presence of JavaScript - * action listeners, etc. + * action listeners, etc.
+ * This only clicks the element if it is visible and enabled (isDisplayed() & !isDisabled()). + * In case the element is not visible and/or disabled, only a log output is generated. + *
+ * If you circumvent the visible/disabled check use click(shiftKey, ctrlKey, altKey, true, true, false) * * @param shiftKey {@code true} if SHIFT is pressed during the click * @param ctrlKey {@code true} if CTRL is pressed during the click @@ -883,7 +891,11 @@ public

P click(final boolean shiftKey, final boolean ctrlKey, f * Simulates clicking on this element, returning the page in the window that has the focus * after the element has been clicked. Note that the returned page may or may not be the same * as the original page, depending on the type of element being clicked, the presence of JavaScript - * action listeners, etc. + * action listeners, etc.
+ * This only clicks the element if it is visible and enabled (isDisplayed() & !isDisabled()). + * In case the element is not visible and/or disabled, only a log output is generated. + *
+ * If you circumvent the visible/disabled check use click(shiftKey, ctrlKey, altKey, true, true, false) * * @param shiftKey {@code true} if SHIFT is pressed during the click * @param ctrlKey {@code true} if CTRL is pressed during the click diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomNamespaceNode.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomNamespaceNode.java index ec7a90e0c..ecc522e91 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomNamespaceNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomNamespaceNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java index 82bfe7fda..2f4727c8f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -55,6 +55,8 @@ import com.gargoylesoftware.htmlunit.WebAssert; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlElement.DisplayStyle; +import com.gargoylesoftware.htmlunit.html.serializer.HtmlSerializerNormalizedText; +import com.gargoylesoftware.htmlunit.html.serializer.HtmlSerializerVisibleText; import com.gargoylesoftware.htmlunit.html.xpath.XPathHelper; import com.gargoylesoftware.htmlunit.javascript.SimpleScriptable; import com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleDeclaration; @@ -788,6 +790,18 @@ public boolean mayBeDisplayed() { return true; } + /** + * Returns a normalized textual representation of this element that represents + * what would be visible to the user if this page was shown in a web browser. + * Whitespace is normalized like in the browser and block tags are separated by '\n'. + * + * @return a normalized textual representation of this element + */ + public String asNormalizedText() { + final HtmlSerializerNormalizedText ser = new HtmlSerializerNormalizedText(); + return ser.asText(this); + } + /** * Returns a textual representation of this element that represents what would * be visible to the user if this page was shown in a web browser. For example, @@ -796,7 +810,10 @@ public boolean mayBeDisplayed() { * * @return a textual representation of this element that represents what would * be visible to the user if this page was shown in a web browser + * + * @deprecated as of version 2.48.0; use asNormalizedText() instead */ + @Deprecated public String asText() { if (getPage() instanceof XmlPage) { final XmlSerializer ser = new XmlSerializer(); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomNodeIterator.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomNodeIterator.java index 747b5c628..0a65b86b0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomNodeIterator.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomNodeIterator.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomNodeList.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomNodeList.java index 75e015ad1..5783fbe5d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomNodeList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomNodeList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomProcessingInstruction.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomProcessingInstruction.java index 1f9bc6754..1adc34a68 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomProcessingInstruction.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomProcessingInstruction.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomText.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomText.java index df4a3756e..bb82ed079 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomText.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomText.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/DomTreeWalker.java b/src/main/java/com/gargoylesoftware/htmlunit/html/DomTreeWalker.java index 4f585549d..c1fb6e742 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/DomTreeWalker.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/DomTreeWalker.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/ElementFactory.java b/src/main/java/com/gargoylesoftware/htmlunit/html/ElementFactory.java index a49de6088..35351e3e6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/ElementFactory.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/ElementFactory.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/ElementFromPointHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/html/ElementFromPointHandler.java index d80ce95ce..3c6b052ca 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/ElementFromPointHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/ElementFromPointHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/FormFieldWithNameHistory.java b/src/main/java/com/gargoylesoftware/htmlunit/html/FormFieldWithNameHistory.java index bdf441020..4aedfcc4e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/FormFieldWithNameHistory.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/FormFieldWithNameHistory.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/FrameWindow.java b/src/main/java/com/gargoylesoftware/htmlunit/html/FrameWindow.java index 770018988..442df05d1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/FrameWindow.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/FrameWindow.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -87,7 +87,8 @@ public WebWindow getTopWindow() { @Override protected boolean isJavaScriptInitializationNeeded(final Page page) { return getScriptableObject() == null - || !(page.getWebResponse() instanceof StringWebResponse); + || !(page.getWebResponse() instanceof StringWebResponse + && ((StringWebResponse) page.getWebResponse()).isFromJavascript()); // TODO: find a better way to distinguish content written by document.open(),... } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/Html.java b/src/main/java/com/gargoylesoftware/htmlunit/html/Html.java index b38242343..dcca95901 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/Html.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/Html.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAbbreviated.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAbbreviated.java index e4d6c7466..12a0507b4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAbbreviated.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAbbreviated.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAcronym.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAcronym.java index 019022ee7..bf9c0d3aa 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAcronym.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAcronym.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAddress.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAddress.java index 40b1eb4cc..a2ff2eceb 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAddress.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAddress.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAnchor.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAnchor.java index 4b990e760..01cec4364 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAnchor.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAnchor.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -31,6 +31,7 @@ import com.gargoylesoftware.htmlunit.HttpMethod; import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.SgmlPage; +import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.WebRequest; import com.gargoylesoftware.htmlunit.WebWindow; import com.gargoylesoftware.htmlunit.javascript.host.event.Event; @@ -132,13 +133,14 @@ protected void doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey, } final String target; - if (shiftKey || ctrlKey) { - target = "_blank"; + if (shiftKey || ctrlKey || ATTRIBUTE_NOT_DEFINED != getDownloadAttribute()) { + target = WebClient.TARGET_BLANK; } else { target = page.getResolvedTarget(getTargetAttribute()); } - final WebWindow win = page.getWebClient().openTargetWindow(page.getEnclosingWindow(), target, "_self"); + final WebWindow win = page.getWebClient().openTargetWindow(page.getEnclosingWindow(), + target, WebClient.TARGET_SELF); Page enclosedPage = win.getEnclosedPage(); if (enclosedPage == null) { win.getWebClient().getPage(win, WebRequest.newAboutBlankRequest()); @@ -153,14 +155,15 @@ protected void doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey, final URL url = getTargetUrl(href, page); - final BrowserVersion browser = page.getWebClient().getBrowserVersion(); + final WebClient webClient = page.getWebClient(); + final BrowserVersion browser = webClient.getBrowserVersion(); if (ATTRIBUTE_NOT_DEFINED != getPingAttribute() && browser.hasFeature(ANCHOR_SEND_PING_REQUEST)) { final URL pingUrl = getTargetUrl(getPingAttribute(), page); final WebRequest pingRequest = new WebRequest(pingUrl, HttpMethod.POST); pingRequest.setAdditionalHeader(HttpHeader.PING_FROM, page.getUrl().toExternalForm()); pingRequest.setAdditionalHeader(HttpHeader.PING_TO, url.toExternalForm()); pingRequest.setRequestBody("PING"); - page.getWebClient().loadWebResponse(pingRequest); + webClient.loadWebResponse(pingRequest); } final WebRequest webRequest = new WebRequest(url, browser.getHtmlAcceptHeader(), @@ -168,7 +171,7 @@ protected void doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey, // use the page encoding even if this is a GET requests webRequest.setCharset(page.getCharset()); - webRequest.setAdditionalHeader(HttpHeader.REFERER, page.getUrl().toExternalForm()); + webRequest.setRefererlHeader(page.getUrl()); if (LOG.isDebugEnabled()) { LOG.debug( "Getting page for " + url.toExternalForm() @@ -176,14 +179,18 @@ protected void doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey, + "', using the originating URL " + page.getUrl()); } + final String target; - if (shiftKey || ctrlKey) { - target = "_blank"; + if (shiftKey || ctrlKey + || (webClient.getAttachmentHandler() == null + && ATTRIBUTE_NOT_DEFINED != getDownloadAttribute())) { + target = WebClient.TARGET_BLANK; } else { target = page.getResolvedTarget(getTargetAttribute()); } - page.getWebClient().download(page.getEnclosingWindow(), target, webRequest, true, false, "Link click"); + page.getWebClient().download(page.getEnclosingWindow(), target, webRequest, + true, false, ATTRIBUTE_NOT_DEFINED != getDownloadAttribute(), "Link click"); } /** @@ -427,4 +434,12 @@ public final String getPingAttribute() { return getAttributeDirect("ping"); } + /** + * Returns the value of the attribute {@code download}. + * + * @return the value of the attribute {@code download} + */ + public final String getDownloadAttribute() { + return getAttributeDirect("download"); + } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlApplet.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlApplet.java index 6eb64b02e..bf128a9f8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlApplet.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlApplet.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlArea.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlArea.java index a2aaa2230..ca4ae25e7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlArea.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlArea.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -30,7 +30,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.SgmlPage; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.WebRequest; @@ -97,12 +96,11 @@ protected boolean doClickStateUpdate(final boolean shiftKey, final boolean ctrlK } final WebRequest request = new WebRequest(url); request.setCharset(page.getCharset()); - request.setAdditionalHeader(HttpHeader.REFERER, page.getUrl().toExternalForm()); + request.setRefererlHeader(page.getUrl()); final WebWindow webWindow = enclosingPage.getEnclosingWindow(); - webClient.getPage( - webWindow, - enclosingPage.getResolvedTarget(getTargetAttribute()), - request); + + final String target = enclosingPage.getResolvedTarget(getTargetAttribute()); + webClient.getPage(webClient.openTargetWindow(webWindow, target, WebClient.TARGET_SELF), request); } return false; } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlArticle.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlArticle.java index 2aacbab15..2019a469f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlArticle.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlArticle.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAside.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAside.java index e82f70178..7208634ea 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAside.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAside.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAttributeChangeEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAttributeChangeEvent.java index b64b83652..c0c9d8913 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAttributeChangeEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAttributeChangeEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAttributeChangeListener.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAttributeChangeListener.java index e912b73fd..ae4b4731b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAttributeChangeListener.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAttributeChangeListener.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAudio.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAudio.java index a3cfb3bf4..5bde86e7a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAudio.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlAudio.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBackgroundSound.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBackgroundSound.java index a4ce99947..612f4a593 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBackgroundSound.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBackgroundSound.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBase.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBase.java index e900ebfb5..702065113 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBase.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBase.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBaseFont.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBaseFont.java index 6cf96887b..03dd6ace1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBaseFont.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBaseFont.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBidirectionalIsolation.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBidirectionalIsolation.java index c6cb6eeba..ffc4e9d82 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBidirectionalIsolation.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBidirectionalIsolation.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBidirectionalOverride.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBidirectionalOverride.java index b9b8c072f..0c5237c58 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBidirectionalOverride.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBidirectionalOverride.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBig.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBig.java index 3caa42fe7..24be64407 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBig.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBig.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBlink.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBlink.java index d81e46f9f..54f4c295f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBlink.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBlink.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBlockQuote.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBlockQuote.java index 7a94a6d5b..287a69158 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBlockQuote.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBlockQuote.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBody.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBody.java index cfffafec3..89f79dc22 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBody.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBody.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBold.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBold.java index a8c5535c4..c1c382922 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBold.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBold.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBreak.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBreak.java index 39419683c..19b9dd048 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBreak.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlBreak.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlButton.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlButton.java index bd6c8b96c..aaa66c8e3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlButton.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlButton.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlButtonInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlButtonInput.java index 5f5218476..fb7e0c7be 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlButtonInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlButtonInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCanvas.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCanvas.java index e4084bbe3..fbfafef44 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCanvas.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCanvas.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCaption.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCaption.java index 1a5f089a0..fa634d730 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCaption.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCaption.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCenter.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCenter.java index 7a77d7289..9a875d748 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCenter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCenter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCheckBoxInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCheckBoxInput.java index c25719824..4753bb35d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCheckBoxInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCheckBoxInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -125,9 +125,12 @@ public Page setChecked(final boolean isChecked) { /** * A checkbox does not have a textual representation, * but we invent one for it because it is useful for testing. + * * @return "checked" or "unchecked" according to the radio state + * + * @deprecated as of version 2.48.0; use asNormalizedText() instead */ - // we need to preserve this method as it is there since many versions with the above documentation. + @Deprecated @Override public String asText() { return super.asText(); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCitation.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCitation.java index 1b262a9c3..15eebe797 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCitation.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCitation.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCode.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCode.java index 0a6290c4f..a685e5ae8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlColorInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlColorInput.java index 06eeb39ab..26e25647e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlColorInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlColorInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCommand.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCommand.java index aa8ee471d..d67d93673 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCommand.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlCommand.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlContent.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlContent.java deleted file mode 100644 index e42059b1a..000000000 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlContent.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2002-2021 Gargoyle Software Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.gargoylesoftware.htmlunit.html; - -import java.util.Map; - -import com.gargoylesoftware.htmlunit.SgmlPage; - -/** - * Wrapper for the HTML element "content". - * - * @author Ahmed Ashour - * @author Ronald Brill - */ -public class HtmlContent extends HtmlElement { - - /** The HTML tag represented by this element. */ - public static final String TAG_NAME = "content"; - - /** - * Creates a new instance. - * - * @param qualifiedName the qualified name of the element type to instantiate - * @param page the page that contains this element - * @param attributes the initial attributes - */ - HtmlContent(final String qualifiedName, final SgmlPage page, - final Map attributes) { - super(qualifiedName, page, attributes); - } - - /** - * {@inheritDoc} - */ - @Override - public DisplayStyle getDefaultStyleDisplay() { - return DisplayStyle.INLINE; - } -} diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlData.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlData.java index f99fca79b..8d42e9db3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlData.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlData.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDataList.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDataList.java index e7e52069d..56a6794a3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDataList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDataList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDateInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDateInput.java index caee4ea65..16f47458e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDateInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDateInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDateTimeLocalInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDateTimeLocalInput.java index 24932a798..dbf4e0d65 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDateTimeLocalInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDateTimeLocalInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinition.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinition.java index 817e8b18b..ca32262e5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinition.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinition.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionDescription.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionDescription.java index c1a3d521d..1f0e3cb0b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionDescription.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionDescription.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionList.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionList.java index d7b755b5f..3964b2839 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionTerm.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionTerm.java index 74c13178e..1bcb750c0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionTerm.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionTerm.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDeletedText.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDeletedText.java index 9dc8cbda1..df0f72f64 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDeletedText.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDeletedText.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDetails.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDetails.java index a9400a6ec..a4ff6efdb 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDetails.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDetails.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ * Wrapper for the HTML element "details". * * @author Ahmed Ashour + * @author Ronald Brill */ public class HtmlDetails extends HtmlElement { @@ -40,4 +41,11 @@ public class HtmlDetails extends HtmlElement { super(qualifiedName, page, attributes); } + /** + * Returns the {@code open} property. + * @return the {@code open} property + */ + public boolean isOpen() { + return hasAttribute("open"); + } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDialog.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDialog.java index cb4f4e13e..c71edbc48 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDialog.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDialog.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDirectory.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDirectory.java index 15e80f235..4c4ff6a3d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDirectory.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDirectory.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDivision.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDivision.java index 934b16271..7a4d9ffbd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDivision.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlDivision.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlElement.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlElement.java index d1ca48dec..97388b47d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -138,6 +138,8 @@ public String value() { */ public static final Short TAB_INDEX_OUT_OF_BOUNDS = new Short(Short.MIN_VALUE); + private static final String ATTRIBUTE_REQUIRED = "required"; + /** The listeners which are to be notified of attribute changes. */ private Collection attributeListeners_; @@ -310,7 +312,7 @@ public Attr setAttributeNode(final Attr attribute) { * @param attributeName the attribute attributeName */ @Override - public final void removeAttribute(final String attributeName) { + public void removeAttribute(final String attributeName) { final String value = getAttribute(attributeName); if (value == ATTRIBUTE_NOT_DEFINED) { return; @@ -1343,7 +1345,8 @@ public boolean isAltPressed() { * @return whether this element satisfies all form validation constraints set */ public boolean isValid() { - return !isRequiredSupported() || getAttributeDirect("required") == ATTRIBUTE_NOT_DEFINED + return !isRequiredSupported() + || getAttributeDirect(ATTRIBUTE_REQUIRED) == ATTRIBUTE_NOT_DEFINED || !getAttributeDirect("value").isEmpty(); } @@ -1356,11 +1359,17 @@ protected boolean isRequiredSupported() { } /** - * Returns the {@code required} attribute. - * @return the {@code required} attribute + * @return the true if the required attribute is set */ public boolean isRequired() { - return isRequiredSupported() && hasAttribute("required"); + return isRequiredSupported() && hasAttribute(ATTRIBUTE_REQUIRED); + } + + /** + * @return the true if the required attribute is supported and set + */ + public boolean isOptional() { + return isRequiredSupported() && !hasAttribute(ATTRIBUTE_REQUIRED); } /** @@ -1370,10 +1379,10 @@ public boolean isRequired() { public void setRequired(final boolean required) { if (isRequiredSupported()) { if (required) { - setAttribute("required", "required"); + setAttribute(ATTRIBUTE_REQUIRED, ATTRIBUTE_REQUIRED); } else { - removeAttribute("required"); + removeAttribute(ATTRIBUTE_REQUIRED); } } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlEmailInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlEmailInput.java index 8c7aa48c9..4e6c1ca1f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlEmailInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlEmailInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlEmbed.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlEmbed.java index d125db480..c5727c52c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlEmbed.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlEmbed.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,7 +24,6 @@ import org.apache.commons.io.IOUtils; -import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.SgmlPage; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.WebRequest; @@ -66,7 +65,7 @@ public void saveAs(final File file) throws IOException { final URL url = page.getFullyQualifiedUrl(getAttributeDirect(SRC_ATTRIBUTE)); final WebRequest request = new WebRequest(url); request.setCharset(page.getCharset()); - request.setAdditionalHeader(HttpHeader.REFERER, page.getUrl().toExternalForm()); + request.setRefererlHeader(page.getUrl()); final WebResponse webResponse = webclient.loadWebResponse(request); try (OutputStream fos = Files.newOutputStream(file.toPath()); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlEmphasis.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlEmphasis.java index e6f5bedff..1c9619730 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlEmphasis.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlEmphasis.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlExample.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlExample.java index 5ac022a4a..42388b033 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlExample.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlExample.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFieldSet.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFieldSet.java index c1f6b60c1..a32f92bd6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFieldSet.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFieldSet.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFigure.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFigure.java index 5052f6e6c..a6248fcbc 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFigure.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFigure.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFigureCaption.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFigureCaption.java index 9c8f3724f..8d80535d3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFigureCaption.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFigureCaption.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFileInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFileInput.java index 85106c308..3fb645deb 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFileInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFileInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,9 +19,11 @@ import java.net.URISyntaxException; import java.nio.charset.Charset; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import java.util.Map; +import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; import com.gargoylesoftware.htmlunit.SgmlPage; @@ -143,7 +145,10 @@ public String getContentType() { /** * {@inheritDoc} + * + * @deprecated as of version 2.48.0; use asNormalizedText() instead */ + @Deprecated @Override public String asText() { return ""; @@ -166,8 +171,9 @@ public void setValueAttribute(final String newValue) { */ public void setFiles(final File... files) { if (files.length > 1 && getAttributeDirect("multiple") == ATTRIBUTE_NOT_DEFINED) { - throw new IllegalStateException("HtmlFileInput is not 'multiple'."); + throw new IllegalStateException("HtmlFileInput - 'multiple' is not set."); } + for (int i = 0; i < files.length; i++) { files[i] = normalizeFile(files[i]); } @@ -175,6 +181,39 @@ public void setFiles(final File... files) { fireEvent(Event.TYPE_CHANGE); } + /** + * Used to specify the upload directory. + * + * @param directory the directory to upload all files + */ + public void setDirectory(final File directory) { + if (directory == null) { + return; + } + + if (getAttributeDirect("webkitdirectory") == ATTRIBUTE_NOT_DEFINED) { + throw new IllegalStateException("HtmlFileInput - 'webkitdirectory' is not set."); + } + + if (getAttributeDirect("multiple") == ATTRIBUTE_NOT_DEFINED) { + throw new IllegalStateException("HtmlFileInput - 'multiple' is not set."); + } + + if (!directory.isDirectory()) { + throw new IllegalStateException("HtmlFileInput - the provided directory '" + + directory.getAbsolutePath() + "' is not a directory."); + } + + final Collection fileColl = FileUtils.listFiles(directory, null, true); + final File[] files = new File[fileColl.size()]; + int i = 0; + for (final File file : fileColl) { + files[i++] = normalizeFile(file); + } + files_ = files; + fireEvent(Event.TYPE_CHANGE); + } + /** * To tolerate {@code file://} */ diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFont.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFont.java index 6beae2001..7f9aee032 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFont.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFont.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFooter.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFooter.java index 866a6d0da..874ca83de 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFooter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFooter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlForm.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlForm.java index 6ed9567d1..64cbc09f0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlForm.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlForm.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -181,7 +181,7 @@ && getAttributeDirect("novalidate") != ATTRIBUTE_NOT_DEFINED) { /** Calling form.submit() twice forces double download. */ final boolean checkHash = !webClient.getBrowserVersion().hasFeature(FORM_SUBMISSION_DOWNLOWDS_ALSO_IF_ONLY_HASH_CHANGED); - webClient.download(webWindow, target, request, checkHash, false, "JS form.submit()"); + webClient.download(webWindow, target, request, checkHash, false, false, "JS form.submit()"); } /** @@ -310,17 +310,17 @@ public WebRequest getWebRequest(final SubmittableElement submitElement) { } if (HttpMethod.GET == method && browser.hasFeature(FORM_SUBMISSION_URL_WITHOUT_HASH) - && WebClient.URL_ABOUT_BLANK != url) { + && UrlUtils.URL_ABOUT_BLANK != url) { url = UrlUtils.getUrlWithNewRef(url, null); } else if (HttpMethod.POST == method && browser.hasFeature(FORM_SUBMISSION_URL_WITHOUT_HASH) - && WebClient.URL_ABOUT_BLANK != url + && UrlUtils.URL_ABOUT_BLANK != url && StringUtils.isEmpty(actionUrl)) { url = UrlUtils.getUrlWithNewRef(url, null); } else if (anchor != null - && WebClient.URL_ABOUT_BLANK != url) { + && UrlUtils.URL_ABOUT_BLANK != url) { url = UrlUtils.getUrlWithNewRef(url, anchor); } } @@ -336,8 +336,7 @@ else if (anchor != null request.setEncodingType(FormEncodingType.getInstance(getEnctypeAttribute())); } request.setCharset(enc); - - request.setAdditionalHeader(HttpHeader.REFERER, htmlPage.getUrl().toExternalForm()); + request.setRefererlHeader(htmlPage.getUrl()); if (HttpMethod.POST == method && browser.hasFeature(FORM_SUBMISSION_HEADER_ORIGIN)) { diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFrame.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFrame.java index 55b98920a..189207c0b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFrame.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFrame.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFrameSet.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFrameSet.java index f84ba1597..a158dc48b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFrameSet.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlFrameSet.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHead.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHead.java index 9fe224b94..a8a6cdc15 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHead.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHead.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeader.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeader.java index a82dec9b5..2c72a0a74 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeader.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeader.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading1.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading1.java index e6bf44f33..13d6b56a3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading1.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading1.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading2.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading2.java index 9bd6c6e5f..220af63b5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading2.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading2.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading3.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading3.java index a86a35977..7864d3ee5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading3.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading3.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading4.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading4.java index 3ab4a488c..047993355 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading4.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading4.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading5.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading5.java index 145deed18..75099e55b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading5.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading5.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading6.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading6.java index af3b39026..2381a8d95 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading6.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHeading6.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHiddenInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHiddenInput.java index 8f22f3f5c..920a60c67 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHiddenInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHiddenInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -60,8 +60,10 @@ protected void setAttributeNS(final String namespaceURI, final String qualifiedN /** * @see com.gargoylesoftware.htmlunit.html.HtmlInput#asText() * @return an empty string as hidden field is not visible + * + * @deprecated as of version 2.48.0; use asNormalizedText() instead */ - // we need to preserve this method as it is there since many versions with the above documentation. + @Deprecated @Override public String asText() { return ""; diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHorizontalRule.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHorizontalRule.java index 57904cf2e..86e68991e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHorizontalRule.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHorizontalRule.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHtml.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHtml.java index aecba5775..d85ae5412 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHtml.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlHtml.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlImage.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlImage.java index b1bf07032..8276f1f97 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlImage.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlImage.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -42,7 +42,6 @@ import org.apache.http.HttpStatus; import com.gargoylesoftware.htmlunit.BrowserVersion; -import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.SgmlPage; import com.gargoylesoftware.htmlunit.WebClient; @@ -153,7 +152,7 @@ protected void setAttributeNS(final String namespaceURI, final String qualifiedN final String readyState = htmlPage.getReadyState(); if (READY_STATE_LOADING.equals(readyState)) { - final PostponedAction action = new PostponedAction(getPage()) { + final PostponedAction action = new PostponedAction(getPage(), "HtmlImage.setAttributeNS") { @Override public void execute() throws Exception { doOnLoad(); @@ -303,7 +302,7 @@ public void doOnLoad() { } if (READY_STATE_LOADING.equals(htmlPage.getReadyState())) { - final PostponedAction action = new PostponedAction(getPage()) { + final PostponedAction action = new PostponedAction(getPage(), "HtmlImage.doOnLoad") { @Override public void execute() throws Exception { HtmlImage.this.fireEvent(event); @@ -546,7 +545,7 @@ private void downloadImageIfNeeded() throws IOException { final WebRequest request = new WebRequest(url, browser.getImgAcceptHeader(), browser.getAcceptEncodingHeader()); request.setCharset(page.getCharset()); - request.setAdditionalHeader(HttpHeader.REFERER, page.getUrl().toExternalForm()); + request.setRefererlHeader(page.getUrl()); imageWebResponse_ = webClient.loadWebResponse(request); } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlImageInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlImageInput.java index dfa3d653a..52c1deff8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlImageInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlImageInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,7 +14,6 @@ */ package com.gargoylesoftware.htmlunit.html; -import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLIMAGE_BLANK_SRC_AS_EMPTY; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLIMAGE_NAME_VALUE_PARAMS; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_IMAGE_COMPLETE_RETURNS_TRUE_FOR_NO_REQUEST; @@ -22,16 +21,18 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.net.MalformedURLException; import java.net.URL; import java.nio.file.Files; import java.util.Map; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import com.gargoylesoftware.htmlunit.BrowserVersion; import com.gargoylesoftware.htmlunit.ElementNotFoundException; -import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.SgmlPage; import com.gargoylesoftware.htmlunit.WebClient; @@ -42,6 +43,7 @@ /** * Wrapper for the HTML element "input". + * HtmlUnit does not download the associated image for performance reasons. * * @author Mike Bowler * @author David K. Taylor @@ -54,6 +56,8 @@ */ public class HtmlImageInput extends HtmlInput implements LabelableElement { + private static final Log LOG = LogFactory.getLog(HtmlImageInput.class); + // For click with x, y position. private boolean wasPositionSpecified_; private int xPosition_; @@ -207,6 +211,39 @@ protected boolean isRequiredSupported() { return false; } + /** + * {@inheritDoc} + */ + @Override + public final String getSrcAttribute() { + final String src = getSrcAttributeNormalized(); + if (ATTRIBUTE_NOT_DEFINED == src) { + return src; + } + + final HtmlPage page = getHtmlPageOrNull(); + if (page != null) { + try { + return page.getFullyQualifiedUrl(src).toExternalForm(); + } + catch (final MalformedURLException e) { + // Log the error and fall through to the return values below. + LOG.warn(e.getMessage(), e); + } + } + return src; + } + + /** + * {@inheritDoc} + */ + @Override + public void setSrcAttribute(final String src) { + super.setSrcAttribute(src); + downloaded_ = false; + imageWebResponse_ = null; + } + /** *

Downloads the image contained by this image element.

*

POTENTIAL PERFORMANCE KILLER - DOWNLOADS THE IMAGE - USE AT YOUR OWN RISK

@@ -216,19 +253,16 @@ protected boolean isRequiredSupported() { */ private void downloadImageIfNeeded() throws IOException { if (!downloaded_) { - // HTMLIMAGE_BLANK_SRC_AS_EMPTY final String src = getSrcAttribute(); - if (!"".equals(src) - && !(hasFeature(HTMLIMAGE_BLANK_SRC_AS_EMPTY) && StringUtils.isBlank(src))) { + if (!"".equals(src)) { final HtmlPage page = (HtmlPage) getPage(); final WebClient webClient = page.getWebClient(); - final URL url = page.getFullyQualifiedUrl(src); final BrowserVersion browser = webClient.getBrowserVersion(); - final WebRequest request = new WebRequest(url, browser.getImgAcceptHeader(), + final WebRequest request = new WebRequest(new URL(src), browser.getImgAcceptHeader(), browser.getAcceptEncodingHeader()); request.setCharset(page.getCharset()); - request.setAdditionalHeader(HttpHeader.REFERER, page.getUrl().toExternalForm()); + request.setRefererlHeader(page.getUrl()); imageWebResponse_ = webClient.loadWebResponse(request); } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInlineFrame.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInlineFrame.java index 4beb205c3..90feb82e1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInlineFrame.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInlineFrame.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInlineQuotation.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInlineQuotation.java index c58e2adef..3fe0b7382 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInlineQuotation.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInlineQuotation.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInput.java index d3d0ecd16..e73567cf7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -275,10 +275,19 @@ protected int getMinLength() { * @return the value of the attribute {@code src} * or an empty string if that attribute isn't defined. */ - public final String getSrcAttribute() { + public String getSrcAttribute() { return getSrcAttributeNormalized(); } + /** + * Sets the {@code src} attribute. + * + * @param src the {@code src} attribute + */ + public void setSrcAttribute(final String src) { + setAttribute(HtmlElement.SRC_ATTRIBUTE, src); + } + /** * Returns the value of the attribute {@code alt}. Refer to the * HTML 4.01 diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInsertedText.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInsertedText.java index fcc78e816..d46e03587 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInsertedText.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlInsertedText.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndex.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndex.java index ec414d0b1..c90ddba9d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndex.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndex.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlItalic.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlItalic.java index f14f437c8..cc0b8fcd9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlItalic.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlItalic.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlKeyboard.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlKeyboard.java index 99ffa9ce5..cc82d3fb4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlKeyboard.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlKeyboard.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLabel.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLabel.java index 0466297e6..d356ad8bf 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLabel.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLabel.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -109,17 +109,6 @@ public void focus() { } } - /** - * Gets the element referenced by this label. That is the element in the page which id is - * equal to the value of the for attribute of this label. - * @return the element, {@code null} if not found - * @deprecated as of version 2.40; use {@link #getLabeledElement()} instead - */ - @Deprecated - public HtmlElement getReferencedElement() { - return getLabeledElement(); - } - /** * Gets the element labeled by this label. That is the labelable element in the page * which id is equal to the value of the for attribute of this label or, if no for diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLayer.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLayer.java index 830d51fa0..7394290a6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLayer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLayer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLegend.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLegend.java index fa79a6fa7..582119200 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLegend.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLegend.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLink.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLink.java index a145a7dd8..a59430803 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLink.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLink.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -26,7 +26,6 @@ import org.apache.http.HttpStatus; import com.gargoylesoftware.htmlunit.BrowserVersion; -import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.SgmlPage; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.WebRequest; @@ -233,8 +232,7 @@ public WebRequest getWebRequest() throws MalformedURLException { final WebRequest request = new WebRequest(url, browser.getCssAcceptHeader(), browser.getAcceptEncodingHeader()); // use the page encoding even if this is a GET requests request.setCharset(page.getCharset()); - - request.setAdditionalHeader(HttpHeader.REFERER, page.getUrl().toExternalForm()); + request.setRefererlHeader(page.getUrl()); return request; } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlListItem.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlListItem.java index c4ef89348..4d6eef133 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlListItem.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlListItem.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlListing.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlListing.java index 7f04f9f93..e35c0f438 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlListing.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlListing.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMain.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMain.java index f0d9af05a..95de784de 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMain.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMain.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMap.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMap.java index 2371dc005..fb17c6b49 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMap.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMap.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMark.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMark.java index 871edb0e3..24f0b3495 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMark.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMark.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMarquee.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMarquee.java index d4a9980bc..5fb5aafbe 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMarquee.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMarquee.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMedia.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMedia.java index 327ff98d6..a9bc90646 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMedia.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMedia.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMenu.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMenu.java index 3a3bfd8bb..66d4c516a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMenu.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMenu.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMenuItem.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMenuItem.java index d24a961ee..0d595feeb 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMenuItem.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMenuItem.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMeta.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMeta.java index eb0af2842..fac79b61c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMeta.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMeta.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMeter.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMeter.java index 5cc84bb65..69cfa34ae 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMeter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMeter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMonthInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMonthInput.java index 7c6fd8348..903f8a104 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMonthInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMonthInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMultiColumn.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMultiColumn.java index 6f2107819..9d73a9f3e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMultiColumn.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMultiColumn.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNav.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNav.java index 8dd13ec10..22b21af27 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNav.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNav.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNextId.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNextId.java index bdd15648a..e7bbfcd21 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNextId.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNextId.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoBreak.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoBreak.java index aa1cbe948..dd40cc1d0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoBreak.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoBreak.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoEmbed.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoEmbed.java index 034b7fe9b..928073735 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoEmbed.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoEmbed.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoFrames.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoFrames.java index b5ae1acc4..2b3bb9abd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoFrames.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoFrames.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoLayer.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoLayer.java index 096e75a68..abef98fb7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoLayer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoLayer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoScript.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoScript.java index 4affa3af0..315b84a2c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoScript.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNoScript.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInput.java index 8dd15e8eb..229b01b78 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,6 +14,8 @@ */ package com.gargoylesoftware.htmlunit.html; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_INPUT_NUMBER_ACCEPT_ALL; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_INPUT_NUMBER_DOT_AT_END_IS_DOUBLE; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_INPUT_SET_VALUE_MOVE_SELECTION_TO_START; import java.text.NumberFormat; @@ -21,6 +23,8 @@ import java.util.Locale; import java.util.Map; +import org.apache.commons.lang3.StringUtils; + import com.gargoylesoftware.htmlunit.SgmlPage; import com.gargoylesoftware.htmlunit.html.impl.SelectableTextInput; import com.gargoylesoftware.htmlunit.html.impl.SelectableTextSelectionDelegate; @@ -32,9 +36,12 @@ * @author Ronald Brill * @author Frank Danek * @author Anton Demydenko + * @author Raik Bieniek */ public class HtmlNumberInput extends HtmlInput implements SelectableTextInput, LabelableElement { + private static final char[] VALID_INT_CHARS = new char[] {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-'}; + private SelectableTextSelectionDelegate selectionDelegate_ = new SelectableTextSelectionDelegate(this); private DoTypeProcessor doTypeProcessor_ = new DoTypeProcessor(this); @@ -48,6 +55,16 @@ public class HtmlNumberInput extends HtmlInput implements SelectableTextInput, L HtmlNumberInput(final String qualifiedName, final SgmlPage page, final Map attributes) { super(qualifiedName, page, attributes); + + final String value = getValueAttribute(); + if (!value.isEmpty()) { + try { + Double.parseDouble(value.trim()); + } + catch (final NumberFormatException e) { + setValueAttribute(""); + } + } } /** @@ -72,7 +89,30 @@ protected void doType(final int keyCode, final boolean lastType) { @Override protected void typeDone(final String newValue, final boolean notifyAttributeChangeListeners) { if (newValue.length() <= getMaxLength()) { - setAttributeNS(null, "value", newValue, notifyAttributeChangeListeners, false); + if (hasFeature(JS_INPUT_NUMBER_ACCEPT_ALL)) { + setAttributeNS(null, "value", newValue, notifyAttributeChangeListeners, false); + return; + } + + if (StringUtils.isBlank(newValue) || "-".equals(newValue) || "+".equals(newValue)) { + setAttributeNS(null, "value", newValue, notifyAttributeChangeListeners, false); + return; + } + + String parseValue = newValue; + final int lastPos = parseValue.length() - 1; + if (parseValue.charAt(lastPos) == '.') { + parseValue = parseValue.substring(0, lastPos); + } + + try { + Double.parseDouble(parseValue); + setAttributeNS(null, "value", newValue, notifyAttributeChangeListeners, false); + } + catch (final NumberFormatException e) { + // ignore + } + } } @@ -231,46 +271,72 @@ public DomNode cloneNode(final boolean deep) { */ @Override public boolean isValid() { - return super.isValid() && isMaxValid() && isMinValid(); - } + if (!super.isValid()) { + return false; + } - /** - * Returns if the input element has a valid min value. Refer to the - * HTML 5 - * documentation for details. - * - * @return if the input element has a valid min value - */ - private boolean isMinValid() { - if (!getValueAttribute().isEmpty() && !getMin().isEmpty()) { - try { - final Long value = Long.parseLong(getValueAttribute()); - final Long min = Long.parseLong(getMin()); - return min <= value; + final String valueAttr = getValueAttribute(); + if (!valueAttr.isEmpty()) { + if ("-".equals(valueAttr) || "+".equals(valueAttr)) { + return false; } - catch (final NumberFormatException e) { - // ignore + + // if we have no step, the value has to be an integer + if (getStep().isEmpty()) { + String val = valueAttr; + final int lastPos = val.length() - 1; + if (lastPos >= 0 && val.charAt(lastPos) == '.') { + if (hasFeature(JS_INPUT_NUMBER_DOT_AT_END_IS_DOUBLE)) { + return false; + } + val = val.substring(0, lastPos); + } + if (!StringUtils.containsOnly(val, VALID_INT_CHARS)) { + return false; + } } - } - return true; - } - /** - * Returns if the input element has a valid max value. Refer to the - * HTML 5 - * documentation for details. - * - * @return if the input element has a valid max value - */ - private boolean isMaxValid() { - if (!getValueAttribute().isEmpty() && !getMax().isEmpty()) { + double value = 0d; try { - final Long value = Long.parseLong(getValueAttribute()); - final Long max = Long.parseLong(getMax()); - return max >= value; + value = Double.parseDouble(valueAttr); } catch (final NumberFormatException e) { - // ignore + return false; + } + + if (!getMin().isEmpty()) { + try { + final double min = Double.parseDouble(getMin()); + if (value < min) { + return false; + } + + if (!getStep().isEmpty()) { + try { + final double step = Double.parseDouble(getStep()); + if (Math.abs((value - min) % step) > 0.000001d) { + return false; + } + } + catch (final NumberFormatException e) { + // ignore + } + } + } + catch (final NumberFormatException e) { + // ignore + } + } + if (!getMax().isEmpty()) { + try { + final double max = Double.parseDouble(getMax()); + if (value > max) { + return false; + } + } + catch (final NumberFormatException e) { + // ignore + } } } return true; diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlObject.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlObject.java index 346069edd..9fe079110 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlObject.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlObject.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOption.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOption.java index a1f3fd64d..7fe376332 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOption.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOption.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -375,8 +375,10 @@ void setSelectedInternal(final boolean selected) { * {@inheritDoc} * This implementation will show the label attribute before the * content of the tag if the attribute exists. + * + * @deprecated as of version 2.48.0; use asNormalizedText() instead */ - // we need to preserve this method as it is there since many versions with the above documentation. + @Deprecated @Override public String asText() { return super.asText(); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOptionGroup.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOptionGroup.java index 1b90595bd..3a63e81e2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOptionGroup.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOptionGroup.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOrderedList.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOrderedList.java index d1cf01e2d..e7c4ab207 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOrderedList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOrderedList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOutput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOutput.java index 9df4a47d7..341cd77d6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOutput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlOutput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java index ff654f277..ba1295dc1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPage.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,11 +18,11 @@ import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_FOCUS_IN_FOCUS_OUT_BLUR; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_FOCUS_ON_LOAD; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.FOCUS_BODY_ELEMENT_AT_START; -import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_DEFERRED; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_EVENT_LOAD_SUPPRESSED_BY_CONTENT_SECURIRY_POLICY; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_IGNORES_UTF8_BOM_SOMETIMES; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.PAGE_SELECTION_RANGE_FROM_SELECTABLE_TEXT_INPUT; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.URL_MISSING_SLASHES; +import static com.gargoylesoftware.htmlunit.html.DomElement.ATTRIBUTE_NOT_DEFINED; import static java.nio.charset.StandardCharsets.ISO_8859_1; import java.io.File; @@ -233,7 +233,7 @@ public boolean hasCaseSensitiveTagNames() { @Override public void initialize() throws IOException, FailingHttpStatusCodeException { final WebWindow enclosingWindow = getEnclosingWindow(); - final boolean isAboutBlank = getUrl() == WebClient.URL_ABOUT_BLANK; + final boolean isAboutBlank = getUrl() == UrlUtils.URL_ABOUT_BLANK; if (isAboutBlank) { // a frame contains first a faked "about:blank" before its real content specified by src gets loaded if (enclosingWindow instanceof FrameWindow @@ -256,6 +256,8 @@ public void initialize() throws IOException, FailingHttpStatusCodeException { getDocumentElement().setReadyState(READY_STATE_INTERACTIVE); } + executeDeferredScriptsIfNeeded(); + executeEventHandlersIfNeeded(Event.TYPE_DOM_DOCUMENT_LOADED); loadFrames(); @@ -270,9 +272,6 @@ public void initialize() throws IOException, FailingHttpStatusCodeException { getDocumentElement().setReadyState(READY_STATE_COMPLETE); } - executeDeferredScriptsIfNeeded(); - setReadyStateOnDeferredScriptsIfNeeded(); - // frame initialization has a different order boolean isFrameWindow = enclosingWindow instanceof FrameWindow; boolean isFirstPageInFrameWindow = false; @@ -280,7 +279,7 @@ public void initialize() throws IOException, FailingHttpStatusCodeException { isFrameWindow = ((FrameWindow) enclosingWindow).getFrameElement() instanceof HtmlFrame; final History hist = enclosingWindow.getHistory(); - if (hist.getLength() > 0 && WebClient.URL_ABOUT_BLANK == hist.getUrl(0)) { + if (hist.getLength() > 0 && UrlUtils.URL_ABOUT_BLANK == hist.getUrl(0)) { isFirstPageInFrameWindow = hist.getLength() <= 2; } else { @@ -1047,7 +1046,7 @@ private Object loadJavaScriptFromUrl(final URL url, final Charset scriptCharset) request.setAdditionalHeaders(new HashMap<>(referringRequest.getAdditionalHeaders())); // at least overwrite this headers request.setAdditionalHeader(HttpHeader.ACCEPT, client.getBrowserVersion().getScriptAcceptHeader()); - request.setAdditionalHeader(HttpHeader.REFERER, referringRequest.getUrl().toString()); + request.setRefererlHeader(referringRequest.getUrl()); // our cache is a bit strange; // loadWebResponse check the cache for the web response @@ -1289,7 +1288,7 @@ private boolean executeEventHandlersIfNeeded(final String eventType) { } if (window.getScriptableObject() instanceof Window) { final Event event; - if (eventType.equals(Event.TYPE_BEFORE_UNLOAD)) { + if (Event.TYPE_BEFORE_UNLOAD.equals(eventType)) { event = new BeforeUnloadEvent(frame, eventType); } else { @@ -1466,32 +1465,13 @@ private void executeDeferredScriptsIfNeeded() { if (!getWebClient().isJavaScriptEnabled()) { return; } - if (hasFeature(JS_DEFERRED)) { - final DomElement doc = getDocumentElement(); - final List elements = doc.getElementsByTagName("script"); - for (final HtmlElement e : elements) { - if (e instanceof HtmlScript) { - final HtmlScript script = (HtmlScript) e; - if (script.isDeferred()) { - ScriptElementSupport.executeScriptIfNeeded(script); - } - } - } - } - } - - /** - * Sets the ready state on any deferred scripts, if necessary. - */ - private void setReadyStateOnDeferredScriptsIfNeeded() { - if (getWebClient().isJavaScriptEnabled() && hasFeature(JS_DEFERRED)) { - final List elements = getDocumentElement().getElementsByTagName("script"); - for (final HtmlElement e : elements) { - if (e instanceof HtmlScript) { - final HtmlScript script = (HtmlScript) e; - if (script.isDeferred()) { - script.setAndExecuteReadyState(READY_STATE_COMPLETE); - } + final DomElement doc = getDocumentElement(); + final List elements = new ArrayList(doc.getElementsByTagName("script")); + for (final HtmlElement e : elements) { + if (e instanceof HtmlScript) { + final HtmlScript script = (HtmlScript) e; + if (script.isDeferred() && ATTRIBUTE_NOT_DEFINED != script.getSrcAttribute()) { + ScriptElementSupport.executeScriptIfNeeded(script, true, true); } } } @@ -1939,7 +1919,7 @@ void loadFrames() throws FailingHttpStatusCodeException { // if a script has already changed its content, it should be skipped // use == and not equals(...) to identify initial content (versus URL set to "about:blank") if (frame.getEnclosedWindow() != null - && WebClient.URL_ABOUT_BLANK == frame.getEnclosedPage().getUrl() + && UrlUtils.URL_ABOUT_BLANK == frame.getEnclosedPage().getUrl() && !frame.isContentLoaded()) { frame.loadInnerPage(); } @@ -2340,7 +2320,7 @@ public URL getBaseURL() { final WebWindow window = getEnclosingWindow(); final boolean frame = window != null && window != window.getTopWindow(); if (frame) { - final boolean frameSrcIsNotSet = baseUrl == WebClient.URL_ABOUT_BLANK; + final boolean frameSrcIsNotSet = baseUrl == UrlUtils.URL_ABOUT_BLANK; final boolean frameSrcIsJs = "javascript".equals(baseUrl.getProtocol()); if (frameSrcIsNotSet || frameSrcIsJs) { baseUrl = ((HtmlPage) window.getTopWindow().getEnclosedPage()).getWebResponse() diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlParagraph.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlParagraph.java index 634c5edd3..65e8112e9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlParagraph.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlParagraph.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlParameter.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlParameter.java index dbbedc8a2..132a07758 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlParameter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlParameter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPasswordInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPasswordInput.java index f1743f99a..a29ec810d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPasswordInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPasswordInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPicture.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPicture.java index 70f4cbf17..8ac55f1e4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPicture.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPicture.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPlainText.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPlainText.java index fdaff1ba7..e9a8856bd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPlainText.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPlainText.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPreformattedText.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPreformattedText.java index 2fef08d62..db4209793 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPreformattedText.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlPreformattedText.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlProgress.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlProgress.java index 8f578a9ea..6ec1eb15f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlProgress.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlProgress.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRadioButtonInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRadioButtonInput.java index eca082b1e..af80237e9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRadioButtonInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRadioButtonInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -230,8 +230,10 @@ protected void doClickFireChangeEvent() { * A radio button does not have a textual representation, * but we invent one for it because it is useful for testing. * @return "checked" or "unchecked" according to the radio state + * + * @deprecated as of version 2.48.0; use asNormalizedText() instead */ - // we need to preserve this method as it is there since many versions with the above documentation. + @Deprecated @Override public String asText() { return super.asText(); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRangeInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRangeInput.java index 05aad5615..54fedbc81 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRangeInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRangeInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlResetInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlResetInput.java index cf95abb91..738eeff12 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlResetInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlResetInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -38,7 +38,7 @@ public class HtmlResetInput extends HtmlInput implements LabelableElement { /** * Value to use if no specified value attribute. */ - private static final String DEFAULT_VALUE = "Reset"; + public static final String DEFAULT_VALUE = "Reset"; /** * Creates an instance. @@ -109,7 +109,10 @@ public void reset() { /** * {@inheritDoc} Returns "Reset" if value attribute is not defined. + * + * @deprecated as of version 2.48.0; use asNormalizedText() instead */ + @Deprecated @Override public String asText() { String text = getValueAttribute(); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRp.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRp.java index 646957ac0..fb7fcaafa 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRp.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRp.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRt.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRt.java index 342280197..16e60810a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRt.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRt.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRuby.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRuby.java index 982579c31..d806903e1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRuby.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlRuby.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlS.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlS.java index 6c20fc3b5..f49ea85ce 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlS.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlS.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSample.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSample.java index 60dbd5037..ab885a91f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSample.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSample.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlScript.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlScript.java index 285128e29..c5fc35554 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlScript.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlScript.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -135,10 +135,10 @@ public final String getDeferAttribute() { } /** - * Returns {@code true} if this script is deferred. - * @return {@code true} if this script is deferred + * {@inheritDoc} */ - protected boolean isDeferred() { + @Override + public boolean isDeferred() { return getDeferAttribute() != ATTRIBUTE_NOT_DEFINED; } @@ -170,10 +170,10 @@ protected void setAttributeNS(final String namespaceURI, final String qualifiedN notifyMutationObservers); if (isAttachedToPage() && oldValue.isEmpty() && getFirstChild() == null) { - final PostponedAction action = new PostponedAction(getPage()) { + final PostponedAction action = new PostponedAction(getPage(), "HtmlScript.setAttributeNS") { @Override public void execute() { - ScriptElementSupport.executeScriptIfNeeded(HtmlScript.this); + ScriptElementSupport.executeScriptIfNeeded(HtmlScript.this, false, false); } }; final AbstractJavaScriptEngine engine = getPage().getWebClient().getJavaScriptEngine(); @@ -206,19 +206,14 @@ private String getScriptCode() { return scriptCode.toString(); } - /** - * Sets the readyState to the specified state and executes the - * onreadystatechange handler when simulating IE. - * @param state this script ready state - */ - protected void setAndExecuteReadyState(final String state) { - } - /** * @see com.gargoylesoftware.htmlunit.html.HtmlInput#asText() + * * @return an empty string as the content of script is not visible by itself + * + * @deprecated as of version 2.48.0; use asNormalizedText() instead */ - // we need to preserve this method as it is there since many versions with the above documentation. + @Deprecated @Override public String asText() { return ""; diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSearchInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSearchInput.java index 132aa7c1a..1deec1591 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSearchInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSearchInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSection.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSection.java index 94240f9c1..6aa951436 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSelect.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSelect.java index ad28a47c8..daa7d2ef3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSelect.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSelect.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -554,8 +554,10 @@ public HtmlOption getOptionByText(final String text) throws ElementNotFoundExcep * If the user can select multiple options, this method returns all options. * * @return the element as text + * + * @deprecated as of version 2.48.0; use asNormalizedText() instead */ - // we need to preserve this method as it is there since many versions with the above documentation. + @Deprecated @Override public String asText() { final List options; diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSerializer.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSerializer.java index d55b8ad96..d9410a3c2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSerializer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSerializer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.SgmlPage; import com.gargoylesoftware.htmlunit.html.HtmlSerializer.HtmlSerializerTextBuilder.Mode; +import com.gargoylesoftware.htmlunit.html.serializer.HtmlSerializerNormalizedText; import com.gargoylesoftware.htmlunit.javascript.host.Element; /** @@ -31,7 +32,10 @@ * @author Ahmed Ashour * @author Ronald Brill * @author Rob Kodey + * + * @deprecated as of version 2.48.0; use {@link HtmlSerializerNormalizedText} instead */ +@Deprecated public class HtmlSerializer { private boolean ignoreMaskedElements_ = true; diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSlot.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSlot.java index 1384ac98e..7cbca92a7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSlot.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSlot.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSmall.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSmall.java index 6bdc3a66e..02ec98f57 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSmall.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSmall.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSource.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSource.java index fbdde2fb6..b2d0209d9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSource.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSource.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSpan.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSpan.java index 6506ba734..ecf8e9bae 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSpan.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSpan.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlStrike.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlStrike.java index 036c0d3cc..80b8052ad 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlStrike.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlStrike.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlStrong.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlStrong.java index fc77222e2..ce5101606 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlStrong.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlStrong.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlStyle.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlStyle.java index ef1805ede..c00ff0f54 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlStyle.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlStyle.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -89,8 +89,10 @@ public final String getTitleAttribute() { /** * @see com.gargoylesoftware.htmlunit.html.HtmlInput#asText() * @return an empty string as the content of style is not visible by itself + * + * @deprecated as of version 2.48.0; use asNormalizedText() instead */ - // we need to preserve this method as it is there since many versions with the above documentation. + @Deprecated @Override public String asText() { return ""; diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSubmitInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSubmitInput.java index 0d00d4cb7..c07e86b0d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSubmitInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSubmitInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -42,7 +42,7 @@ public class HtmlSubmitInput extends HtmlInput implements LabelableElement { /** * Value to use if no specified value attribute. */ - private static final String DEFAULT_VALUE = "Submit Query"; + public static final String DEFAULT_VALUE = "Submit Query"; /** * Creates an instance. @@ -113,7 +113,10 @@ public void reset() { /** * {@inheritDoc} Returns "Submit Query" if value attribute is not defined. + * + * @deprecated as of version 2.48.0; use asNormalizedText() instead */ + @Deprecated @Override public String asText() { String text = getValueAttribute(); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSubscript.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSubscript.java index 7a9131b64..e77ba3afb 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSubscript.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSubscript.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSummary.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSummary.java index 386bd5dec..7c1735b63 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSummary.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSummary.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSuperscript.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSuperscript.java index 8f9ce0163..a36fbed95 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSuperscript.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSuperscript.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSvg.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSvg.java index e378307f7..5a317a380 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSvg.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSvg.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTable.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTable.java index 23dc3dfa3..be322782c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTable.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTable.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableBody.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableBody.java index 2d0809675..bd3ec4df0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableBody.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableBody.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableCell.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableCell.java index 1e993103e..a827e5f65 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableCell.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableCell.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableColumn.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableColumn.java index b27ac94a0..4be6aeae4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableColumn.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableColumn.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableColumnGroup.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableColumnGroup.java index 0c6e0eb49..5183c7fb1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableColumnGroup.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableColumnGroup.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableDataCell.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableDataCell.java index 70dcde250..523bff717 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableDataCell.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableDataCell.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableFooter.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableFooter.java index 2a63dfca8..66684c17d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableFooter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableFooter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableHeader.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableHeader.java index d15c00cb9..411538235 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableHeader.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableHeader.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableHeaderCell.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableHeaderCell.java index 81ddeb388..4e27a4696 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableHeaderCell.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableHeaderCell.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableRow.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableRow.java index 614c52b40..f89974af4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableRow.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTableRow.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTelInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTelInput.java index 71292e0b1..eee441f5b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTelInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTelInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTeletype.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTeletype.java index 4258c3074..2fd85b166 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTeletype.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTeletype.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTemplate.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTemplate.java index 3e0180370..494a55921 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTemplate.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTemplate.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTextArea.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTextArea.java index 80203c4b9..866d6b948 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTextArea.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTextArea.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTextInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTextInput.java index 655695161..387f6ab24 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTextInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTextInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTime.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTime.java index fa3df254a..8895c910c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTime.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTime.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTimeInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTimeInput.java index bf9c15b1f..2e02cfe12 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTimeInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTimeInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTitle.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTitle.java index e77c74a2e..2aa6ab38a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTitle.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTitle.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTrack.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTrack.java index b1d84aec2..98517e678 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTrack.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlTrack.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnderlined.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnderlined.java index ecf956b0d..f2c4092da 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnderlined.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnderlined.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnknownElement.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnknownElement.java index f635c0b63..66e86211e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnknownElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnknownElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnorderedList.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnorderedList.java index a23f273cb..13e6e1c07 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnorderedList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUnorderedList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUrlInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUrlInput.java index 20b736bae..bda6048aa 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUrlInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlUrlInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlVariable.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlVariable.java index 7822aeefe..470ac8e84 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlVariable.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlVariable.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlVideo.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlVideo.java index 22a048b5b..bcb692e34 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlVideo.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlVideo.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlWeekInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlWeekInput.java index 380ce7505..4071f2fa6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlWeekInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlWeekInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlWordBreak.java b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlWordBreak.java index abc4d3492..3609193a3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlWordBreak.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlWordBreak.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/Keyboard.java b/src/main/java/com/gargoylesoftware/htmlunit/html/Keyboard.java index 3eb775feb..6a2d6631a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/Keyboard.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/Keyboard.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/LabelableElement.java b/src/main/java/com/gargoylesoftware/htmlunit/html/LabelableElement.java index eece23281..ef37655f5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/LabelableElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/LabelableElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/ScriptElement.java b/src/main/java/com/gargoylesoftware/htmlunit/html/ScriptElement.java index 89ac4b0d1..f8193221b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/ScriptElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/ScriptElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,6 +27,12 @@ public interface ScriptElement { */ boolean isExecuted(); + /** + * Returns {@code true} if this script is deferred. + * @return {@code true} if this script is deferred + */ + boolean isDeferred(); + /** * Sets if executed. * @param executed if executed diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/ScriptElementSupport.java b/src/main/java/com/gargoylesoftware/htmlunit/html/ScriptElementSupport.java index 1fcad5ef4..b77cfc221 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/ScriptElementSupport.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/ScriptElementSupport.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -84,14 +84,20 @@ public static void onAllChildrenAddedToPage(final DomElement element, final bool if (!element.getPage().getWebClient().isJavaScriptEngineEnabled()) { if (LOG.isDebugEnabled()) { - LOG.debug("SvgScript found but not executed because javascript engine is disabled"); + LOG.debug("Script found but not executed because javascript engine is disabled"); } return; } + final ScriptElement script = (ScriptElement) element; + final String srcAttrib = script.getSrcAttribute(); + if (ATTRIBUTE_NOT_DEFINED != srcAttrib + && script.isDeferred()) { + return; + } + final WebWindow webWindow = element.getPage().getEnclosingWindow(); if (webWindow != null) { - final String srcAttrib = ((ScriptElement) element).getSrcAttribute(); final StringBuilder description = new StringBuilder() .append("Execution of ") .append(srcAttrib == ATTRIBUTE_NOT_DEFINED ? "inline " : "external ") @@ -111,7 +117,7 @@ public void execute() { && srcAttrib != ATTRIBUTE_NOT_DEFINED); } try { - executeScriptIfNeeded(element); + executeScriptIfNeeded(element, false, false); } finally { if (jsDoc != null) { @@ -151,9 +157,12 @@ else if (engine != null * * Executes this script node if necessary and/or possible. * @param element the element + * @param ignoreAttachedToPage don't do the isAttachedToPage check + * @param ignorePageIsAncestor don't do the element.getPage().isAncestorOf(element) check */ - public static void executeScriptIfNeeded(final DomElement element) { - if (!isExecutionNeeded(element)) { + public static void executeScriptIfNeeded(final DomElement element, final boolean ignoreAttachedToPage, + final boolean ignorePageIsAncestor) { + if (!isExecutionNeeded(element, ignoreAttachedToPage, ignorePageIsAncestor)) { return; } @@ -234,14 +243,17 @@ else if (element.getFirstChild() != null) { * Indicates if script execution is necessary and/or possible. * * @param element the element + * @param ignoreAttachedToPage don't do the isAttachedToPage check + * @param ignorePageIsAncestor don't do the element.getPage().isAncestorOf(element) check * @return {@code true} if the script should be executed */ - private static boolean isExecutionNeeded(final DomElement element) { + private static boolean isExecutionNeeded(final DomElement element, final boolean ignoreAttachedToPage, + final boolean ignorePageIsAncestor) { if (((ScriptElement) element).isExecuted()) { return false; } - if (!element.isAttachedToPage()) { + if (!ignoreAttachedToPage && !element.isAttachedToPage()) { return false; } @@ -285,7 +297,7 @@ private static boolean isExecutionNeeded(final DomElement element) { // If the script's root ancestor node is not the page, then the script is not a part of the page. // If it isn't yet part of the page, don't execute the script; it's probably just being cloned. - return element.getPage().isAncestorOf(element); + return ignorePageIsAncestor || element.getPage().isAncestorOf(element); } /** @@ -326,7 +338,7 @@ private static void executeEvent(final DomElement element, final String type) { * Executes this script node as inline script if necessary and/or possible. */ private static void executeInlineScriptIfNeeded(final DomElement element) { - if (!isExecutionNeeded(element)) { + if (!isExecutionNeeded(element, false, false)) { return; } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/SiblingDomNodeList.java b/src/main/java/com/gargoylesoftware/htmlunit/html/SiblingDomNodeList.java index 95a694b2f..5209bc105 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/SiblingDomNodeList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/SiblingDomNodeList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/StaticDomNodeList.java b/src/main/java/com/gargoylesoftware/htmlunit/html/StaticDomNodeList.java index b57abf922..cfef02387 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/StaticDomNodeList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/StaticDomNodeList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/SubmittableElement.java b/src/main/java/com/gargoylesoftware/htmlunit/html/SubmittableElement.java index e752f1409..cf51d8c7f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/SubmittableElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/SubmittableElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/TableRowGroup.java b/src/main/java/com/gargoylesoftware/htmlunit/html/TableRowGroup.java index c3afd951d..e217980fa 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/TableRowGroup.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/TableRowGroup.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/UnknownElementFactory.java b/src/main/java/com/gargoylesoftware/htmlunit/html/UnknownElementFactory.java index eb0bbb5e6..d137fb4cd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/UnknownElementFactory.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/UnknownElementFactory.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/XHtmlPage.java b/src/main/java/com/gargoylesoftware/htmlunit/html/XHtmlPage.java index 730c82def..bf05e343b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/XHtmlPage.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/XHtmlPage.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/XmlSerializer.java b/src/main/java/com/gargoylesoftware/htmlunit/html/XmlSerializer.java index 9459230f0..d4a4b1fcc 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/XmlSerializer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/XmlSerializer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/applets/AppletClassLoader.java b/src/main/java/com/gargoylesoftware/htmlunit/html/applets/AppletClassLoader.java index 723d18931..cf7d01f70 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/applets/AppletClassLoader.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/applets/AppletClassLoader.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/applets/AppletContextImpl.java b/src/main/java/com/gargoylesoftware/htmlunit/html/applets/AppletContextImpl.java index 009a6b0d7..ac0debe55 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/applets/AppletContextImpl.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/applets/AppletContextImpl.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/applets/AppletStubImpl.java b/src/main/java/com/gargoylesoftware/htmlunit/html/applets/AppletStubImpl.java index ca9e2161d..e9d7a24f7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/applets/AppletStubImpl.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/applets/AppletStubImpl.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/applets/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/html/applets/package-info.java index 236848555..115c110c5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/applets/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/applets/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SelectableTextInput.java b/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SelectableTextInput.java index 6213fcdf9..99a6be92f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SelectableTextInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SelectableTextInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SelectableTextSelectionDelegate.java b/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SelectableTextSelectionDelegate.java index 4177e6082..967ad66ce 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SelectableTextSelectionDelegate.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SelectableTextSelectionDelegate.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SelectionDelegate.java b/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SelectionDelegate.java index 8e6bb4909..a2b52a3cd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SelectionDelegate.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SelectionDelegate.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SimpleRange.java b/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SimpleRange.java index 18a4560f6..3056392a4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SimpleRange.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SimpleRange.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SimpleSelectionDelegate.java b/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SimpleSelectionDelegate.java index 6d1f94e09..8c70f6d14 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SimpleSelectionDelegate.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/impl/SimpleSelectionDelegate.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/impl/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/html/impl/package-info.java index a548c7b08..a466f30d8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/impl/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/impl/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/html/package-info.java index d81a67c19..e2ef8d53d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParser.java b/src/main/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParser.java index 61b6ed116..ea0beb5b9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParser.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParser.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParserDOMBuilder.java b/src/main/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParserDOMBuilder.java index bed825fd5..aaffca689 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParserDOMBuilder.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParserDOMBuilder.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParserListener.java b/src/main/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParserListener.java index f39147d1c..7cc416f88 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParserListener.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParserListener.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/parser/neko/HtmlUnitNekoDOMBuilder.java b/src/main/java/com/gargoylesoftware/htmlunit/html/parser/neko/HtmlUnitNekoDOMBuilder.java index 17a75c223..590ff6891 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/parser/neko/HtmlUnitNekoDOMBuilder.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/parser/neko/HtmlUnitNekoDOMBuilder.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/parser/neko/HtmlUnitNekoHtmlParser.java b/src/main/java/com/gargoylesoftware/htmlunit/html/parser/neko/HtmlUnitNekoHtmlParser.java index 6f04a34c1..f556c536e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/parser/neko/HtmlUnitNekoHtmlParser.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/parser/neko/HtmlUnitNekoHtmlParser.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/parser/neko/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/html/parser/neko/package-info.java index dcaf0be1a..bd4b5da42 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/parser/neko/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/parser/neko/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/parser/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/html/parser/package-info.java index 43b6bca56..2f9c4a729 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/parser/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/parser/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/serializer/HtmlSerializerInnerOuterText.java b/src/main/java/com/gargoylesoftware/htmlunit/html/serializer/HtmlSerializerInnerOuterText.java new file mode 100644 index 000000000..0bc76802a --- /dev/null +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/serializer/HtmlSerializerInnerOuterText.java @@ -0,0 +1,569 @@ +/* + * Copyright (c) 2002-2021 Gargoyle Software Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.gargoylesoftware.htmlunit.html.serializer; + +import org.apache.commons.lang3.StringUtils; + +import com.gargoylesoftware.htmlunit.Page; +import com.gargoylesoftware.htmlunit.html.DomNode; +import com.gargoylesoftware.htmlunit.html.DomText; +import com.gargoylesoftware.htmlunit.html.HtmlBreak; +import com.gargoylesoftware.htmlunit.html.HtmlDetails; +import com.gargoylesoftware.htmlunit.html.HtmlListItem; +import com.gargoylesoftware.htmlunit.html.HtmlNoFrames; +import com.gargoylesoftware.htmlunit.html.HtmlParagraph; +import com.gargoylesoftware.htmlunit.html.HtmlScript; +import com.gargoylesoftware.htmlunit.html.HtmlStyle; +import com.gargoylesoftware.htmlunit.html.HtmlSummary; +import com.gargoylesoftware.htmlunit.html.HtmlTextArea; +import com.gargoylesoftware.htmlunit.html.HtmlTitle; +import com.gargoylesoftware.htmlunit.html.serializer.HtmlSerializerInnerOuterText.HtmlSerializerTextBuilder.Mode; +import com.gargoylesoftware.htmlunit.javascript.host.Element; +import com.gargoylesoftware.htmlunit.javascript.host.css.ComputedCSSStyleDeclaration; +import com.gargoylesoftware.htmlunit.javascript.host.css.StyleAttributes.Definition; +import com.gargoylesoftware.htmlunit.javascript.host.dom.Node; + +/** + * Special serializer to generate the output we need + * for innerText and outerText. + * + * @author Ronald Brill + */ +public class HtmlSerializerInnerOuterText { + + /** + * Converts an HTML node to text. + * @param node a node + * @return the text representation according to the setting of this serializer + */ + public String asText(final DomNode node) { + if (node instanceof HtmlBreak) { + return ""; + } + final HtmlSerializerTextBuilder builder = new HtmlSerializerTextBuilder(); + appendNode(builder, node, whiteSpaceStyle(node, Mode.WHITE_SPACE_NORMAL)); + return builder.getText(); + } + + /** + * Iterate over all Children and call appendNode() for every. + * + * @param builder the StringBuilder to add to + * @param node the node to process + * @param mode the {@link Mode} to use for processing + */ + protected void appendChildren(final HtmlSerializerTextBuilder builder, final DomNode node, final Mode mode) { + for (final DomNode child : node.getChildren()) { + appendNode(builder, child, mode); + } + } + + /** + * The core distribution method call the different appendXXX + * methods depending on the type of the given node. + * + * @param builder the StringBuilder to add to + * @param node the node to process + * @param mode the {@link Mode} to use for processing + */ + protected void appendNode(final HtmlSerializerTextBuilder builder, final DomNode node, final Mode mode) { + if (node instanceof DomText) { + appendText(builder, (DomText) node, mode); + } + else if (node instanceof HtmlBreak) { + appendBreak(builder, (HtmlBreak) node); + } + else if (node instanceof HtmlParagraph) { + appendParagraph(builder, (HtmlParagraph) node, mode); + } + else if (node instanceof HtmlListItem) { + appendListItem(builder, (HtmlListItem) node, mode); + } + else if (node instanceof HtmlDetails) { + appendDetails(builder, (HtmlDetails) node, mode); + } + else if (node instanceof HtmlNoFrames) { + appendChildren(builder, node, Mode.PLAIN); + } + else if (node instanceof HtmlTextArea) { + // + } + else { + appendDomNode(builder, node, mode); + } + } + + /** + * Process {@link DomNode}. + * + * @param builder the StringBuilder to add to + * @param domNode the target to process + * @param mode the {@link Mode} to use for processing + */ + protected void appendDomNode(final HtmlSerializerTextBuilder builder, + final DomNode domNode, final Mode mode) { +// final boolean block; +// final Object scriptableObject = domNode.getScriptableObject(); +// if (domNode instanceof HtmlBody) { +// block = false; +// } +// else if (scriptableObject instanceof Element) { +// final Element element = (Element) scriptableObject; +// final String display = element.getWindow().getComputedStyle(element, null).getDisplay(); +// block = "block".equals(display); +// } +// else { +// block = false; +// } +// +// if (block) { +// builder.appendBlockSeparator(); +// } + appendChildren(builder, domNode, mode); +// if (block) { +// builder.appendBlockSeparator(); +// } + } + + /** + * Process {@link DomText}. + * + * @param builder the StringBuilder to add to + * @param domText the target to process + * @param mode the {@link Mode} to use for processing + */ + protected void appendText(final HtmlSerializerTextBuilder builder, final DomText domText, final Mode mode) { + final DomNode parent = domText.getParentNode(); + if (parent instanceof HtmlTitle + || parent instanceof HtmlStyle + || parent instanceof HtmlScript) { + builder.append(domText.getData(), Mode.PLAIN); + return; + } + + if (parent == null + || parent instanceof HtmlNoFrames + || parent.isDisplayed()) { + builder.append(domText.getData(), mode); + } + } + + /** + * Process {@link HtmlBreak}. + * + * @param builder the StringBuilder to add to + * @param htmlBreak the target to process + */ + protected void appendBreak(final HtmlSerializerTextBuilder builder, + final HtmlBreak htmlBreak) { + builder.appendRequiredLineBreak(); + } + + /** + * Process {@link HtmlListItem}. + * + * @param builder the StringBuilder to add to + * @param htmlParagraph the target to process + * @param mode the {@link Mode} to use for processing + */ + protected void appendParagraph(final HtmlSerializerTextBuilder builder, + final HtmlParagraph htmlParagraph, final Mode mode) { + builder.appendRequiredLineBreak(); + appendChildren(builder, htmlParagraph, mode); + builder.appendRequiredLineBreak(); + } + + /** + * Process {@link HtmlListItem}. + * + * @param builder the StringBuilder to add to + * @param htmlListItem the target to process + * @param mode the {@link Mode} to use for processing + */ + protected void appendListItem(final HtmlSerializerTextBuilder builder, + final HtmlListItem htmlListItem, final Mode mode) { + builder.appendRequiredLineBreak(); + appendChildren(builder, htmlListItem, mode); + builder.appendRequiredLineBreak(); + } + + /** + * Process {@link HtmlDetails}. + * @param builder the StringBuilder to add to + * @param htmlDetails the target to process + * @param mode the {@link Mode} to use for processing + */ + protected void appendDetails(final HtmlSerializerTextBuilder builder, + final HtmlDetails htmlDetails, final Mode mode) { + if (htmlDetails.isOpen()) { + appendChildren(builder, htmlDetails, mode); + return; + } + + for (final DomNode child : htmlDetails.getChildren()) { + if (child instanceof HtmlSummary) { + appendNode(builder, child, mode); + } + } + } + + private Mode whiteSpaceStyle(final DomNode domNode, final Mode defaultMode) { + final Object scriptableObject = domNode.getScriptableObject(); + if (scriptableObject instanceof Node) { + final Page page = domNode.getPage(); + if (page != null && page.getEnclosingWindow().getWebClient().getOptions().isCssEnabled()) { + Node node = (Node) scriptableObject; + + while (node != null) { + if (node instanceof Element) { + final ComputedCSSStyleDeclaration style = node.getWindow().getComputedStyle(node, null); + final String value = style.getStyleAttribute(Definition.WHITE_SPACE, false); + if (StringUtils.isNoneEmpty(value)) { + if ("normal".equalsIgnoreCase(value)) { + return Mode.WHITE_SPACE_NORMAL; + } + if ("nowrap".equalsIgnoreCase(value)) { + return Mode.WHITE_SPACE_NORMAL; + } + if ("pre".equalsIgnoreCase(value)) { + return Mode.WHITE_SPACE_PRE; + } + if ("pre-wrap".equalsIgnoreCase(value)) { + return Mode.WHITE_SPACE_PRE; + } + if ("pre-line".equalsIgnoreCase(value)) { + return Mode.WHITE_SPACE_PRE_LINE; + } + } + } + node = node.getParentElement(); + } + } + } + return defaultMode; + } + + protected static class HtmlSerializerTextBuilder { + /** Mode. */ + protected enum Mode { + /** + * The mode for plain. + */ + PLAIN, + + /** + * Sequences of white space are collapsed. Newline characters + * in the source are handled the same as other white space. + * Lines are broken as necessary to fill line boxes. + */ + WHITE_SPACE_NORMAL, + + /** + * Sequences of white space are preserved. Lines are only broken + * at newline characters in the source and at
elements. + */ + WHITE_SPACE_PRE, + + /** + * Sequences of white space are collapsed. Lines are broken + * at newline characters, at
, and as necessary + * to fill line boxes. + */ + WHITE_SPACE_PRE_LINE + } + + private enum State { + DEFAULT, + EMPTY, + BLANK_AT_END, + BLANK_AT_END_AFTER_NEWLINE, + NEWLINE_AT_END, + BREAK_AT_END, + BLOCK_SEPARATOR_AT_END, + REQUIRED_LINE_BREAK_AT_END + } + + private State state_; + private final StringBuilder builder_; + private int trimRightPos_; +// private boolean contentAdded_; +// private boolean ignoreHtmlBreaks_; + + public HtmlSerializerTextBuilder() { + builder_ = new StringBuilder(); + state_ = State.EMPTY; + trimRightPos_ = 0; + } + + public void appendRequiredLineBreak() { + if (state_ == State.EMPTY) { + return; + } + + // trimRight + builder_.setLength(trimRightPos_); + if (trimRightPos_ == 0) { + state_ = State.EMPTY; + } + + builder_.append('\n'); + state_ = State.REQUIRED_LINE_BREAK_AT_END; + } + + // see https://drafts.csswg.org/css-text-3/#white-space + public void append(final String content, final Mode mode) { + int length = content.length(); + if (length == 0) { + return; + } + + if (mode == Mode.PLAIN) { + builder_.append(content); + state_ = State.DEFAULT; + trimRightPos_ = builder_.length(); + return; + } + + length--; + int i = -1; + for (char c : content.toCharArray()) { + i++; + + // handle \r + if (c == '\r') { + if (length != i) { + continue; + } + c = '\n'; + } + + if (c == '\n') { + if (mode == Mode.WHITE_SPACE_PRE) { + switch (state_) { + case EMPTY: + case BLOCK_SEPARATOR_AT_END: + break; + default: + builder_.append('\n'); + state_ = State.NEWLINE_AT_END; + trimRightPos_ = builder_.length(); + break; + } + continue; + } + + if (mode == Mode.WHITE_SPACE_PRE_LINE) { + switch (state_) { + case EMPTY: + case BLOCK_SEPARATOR_AT_END: + break; + case BLANK_AT_END: + builder_.setLength(trimRightPos_); + builder_.append('\n'); + state_ = State.NEWLINE_AT_END; + trimRightPos_ = builder_.length(); + break; + default: + builder_.append('\n'); + state_ = State.NEWLINE_AT_END; + trimRightPos_ = builder_.length(); + break; + } + continue; + } + + switch (state_) { + case EMPTY: + case BLANK_AT_END: + case BLANK_AT_END_AFTER_NEWLINE: + case BLOCK_SEPARATOR_AT_END: + case NEWLINE_AT_END: + case BREAK_AT_END: + case REQUIRED_LINE_BREAK_AT_END: + break; + default: + builder_.append(' '); + state_ = State.BLANK_AT_END; + break; + } + continue; + } + + if (c == ' ' || c == '\t' || c == '\f') { + if (mode == Mode.WHITE_SPACE_PRE) { + if (c == '\t') { + builder_.append('\t'); + state_ = State.BLANK_AT_END; + trimRightPos_ = builder_.length(); + } + else { + builder_.append(' '); + state_ = State.BLANK_AT_END; + trimRightPos_ = builder_.length(); + } + + continue; + } + + if (mode == Mode.WHITE_SPACE_PRE_LINE) { + switch (state_) { + case EMPTY: + case BLANK_AT_END: + case BLANK_AT_END_AFTER_NEWLINE: + case BREAK_AT_END: + case NEWLINE_AT_END: + break; + default: + builder_.append(' '); + state_ = State.BLANK_AT_END; + break; + } + continue; + } + + switch (state_) { + case EMPTY: + case BLANK_AT_END: + case BLANK_AT_END_AFTER_NEWLINE: + case BLOCK_SEPARATOR_AT_END: + case NEWLINE_AT_END: + case BREAK_AT_END: + case REQUIRED_LINE_BREAK_AT_END: + break; + default: + builder_.append(' '); + state_ = State.BLANK_AT_END; + break; + } + continue; + } + +// if (c == (char) 160) { +// builder_.append(' '); +// state = State.BLANK_AT_END; +// trimRightPos = builder_.length(); +// +// if (mode == Mode.WHITE_SPACE_NORMAL || mode == Mode.WHITE_SPACE_PRE_LINE) { +// state = State.DEFAULT; +// } +// continue; +// } + builder_.append(c); + state_ = State.DEFAULT; + trimRightPos_ = builder_.length(); + // contentAdded_ = true; + } + } + +// public void appendBlockSeparator() { +// switch (state_) { +// case EMPTY: +// break; +// case BLANK_AT_END: +// builder_.setLength(trimRightPos_); +// if (builder_.length() == 0) { +// state_ = State.EMPTY; +// } +// else { +// builder_.append('\n'); +// state_ = State.BLOCK_SEPARATOR_AT_END; +// } +// break; +// case BLANK_AT_END_AFTER_NEWLINE: +// builder_.setLength(trimRightPos_ - 1); +// if (builder_.length() == 0) { +// state_ = State.EMPTY; +// } +// else { +// builder_.append('\n'); +// state_ = State.BLOCK_SEPARATOR_AT_END; +// } +// break; +// case BLOCK_SEPARATOR_AT_END: +// break; +// case NEWLINE_AT_END: +// case BREAK_AT_END: +// builder_.setLength(builder_.length() - 1); +// trimRightPos_ = trimRightPos_ - 1; +// if (builder_.length() == 0) { +// state_ = State.EMPTY; +// } +// else { +// builder_.append('\n'); +// state_ = State.BLOCK_SEPARATOR_AT_END; +// } +// break; +// default: +// builder_.append('\n'); +// state_ = State.BLOCK_SEPARATOR_AT_END; +// break; +// } +// } + +// public void appendBreak(final Mode mode) { +// if (ignoreHtmlBreaks_) { +// return; +// } +// +// builder_.setLength(trimRightPos_); +// +// builder_.append('\n'); +// state_ = State.BREAK_AT_END; +// trimRightPos_ = builder_.length(); +// } + +// public void trimRight(final Mode mode) { +// if (mode == Mode.PRE) { +// switch (state_) { +// case BLOCK_SEPARATOR_AT_END: +// case NEWLINE_AT_END: +// case BREAK_AT_END: +// if (trimRightPos_ == builder_.length()) { +// trimRightPos_--; +// } +// break; +// default: +// break; +// } +// } +// +// builder_.setLength(trimRightPos_); +// state_ = State.DEFAULT; +// if (builder_.length() == 0) { +// state_ = State.EMPTY; +// } +// } + +// public boolean wasContentAdded() { +// return contentAdded_; +// } +// +// public void resetContentAdded() { +// contentAdded_ = false; +// } +// +// public void ignoreHtmlBreaks() { +// ignoreHtmlBreaks_ = true; +// } +// +// public void processHtmlBreaks() { +// ignoreHtmlBreaks_ = false; +// } + + public String getText() { + return builder_.substring(0, trimRightPos_); + } + } +} diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/serializer/HtmlSerializerNormalizedText.java b/src/main/java/com/gargoylesoftware/htmlunit/html/serializer/HtmlSerializerNormalizedText.java new file mode 100644 index 000000000..0fbec0578 --- /dev/null +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/serializer/HtmlSerializerNormalizedText.java @@ -0,0 +1,765 @@ +/* + * Copyright (c) 2002-2021 Gargoyle Software Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.gargoylesoftware.htmlunit.html.serializer; + +import java.util.Iterator; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; + +import com.gargoylesoftware.htmlunit.Page; +import com.gargoylesoftware.htmlunit.SgmlPage; +import com.gargoylesoftware.htmlunit.html.DomComment; +import com.gargoylesoftware.htmlunit.html.DomElement; +import com.gargoylesoftware.htmlunit.html.DomNode; +import com.gargoylesoftware.htmlunit.html.DomText; +import com.gargoylesoftware.htmlunit.html.HtmlApplet; +import com.gargoylesoftware.htmlunit.html.HtmlBody; +import com.gargoylesoftware.htmlunit.html.HtmlBreak; +import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput; +import com.gargoylesoftware.htmlunit.html.HtmlDetails; +import com.gargoylesoftware.htmlunit.html.HtmlHiddenInput; +import com.gargoylesoftware.htmlunit.html.HtmlInlineFrame; +import com.gargoylesoftware.htmlunit.html.HtmlInput; +import com.gargoylesoftware.htmlunit.html.HtmlListItem; +import com.gargoylesoftware.htmlunit.html.HtmlNoFrames; +import com.gargoylesoftware.htmlunit.html.HtmlNoScript; +import com.gargoylesoftware.htmlunit.html.HtmlNumberInput; +import com.gargoylesoftware.htmlunit.html.HtmlOption; +import com.gargoylesoftware.htmlunit.html.HtmlOrderedList; +import com.gargoylesoftware.htmlunit.html.HtmlPreformattedText; +import com.gargoylesoftware.htmlunit.html.HtmlRadioButtonInput; +import com.gargoylesoftware.htmlunit.html.HtmlResetInput; +import com.gargoylesoftware.htmlunit.html.HtmlScript; +import com.gargoylesoftware.htmlunit.html.HtmlSelect; +import com.gargoylesoftware.htmlunit.html.HtmlStyle; +import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput; +import com.gargoylesoftware.htmlunit.html.HtmlSummary; +import com.gargoylesoftware.htmlunit.html.HtmlTable; +import com.gargoylesoftware.htmlunit.html.HtmlTableCell; +import com.gargoylesoftware.htmlunit.html.HtmlTableFooter; +import com.gargoylesoftware.htmlunit.html.HtmlTableHeader; +import com.gargoylesoftware.htmlunit.html.HtmlTableRow; +import com.gargoylesoftware.htmlunit.html.HtmlTextArea; +import com.gargoylesoftware.htmlunit.html.HtmlTitle; +import com.gargoylesoftware.htmlunit.html.HtmlUnorderedList; +import com.gargoylesoftware.htmlunit.html.TableRowGroup; +import com.gargoylesoftware.htmlunit.html.serializer.HtmlSerializerNormalizedText.HtmlSerializerTextBuilder.Mode; +import com.gargoylesoftware.htmlunit.javascript.host.Element; + +/** + * Utility to handle conversion from HTML code to string. + * + * @author Marc Guillemot + * @author Ahmed Ashour + * @author Ronald Brill + * @author Rob Kodey + */ +public class HtmlSerializerNormalizedText { + + private boolean ignoreMaskedElements_ = true; + + /** + * Converts an HTML node to text. + * @param node a node + * @return the text representation according to the setting of this serializer + */ + public String asText(final DomNode node) { + final HtmlSerializerTextBuilder builder = new HtmlSerializerTextBuilder(); + appendNode(builder, node); + return builder.getText(); + } + + /** + * Iterate over all Children and call appendNode() for every. + * + * @param builder the StringBuilder to add to + * @param node the node to process + */ + protected void appendChildren(final HtmlSerializerTextBuilder builder, final DomNode node) { + for (final DomNode child : node.getChildren()) { + appendNode(builder, child); + } + } + + /** + * The core distribution method call the different appendXXX + * methods depending on the type of the given node. + * + * @param builder the StringBuilder to add to + * @param node the node to process + */ + protected void appendNode(final HtmlSerializerTextBuilder builder, final DomNode node) { + if (node instanceof DomText) { + appendText(builder, (DomText) node); + } + else if (node instanceof DomComment) { + // nothing to do + } + else if (node instanceof HtmlApplet + && node.getPage().getWebClient().getOptions().isAppletEnabled()) { + // nothing to do + } + else if (node instanceof HtmlBreak) { + appendBreak(builder, (HtmlBreak) node); + } + else if (node instanceof HtmlHiddenInput) { + // nothing to do + } + else if (node instanceof HtmlScript) { + // nothing to do + } + else if (node instanceof HtmlStyle) { + // nothing to do + } + else if (node instanceof HtmlNoFrames) { + // nothing to do + } + else if (node instanceof HtmlTextArea) { + appendTextArea(builder, (HtmlTextArea) node); + } + else if (node instanceof HtmlTitle) { + appendTitle(builder, (HtmlTitle) node); + } + else if (node instanceof HtmlTableRow) { + appendTableRow(builder, (HtmlTableRow) node); + } + else if (node instanceof HtmlSelect) { + appendSelect(builder, (HtmlSelect) node); + } + else if (node instanceof HtmlSubmitInput) { + appendSubmitInput(builder, (HtmlSubmitInput) node); + } + else if (node instanceof HtmlResetInput) { + appendResetInput(builder, (HtmlResetInput) node); + } + else if (node instanceof HtmlCheckBoxInput) { + appendCheckBoxInput(builder, (HtmlCheckBoxInput) node); + } + else if (node instanceof HtmlRadioButtonInput) { + appendRadioButtonInput(builder, (HtmlRadioButtonInput) node); + } + else if (node instanceof HtmlNumberInput) { + appendNumberInput(builder, (HtmlNumberInput) node); + } + else if (node instanceof HtmlInput) { + appendInput(builder, (HtmlInput) node); + } + else if (node instanceof HtmlTable) { + appendTable(builder, (HtmlTable) node); + } + else if (node instanceof HtmlOrderedList) { + appendOrderedList(builder, (HtmlOrderedList) node); + } + else if (node instanceof HtmlUnorderedList) { + appendUnorderedList(builder, (HtmlUnorderedList) node); + } + else if (node instanceof HtmlPreformattedText) { + appendPreformattedText(builder, (HtmlPreformattedText) node); + } + else if (node instanceof HtmlInlineFrame) { + appendInlineFrame(builder, (HtmlInlineFrame) node); + } + else if (node instanceof HtmlDetails) { + appendDetails(builder, (HtmlDetails) node); + } + else if (node instanceof HtmlNoScript && node.getPage().getWebClient().isJavaScriptEnabled()) { + // nothing to do + } + else { + appendDomNode(builder, node); + } + } + + /** + * Process {@link HtmlHiddenInput}. + * + * @param builder the StringBuilder to add to + * @param domNode the target to process + */ + protected void appendDomNode(final HtmlSerializerTextBuilder builder, final DomNode domNode) { + boolean block = false; + if (!(domNode instanceof HtmlBody)) { + final SgmlPage page = domNode.getPage(); + if (page != null && page.getWebClient().isJavaScriptEngineEnabled()) { + final Object scriptableObject = domNode.getScriptableObject(); + if (scriptableObject instanceof Element) { + final Element element = (Element) scriptableObject; + final String display = element.getWindow().getComputedStyle(element, null).getDisplay(); + block = "block".equals(display); + } + } + } + + if (block) { + builder.appendBlockSeparator(); + } + appendChildren(builder, domNode); + if (block) { + builder.appendBlockSeparator(); + } + } + + /** + * Process {@link HtmlSubmitInput}. + * + * @param builder the StringBuilder to add to + * @param htmlSubmitInput the target to process + */ + protected void appendSubmitInput(final HtmlSerializerTextBuilder builder, final HtmlSubmitInput htmlSubmitInput) { + String text = htmlSubmitInput.getValueAttribute(); + if (text == DomElement.ATTRIBUTE_NOT_DEFINED) { + text = HtmlSubmitInput.DEFAULT_VALUE; + } + + builder.append(text, Mode.NORMALIZE); + } + + /** + * Process {@link HtmlInput}. + * + * @param builder the StringBuilder to add to + * @param htmlInput the target to process + */ + protected void appendInput(final HtmlSerializerTextBuilder builder, final HtmlInput htmlInput) { + builder.append(" ", Mode.NORMALIZE); + builder.append(htmlInput.getValueAttribute(), Mode.NORMALIZE); + builder.append(" ", Mode.NORMALIZE); + } + + /** + * Process {@link HtmlNumberInput}. + * + * @param builder the StringBuilder to add to + * @param htmlNumberInput the target to process + */ + protected void appendNumberInput(final HtmlSerializerTextBuilder builder, final HtmlNumberInput htmlNumberInput) { + builder.append(" ", Mode.NORMALIZE); + + String val = htmlNumberInput.getValueAttribute(); + final int lastPos = val.length() - 1; + if (lastPos >= 0 && val.charAt(lastPos) == '.') { + val = val.substring(0, lastPos); + } + builder.append(val, Mode.NORMALIZE); + + builder.append(" ", Mode.NORMALIZE); + } + + /** + * Process {@link HtmlResetInput}. + * + * @param builder the StringBuilder to add to + * @param htmlResetInput the target to process + */ + protected void appendResetInput(final HtmlSerializerTextBuilder builder, final HtmlResetInput htmlResetInput) { + String text = htmlResetInput.getValueAttribute(); + if (text == DomElement.ATTRIBUTE_NOT_DEFINED) { + text = HtmlResetInput.DEFAULT_VALUE; + } + + builder.append(text, Mode.NORMALIZE); + } + + /** + * Process {@link HtmlUnorderedList}. + * @param builder the StringBuilder to add to + * @param htmlUnorderedList the target to process + */ + protected void appendUnorderedList(final HtmlSerializerTextBuilder builder, + final HtmlUnorderedList htmlUnorderedList) { + builder.appendBlockSeparator(); + boolean first = true; + for (final DomNode item : htmlUnorderedList.getChildren()) { + if (!first) { + builder.appendBlockSeparator(); + } + first = false; + appendNode(builder, item); + } + builder.appendBlockSeparator(); + } + + /** + * Process {@link HtmlDetails}. + * @param builder the StringBuilder to add to + * @param htmlDetails the target to process + */ + protected void appendDetails(final HtmlSerializerTextBuilder builder, + final HtmlDetails htmlDetails) { + if (htmlDetails.isOpen()) { + appendChildren(builder, htmlDetails); + return; + } + + for (final DomNode child : htmlDetails.getChildren()) { + if (child instanceof HtmlSummary) { + appendNode(builder, child); + } + } + } + + /** + * Process {@link HtmlTitle}. + * @param builder the StringBuilder to add to + * @param htmlTitle the target to process + */ + protected void appendTitle(final HtmlSerializerTextBuilder builder, final HtmlTitle htmlTitle) { + // optimized version + // for the title there is no need to check the visibility + // of the containing dom text; + // this optimization defers the load of the style sheets + final DomNode child = htmlTitle.getFirstChild(); + if (child instanceof DomText) { + builder.append(((DomText) child).getData(), Mode.NORMALIZE); + builder.appendBlockSeparator(); + } + } + + /** + * Process {@link HtmlTableRow}. + * + * @param builder the StringBuilder to add to + * @param htmlTableRow the target to process + */ + protected void appendTableRow(final HtmlSerializerTextBuilder builder, final HtmlTableRow htmlTableRow) { + boolean first = true; + for (final HtmlTableCell cell : htmlTableRow.getCells()) { + if (!first) { + builder.appendTab(); + } + else { + first = false; + } + appendChildren(builder, cell); // trim? + } + } + + /** + * Process {@link HtmlTextArea}. + * + * @param builder the StringBuilder to add to + * @param htmlTextArea the target to process + */ + protected void appendTextArea(final HtmlSerializerTextBuilder builder, final HtmlTextArea htmlTextArea) { + if (isVisible(htmlTextArea)) { + builder.append(htmlTextArea.getText(), Mode.PRESERVE_BLANK_NEWLINE); + } + } + + /** + * Process {@link HtmlTable}. + * + * @param builder the StringBuilder to add to + * @param htmlTable the target to process + */ + protected void appendTable(final HtmlSerializerTextBuilder builder, final HtmlTable htmlTable) { + builder.appendBlockSeparator(); + final String caption = htmlTable.getCaptionText(); + if (caption != null) { + builder.append(caption, Mode.NORMALIZE); + builder.appendBlockSeparator(); + } + + boolean first = true; + + // first thead has to be displayed first and first tfoot has to be displayed last + final HtmlTableHeader tableHeader = htmlTable.getHeader(); + if (tableHeader != null) { + first = appendTableRows(builder, tableHeader.getRows(), true, null, null); + } + final HtmlTableFooter tableFooter = htmlTable.getFooter(); + + final List tableRows = htmlTable.getRows(); + first = appendTableRows(builder, tableRows, first, tableHeader, tableFooter); + + if (tableFooter != null) { + first = appendTableRows(builder, tableFooter.getRows(), first, null, null); + } + else if (tableRows.isEmpty()) { + final DomNode firstChild = htmlTable.getFirstChild(); + if (firstChild != null) { + appendNode(builder, firstChild); + } + } + + builder.appendBlockSeparator(); + } + + /** + * Process {@link HtmlTableRow}. + * + * @param builder the StringBuilder to add to + * @param rows the rows + * @param first if true this is the first one + * @param skipParent1 skip row if the parent is this + * @param skipParent2 skip row if the parent is this + * @return true if this was the first one + */ + protected boolean appendTableRows(final HtmlSerializerTextBuilder builder, + final List rows, boolean first, final TableRowGroup skipParent1, + final TableRowGroup skipParent2) { + for (final HtmlTableRow row : rows) { + if (row.getParentNode() == skipParent1 || row.getParentNode() == skipParent2) { + continue; + } + if (!first) { + builder.appendBlockSeparator(); + } + first = false; + appendTableRow(builder, row); + } + return first; + } + + /** + * Process {@link HtmlSelect}. + * + * @param builder the StringBuilder to add to + * @param htmlSelect the target to process + */ + protected void appendSelect(final HtmlSerializerTextBuilder builder, final HtmlSelect htmlSelect) { + final List options = htmlSelect.getSelectedOptions(); + + for (final Iterator i = options.iterator(); i.hasNext();) { + final HtmlOption currentOption = i.next(); + appendChildren(builder, currentOption); + if (i.hasNext()) { + builder.appendBlockSeparator(); + } + } + } + + /** + * Process {@link HtmlOrderedList} taking care to numerate it. + * + * @param builder the StringBuilder to add to + * @param htmlOrderedList the OL element + */ + protected void appendOrderedList(final HtmlSerializerTextBuilder builder, final HtmlOrderedList htmlOrderedList) { + builder.appendBlockSeparator(); + boolean first = true; + int i = 1; + for (final DomNode item : htmlOrderedList.getChildren()) { + if (!first) { + builder.appendBlockSeparator(); + } + first = false; + if (item instanceof HtmlListItem) { + builder.append(Integer.toString(i++), Mode.NORMALIZE); + builder.append(". ", Mode.NORMALIZE); + appendChildren(builder, item); + } + else { + appendNode(builder, item); + } + } + builder.appendBlockSeparator(); + } + + /** + * Process {@link HtmlPreformattedText}. + * + * @param builder the StringBuilder to add to + * @param htmlPreformattedText the target to process + */ + protected void appendPreformattedText(final HtmlSerializerTextBuilder builder, + final HtmlPreformattedText htmlPreformattedText) { + if (isVisible(htmlPreformattedText)) { + builder.appendBlockSeparator(); + builder.append(htmlPreformattedText.getTextContent(), Mode.PRESERVE_BLANK_TAB_NEWLINE); + builder.appendBlockSeparator(); + } + } + + /** + * Process {@link HtmlInlineFrame}. + * + * @param builder the StringBuilder to add to + * @param htmlInlineFrame the target to process + */ + protected void appendInlineFrame(final HtmlSerializerTextBuilder builder, + final HtmlInlineFrame htmlInlineFrame) { + if (isVisible(htmlInlineFrame)) { + builder.appendBlockSeparator(); + final Page page = htmlInlineFrame.getEnclosedPage(); + if (page instanceof SgmlPage) { + builder.append(((SgmlPage) page).asNormalizedText(), Mode.NORMALIZE); + } + builder.appendBlockSeparator(); + } + } + + /** + * Process {@link DomText}. + * + * @param builder the StringBuilder to add to + * @param domText the target to process + */ + protected void appendText(final HtmlSerializerTextBuilder builder, final DomText domText) { + final DomNode parent = domText.getParentNode(); + if (parent == null || parent instanceof HtmlTitle || isVisible(parent)) { + builder.append(domText.getData(), Mode.NORMALIZE); + } + } + + /** + * Process {@link HtmlBreak}. + * + * @param builder the StringBuilder to add to + * @param htmlBreak the target to process + */ + protected void appendBreak(final HtmlSerializerTextBuilder builder, final HtmlBreak htmlBreak) { + builder.appendNewLine(); + } + + /** + * Process {@link HtmlCheckBoxInput}. + * + * @param builder the StringBuilder to add to + * @param htmlCheckBoxInput the target to process + */ + protected void appendCheckBoxInput(final HtmlSerializerTextBuilder builder, + final HtmlCheckBoxInput htmlCheckBoxInput) { + if (htmlCheckBoxInput.isChecked()) { + builder.append("checked", Mode.NORMALIZE); + } + else { + builder.append("unchecked", Mode.NORMALIZE); + } + } + + /** + * Process {@link HtmlRadioButtonInput}. + * + * @param builder the StringBuilder to add to + * @param htmlRadioButtonInput the target to process + */ + protected void appendRadioButtonInput(final HtmlSerializerTextBuilder builder, + final HtmlRadioButtonInput htmlRadioButtonInput) { + if (htmlRadioButtonInput.isChecked()) { + builder.append("checked", Mode.NORMALIZE); + } + else { + builder.append("unchecked", Mode.NORMALIZE); + } + } + + private boolean isVisible(final DomNode node) { + return !ignoreMaskedElements_ || node.isDisplayed(); + } + + /** + * Indicates if element that are not displayed due to style settings + * (visibility or display) should be visible in generated text. + * @param ignore indicates if masked elements should be ignored or not + */ + public void setIgnoreMaskedElements(final boolean ignore) { + ignoreMaskedElements_ = ignore; + } + + protected static class HtmlSerializerTextBuilder { + /** Mode. */ + protected enum Mode { + /** Collapse whitespace. */ + NORMALIZE, + + /** Preserve tab, blank, newline. */ + PRESERVE_BLANK_TAB_NEWLINE, + + /** Preserve blank, newline. */ + PRESERVE_BLANK_NEWLINE + } + + private enum State { + DEFAULT, + EMPTY, + TRIM, + BLANK_AT_END, + BLANK_AT_END_AFTER_NEWLINE, + NEWLINE_AT_END, + BLOCK_SEPARATOR_AT_END + } + + private static final String LINE_SEPARATOR = "\n"; + private static final int LINE_SEPARATOR_LENGTH = LINE_SEPARATOR.length(); + + private State state_; + private final StringBuilder builder_; + private int trimRightPos_; + + public HtmlSerializerTextBuilder() { + builder_ = new StringBuilder(); + state_ = State.EMPTY; + trimRightPos_ = builder_.length(); + } + + public void append(final String content, final Mode mode) { + final int length = content.length(); + if (length == 0) { + return; + } + + String text = content; + if (mode == Mode.PRESERVE_BLANK_NEWLINE) { + text = StringUtils.stripEnd(text, null); + } + + boolean crFound = false; + for (final char c : text.toCharArray()) { + if (mode == Mode.NORMALIZE) { + if (isSpace(c)) { + switch (state_) { + case EMPTY: + case TRIM: + case BLANK_AT_END: + case BLANK_AT_END_AFTER_NEWLINE: + case BLOCK_SEPARATOR_AT_END: + break; + case NEWLINE_AT_END: + builder_.append(' '); + state_ = State.BLANK_AT_END_AFTER_NEWLINE; + break; + default: + builder_.append(' '); + state_ = State.BLANK_AT_END; + break; + } + } + else if (c == (char) 160) { + builder_.append(' '); + state_ = State.DEFAULT; + trimRightPos_ = builder_.length(); + } + else { + builder_.append(c); + state_ = State.DEFAULT; + trimRightPos_ = builder_.length(); + } + continue; + } + + // preserve mode + if (c == '\n') { + appendNewLine(); + crFound = false; + } + else { + if (crFound) { + appendNewLine(); + } + crFound = c == '\r'; + + if (c == '\t') { + if (mode == Mode.PRESERVE_BLANK_TAB_NEWLINE) { + appendTab(); + } + else if (state_ != State.BLOCK_SEPARATOR_AT_END) { + builder_.append(' '); + } + } + else if (c == (char) 160) { + appendBlank(); + } + else if (c == ' ') { + appendBlank(); + } + else { + builder_.append(c); + } + trimRightPos_ = builder_.length(); + } + } + + if (crFound) { + appendNewLine(); + } + + if (mode != Mode.NORMALIZE) { + // reset state to empty to restart whitespace normalization afterwards + state_ = State.TRIM; + } + } + + public void appendBlockSeparator() { + switch (state_) { + case EMPTY: + break; + case BLANK_AT_END: + builder_.setLength(trimRightPos_); + if (builder_.length() == 0) { + state_ = State.EMPTY; + } + else { + builder_.append(LINE_SEPARATOR); + state_ = State.BLOCK_SEPARATOR_AT_END; + } + break; + case BLANK_AT_END_AFTER_NEWLINE: + builder_.setLength(trimRightPos_ - LINE_SEPARATOR_LENGTH); + trimRightPos_ = trimRightPos_ - LINE_SEPARATOR_LENGTH; + if (builder_.length() == 0) { + state_ = State.EMPTY; + } + else { + builder_.append(LINE_SEPARATOR); + state_ = State.BLOCK_SEPARATOR_AT_END; + } + break; + case BLOCK_SEPARATOR_AT_END: + break; + case NEWLINE_AT_END: + builder_.setLength(builder_.length() - LINE_SEPARATOR_LENGTH); + trimRightPos_ = trimRightPos_ - LINE_SEPARATOR_LENGTH; + if (builder_.length() == 0) { + state_ = State.EMPTY; + } + else { + builder_.append(LINE_SEPARATOR); + state_ = State.BLOCK_SEPARATOR_AT_END; + } + break; + default: + builder_.append(LINE_SEPARATOR); + state_ = State.BLOCK_SEPARATOR_AT_END; + break; + } + } + + public void appendNewLine() { + builder_.append(LINE_SEPARATOR); + state_ = State.NEWLINE_AT_END; + trimRightPos_ = builder_.length(); + } + + public void appendTab() { + builder_.append('\t'); + trimRightPos_ = builder_.length(); + } + + private void appendBlank() { + builder_.append(' '); + trimRightPos_ = builder_.length(); + } + + public String getText() { + return builder_.substring(0, trimRightPos_); + } + + private static boolean isSpace(final char ch) { + return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\f' || ch == '\r'; + } + } +} diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSerializerVisibleText.java b/src/main/java/com/gargoylesoftware/htmlunit/html/serializer/HtmlSerializerVisibleText.java similarity index 89% rename from src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSerializerVisibleText.java rename to src/main/java/com/gargoylesoftware/htmlunit/html/serializer/HtmlSerializerVisibleText.java index 8ee3593f7..7668e3a43 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlSerializerVisibleText.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/serializer/HtmlSerializerVisibleText.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.gargoylesoftware.htmlunit.html; +package com.gargoylesoftware.htmlunit.html.serializer; import java.util.List; @@ -20,7 +20,40 @@ import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.SgmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlSerializerVisibleText.HtmlSerializerTextBuilder.Mode; +import com.gargoylesoftware.htmlunit.html.DomComment; +import com.gargoylesoftware.htmlunit.html.DomNode; +import com.gargoylesoftware.htmlunit.html.DomText; +import com.gargoylesoftware.htmlunit.html.HtmlApplet; +import com.gargoylesoftware.htmlunit.html.HtmlBody; +import com.gargoylesoftware.htmlunit.html.HtmlBreak; +import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput; +import com.gargoylesoftware.htmlunit.html.HtmlDetails; +import com.gargoylesoftware.htmlunit.html.HtmlHiddenInput; +import com.gargoylesoftware.htmlunit.html.HtmlInlineFrame; +import com.gargoylesoftware.htmlunit.html.HtmlInput; +import com.gargoylesoftware.htmlunit.html.HtmlMenu; +import com.gargoylesoftware.htmlunit.html.HtmlNoFrames; +import com.gargoylesoftware.htmlunit.html.HtmlNoScript; +import com.gargoylesoftware.htmlunit.html.HtmlOption; +import com.gargoylesoftware.htmlunit.html.HtmlOrderedList; +import com.gargoylesoftware.htmlunit.html.HtmlPreformattedText; +import com.gargoylesoftware.htmlunit.html.HtmlRadioButtonInput; +import com.gargoylesoftware.htmlunit.html.HtmlResetInput; +import com.gargoylesoftware.htmlunit.html.HtmlScript; +import com.gargoylesoftware.htmlunit.html.HtmlSelect; +import com.gargoylesoftware.htmlunit.html.HtmlStyle; +import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput; +import com.gargoylesoftware.htmlunit.html.HtmlSummary; +import com.gargoylesoftware.htmlunit.html.HtmlTable; +import com.gargoylesoftware.htmlunit.html.HtmlTableCell; +import com.gargoylesoftware.htmlunit.html.HtmlTableFooter; +import com.gargoylesoftware.htmlunit.html.HtmlTableHeader; +import com.gargoylesoftware.htmlunit.html.HtmlTableRow; +import com.gargoylesoftware.htmlunit.html.HtmlTextArea; +import com.gargoylesoftware.htmlunit.html.HtmlTitle; +import com.gargoylesoftware.htmlunit.html.HtmlUnorderedList; +import com.gargoylesoftware.htmlunit.html.TableRowGroup; +import com.gargoylesoftware.htmlunit.html.serializer.HtmlSerializerVisibleText.HtmlSerializerTextBuilder.Mode; import com.gargoylesoftware.htmlunit.javascript.host.Element; import com.gargoylesoftware.htmlunit.javascript.host.css.ComputedCSSStyleDeclaration; import com.gargoylesoftware.htmlunit.javascript.host.css.StyleAttributes.Definition; @@ -117,10 +150,10 @@ else if (node instanceof HtmlResetInput) { appendResetInput(builder, (HtmlResetInput) node, mode); } else if (node instanceof HtmlCheckBoxInput) { - doAppendCheckBoxInput(builder, (HtmlCheckBoxInput) node, mode); + appendCheckBoxInput(builder, (HtmlCheckBoxInput) node, mode); } else if (node instanceof HtmlRadioButtonInput) { - doAppendRadioButtonInput(builder, (HtmlRadioButtonInput) node, mode); + appendRadioButtonInput(builder, (HtmlRadioButtonInput) node, mode); } else if (node instanceof HtmlInput) { // nothing @@ -143,6 +176,9 @@ else if (node instanceof HtmlInlineFrame) { else if (node instanceof HtmlMenu) { appendMenu(builder, (HtmlMenu) node, mode); } + else if (node instanceof HtmlDetails) { + appendDetails(builder, (HtmlDetails) node, mode); + } else if (node instanceof HtmlNoScript && node.getPage().getWebClient().isJavaScriptEnabled()) { appendNoScript(builder, (HtmlNoScript) node, mode); } @@ -152,7 +188,7 @@ else if (node instanceof HtmlNoScript && node.getPage().getWebClient().isJavaScr } /** - * Process {@link HtmlHiddenInput}. + * Process {@link DomNode}. * * @param builder the StringBuilder to add to * @param domNode the target to process @@ -299,6 +335,26 @@ protected void appendMenu(final HtmlSerializerTextBuilder builder, builder.appendBlockSeparator(); } + /** + * Process {@link HtmlDetails}. + * @param builder the StringBuilder to add to + * @param htmlDetails the target to process + * @param mode the {@link Mode} to use for processing + */ + protected void appendDetails(final HtmlSerializerTextBuilder builder, + final HtmlDetails htmlDetails, final Mode mode) { + if (htmlDetails.isOpen()) { + appendChildren(builder, htmlDetails, mode); + return; + } + + for (final DomNode child : htmlDetails.getChildren()) { + if (child instanceof HtmlSummary) { + appendNode(builder, child, mode); + } + } + } + /** * Process {@link HtmlTitle}. * @param builder the StringBuilder to add to @@ -340,7 +396,7 @@ protected void appendTableRow(final HtmlSerializerTextBuilder builder, */ protected void appendTextArea(final HtmlSerializerTextBuilder builder, final HtmlTextArea htmlTextArea, final Mode mode) { - if (isVisible(htmlTextArea)) { + if (htmlTextArea.isDisplayed()) { builder.append(htmlTextArea.getDefaultValue(), whiteSpaceStyle(htmlTextArea, Mode.PRE)); builder.trimRight(Mode.PRE); } @@ -517,7 +573,7 @@ protected void appendUnorderedList(final HtmlSerializerTextBuilder builder, */ protected void appendPreformattedText(final HtmlSerializerTextBuilder builder, final HtmlPreformattedText htmlPreformattedText, final Mode mode) { - if (isVisible(htmlPreformattedText)) { + if (htmlPreformattedText.isDisplayed()) { builder.appendBlockSeparator(); appendChildren(builder, htmlPreformattedText, whiteSpaceStyle(htmlPreformattedText, Mode.PRE)); builder.appendBlockSeparator(); @@ -533,7 +589,7 @@ protected void appendPreformattedText(final HtmlSerializerTextBuilder builder, */ protected void appendInlineFrame(final HtmlSerializerTextBuilder builder, final HtmlInlineFrame htmlInlineFrame, final Mode mode) { - if (isVisible(htmlInlineFrame)) { + if (htmlInlineFrame.isDisplayed()) { builder.appendBlockSeparator(); final Page page = htmlInlineFrame.getEnclosedPage(); if (page instanceof SgmlPage) { @@ -552,7 +608,15 @@ protected void appendInlineFrame(final HtmlSerializerTextBuilder builder, */ protected void appendText(final HtmlSerializerTextBuilder builder, final DomText domText, final Mode mode) { final DomNode parent = domText.getParentNode(); - if (parent == null || parent instanceof HtmlTitle || isVisible(parent)) { + if (parent instanceof HtmlTitle + || parent instanceof HtmlScript) { + builder.append(domText.getData(), Mode.WHITE_SPACE_PRE_LINE); + } + + if (parent == null + || parent instanceof HtmlTitle + || parent instanceof HtmlScript + || parent.isDisplayed()) { builder.append(domText.getData(), mode); } } @@ -600,7 +664,7 @@ protected void appendBreak(final HtmlSerializerTextBuilder builder, * @param htmlCheckBoxInput the target to process * @param mode the {@link Mode} to use for processing */ - protected void doAppendCheckBoxInput(final HtmlSerializerTextBuilder builder, + protected void appendCheckBoxInput(final HtmlSerializerTextBuilder builder, final HtmlCheckBoxInput htmlCheckBoxInput, final Mode mode) { // nothing to do } @@ -612,15 +676,11 @@ protected void doAppendCheckBoxInput(final HtmlSerializerTextBuilder builder, * @param htmlRadioButtonInput the target to process * @param mode the {@link Mode} to use for processing */ - protected void doAppendRadioButtonInput(final HtmlSerializerTextBuilder builder, + protected void appendRadioButtonInput(final HtmlSerializerTextBuilder builder, final HtmlRadioButtonInput htmlRadioButtonInput, final Mode mode) { // nothing to do } - private boolean isVisible(final DomNode node) { - return node.isDisplayed(); - } - private Mode whiteSpaceStyle(final DomNode domNode, final Mode defaultMode) { final Object scriptableObject = domNode.getScriptableObject(); if (scriptableObject instanceof Node) { diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/serializer/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/html/serializer/package-info.java new file mode 100644 index 000000000..6b4b655ef --- /dev/null +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/serializer/package-info.java @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2002-2021 Gargoyle Software Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Contains the html serializer implementations. + */ +package com.gargoylesoftware.htmlunit.html.serializer; diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/HtmlUnitPrefixResolver.java b/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/HtmlUnitPrefixResolver.java index 186184984..a8bc09d8a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/HtmlUnitPrefixResolver.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/HtmlUnitPrefixResolver.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/LowerCaseFunction.java b/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/LowerCaseFunction.java index 0373f590a..221c0ed3c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/LowerCaseFunction.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/LowerCaseFunction.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/XPathAdapter.java b/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/XPathAdapter.java index d6006806a..5b35a139d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/XPathAdapter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/XPathAdapter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/XPathHelper.java b/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/XPathHelper.java index 6beec437b..6d2c451e3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/XPathHelper.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/XPathHelper.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/package-info.java index a0191f836..73d7723c8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/html/xpath/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitBrowserCompatCookieHeaderValueFormatter.java b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitBrowserCompatCookieHeaderValueFormatter.java index 48226e8c8..4c45b3a42 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitBrowserCompatCookieHeaderValueFormatter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitBrowserCompatCookieHeaderValueFormatter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitBrowserCompatCookieSpec.java b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitBrowserCompatCookieSpec.java index 9bed30dae..09f0a4934 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitBrowserCompatCookieSpec.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitBrowserCompatCookieSpec.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -103,7 +103,8 @@ public HtmlUnitBrowserCompatCookieSpec(final BrowserVersion browserVersion) { new BasicSecureHandler(), new BasicCommentHandler(), new HtmlUnitExpiresHandler(browserVersion), - new HtmlUnitHttpOnlyHandler()); + new HtmlUnitHttpOnlyHandler(), + new HtmlUnitSameSiteHandler()); } /** diff --git a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitCookieSpecProvider.java b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitCookieSpecProvider.java index 190bbef4a..93dbb2224 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitCookieSpecProvider.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitCookieSpecProvider.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitCookieStore.java b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitCookieStore.java index c776e0c74..1c6087903 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitCookieStore.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitCookieStore.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitDomainHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitDomainHandler.java index 659d3601f..70fd8cbff 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitDomainHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitDomainHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitExpiresHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitExpiresHandler.java index 9fe2e8255..32262239c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitExpiresHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitExpiresHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,9 +18,7 @@ import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTTP_COOKIE_EXTENDED_DATE_PATTERNS_2; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTTP_COOKIE_START_DATE_1970; -import java.util.Calendar; import java.util.Date; -import java.util.Locale; import org.apache.http.client.utils.DateUtils; import org.apache.http.cookie.MalformedCookieException; @@ -108,12 +106,6 @@ public void parse(final SetCookie cookie, String value) throws MalformedCookieEx } if (browserVersion_.hasFeature(HTTP_COOKIE_EXTENDED_DATE_PATTERNS_2)) { - final Calendar calendar = Calendar.getInstance(Locale.ROOT); - calendar.setTimeZone(DateUtils.GMT); - calendar.set(1969, Calendar.JANUARY, 1, 0, 0, 0); - calendar.set(Calendar.MILLISECOND, 0); - startDate = calendar.getTime(); - datePatterns = EXTENDED_DATE_PATTERNS_2; } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitHttpOnlyHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitHttpOnlyHandler.java index 78c1a5257..9c70672b2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitHttpOnlyHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitHttpOnlyHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitPathHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitPathHandler.java index 3d0a54f6d..d0bb4205b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitPathHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitPathHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitRedirectStrategie.java b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitRedirectStrategie.java index 6e307d6fd..2f8dbb302 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitRedirectStrategie.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitRedirectStrategie.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitSSLConnectionSocketFactory.java b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitSSLConnectionSocketFactory.java index 47995bceb..0741ebdc6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitSSLConnectionSocketFactory.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitSSLConnectionSocketFactory.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitSameSiteHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitSameSiteHandler.java new file mode 100644 index 000000000..c0ca3c74d --- /dev/null +++ b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitSameSiteHandler.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2021 Gargoyle Software Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.gargoylesoftware.htmlunit.httpclient; + +import org.apache.commons.lang3.StringUtils; + +/** + * Customized CookieAttributeHandler for handling of the samesite attribute. + * + * @author Ronald Brill + */ +import org.apache.http.cookie.CommonCookieAttributeHandler; +import org.apache.http.cookie.Cookie; +import org.apache.http.cookie.CookieOrigin; +import org.apache.http.cookie.MalformedCookieException; +import org.apache.http.cookie.SetCookie; +import org.apache.http.impl.cookie.BasicClientCookie; + +final class HtmlUnitSameSiteHandler implements CommonCookieAttributeHandler { + + private static final String SAMESITE_ATTR = "samesite"; + + @Override + public void validate(final Cookie cookie, final CookieOrigin origin) throws MalformedCookieException { + // nothing + } + + @Override + public void parse(final SetCookie cookie, final String value) throws MalformedCookieException { + ((BasicClientCookie) cookie).setAttribute(SAMESITE_ATTR, StringUtils.toRootLowerCase(value)); + } + + @Override + public boolean match(final Cookie cookie, final CookieOrigin origin) { + return true; + } + + @Override + public String getAttributeName() { + return SAMESITE_ATTR; + } +} diff --git a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitVersionAttributeHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitVersionAttributeHandler.java index 913843cf6..a9d9517ec 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitVersionAttributeHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/HtmlUnitVersionAttributeHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/SocksConnectionSocketFactory.java b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/SocksConnectionSocketFactory.java index 18bc0e5b4..989590f9f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/SocksConnectionSocketFactory.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/SocksConnectionSocketFactory.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/package-info.java index 602cec1f2..c92c8efd3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/httpclient/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/httpclient/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/AbstractJavaScriptEngine.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/AbstractJavaScriptEngine.java index 4e5d530d5..fdcfd32ba 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/AbstractJavaScriptEngine.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/AbstractJavaScriptEngine.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebugFrameAdapter.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebugFrameAdapter.java index 49a37058f..636f399a3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebugFrameAdapter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebugFrameAdapter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebugFrameImpl.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebugFrameImpl.java index ffbd5cbd7..b9fc570a4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebugFrameImpl.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebugFrameImpl.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebuggerAdapter.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebuggerAdapter.java index 8bd9dcb97..b002ef248 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebuggerAdapter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebuggerAdapter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebuggerImpl.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebuggerImpl.java index 55974108a..733475552 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebuggerImpl.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/DebuggerImpl.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/DefaultJavaScriptErrorListener.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/DefaultJavaScriptErrorListener.java index 6010c1b7f..a282707d4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/DefaultJavaScriptErrorListener.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/DefaultJavaScriptErrorListener.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/FunctionWrapper.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/FunctionWrapper.java index 46ead12a7..69dd99fb5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/FunctionWrapper.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/FunctionWrapper.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/HiddenFunctionObject.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/HiddenFunctionObject.java index d0e5ac58b..5ba17b170 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/HiddenFunctionObject.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/HiddenFunctionObject.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitContextFactory.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitContextFactory.java index 688d2d4c1..102375bbd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitContextFactory.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitContextFactory.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitScriptable.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitScriptable.java index 15d721847..4691ba240 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitScriptable.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitScriptable.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitWrapFactory.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitWrapFactory.java index 660b3510b..5cc15b618 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitWrapFactory.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/HtmlUnitWrapFactory.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine.java index 34548c917..9ecdd7010 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -82,6 +82,7 @@ import net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime; import net.sourceforge.htmlunit.corejs.javascript.Scriptable; import net.sourceforge.htmlunit.corejs.javascript.ScriptableObject; +import net.sourceforge.htmlunit.corejs.javascript.StackStyle; import net.sourceforge.htmlunit.corejs.javascript.Symbol; import net.sourceforge.htmlunit.corejs.javascript.UniqueTag; @@ -151,7 +152,7 @@ public JavaScriptEngine(final WebClient webClient) { initTransientFields(); jsConfig_ = JavaScriptConfiguration.getInstance(webClient.getBrowserVersion()); - RhinoException.useMozillaStackStyle(true); + RhinoException.setStackStyle(StackStyle.MOZILLA_LF); } /** @@ -225,8 +226,7 @@ private void init(final WebWindow webWindow, final Page page, final Context cont } // remove some objects, that Rhino defines in top scope but that we don't want - deleteProperties(window, "Continuation"); - deleteProperties(window, "Iterator", "StopIteration"); + deleteProperties(window, "Continuation", "Iterator", "StopIteration", "BigInt"); if (!browserVersion.hasFeature(JS_SYMBOL)) { deleteProperties(window, "Symbol"); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptErrorListener.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptErrorListener.java index 8e0b82622..958d432e2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptErrorListener.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptErrorListener.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/MethodWrapper.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/MethodWrapper.java index fca7419b5..af4cf3ec9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/MethodWrapper.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/MethodWrapper.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/NamedNodeMap.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/NamedNodeMap.java index af543ba56..b70761861 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/NamedNodeMap.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/NamedNodeMap.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/NativeFunctionToStringFunction.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/NativeFunctionToStringFunction.java index 0f41e1e5f..7b5806d1e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/NativeFunctionToStringFunction.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/NativeFunctionToStringFunction.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/PostponedAction.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/PostponedAction.java index 12fd59cf8..4fd7f4605 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/PostponedAction.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/PostponedAction.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,21 +22,15 @@ * An action triggered by a script execution but that should be executed first when the script is finished. * Example: when a script sets the source of an (i)frame, the request to the specified page will be first * triggered after the script execution. + * * @author Marc Guillemot + * @author Ronald Brill */ public abstract class PostponedAction { private final WeakReference owningPageRef_; // as weak ref in case it may allow page to be GCed private final String description_; - /** - * C'tor. - * @param owningPage the page that initiates this action - */ - public PostponedAction(final Page owningPage) { - this(owningPage, null); - } - /** * C'tor. * @param owningPage the page that initiates this action diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/RecursiveFunctionObject.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/RecursiveFunctionObject.java index 50ef42771..e82949613 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/RecursiveFunctionObject.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/RecursiveFunctionObject.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/ScriptableWrapper.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/ScriptableWrapper.java index 67cff2f5d..1ab8a333d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/ScriptableWrapper.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/ScriptableWrapper.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/SilentJavaScriptErrorListener.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/SilentJavaScriptErrorListener.java index aad6b2a66..f8e85327d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/SilentJavaScriptErrorListener.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/SilentJavaScriptErrorListener.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptable.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptable.java index b95cebcc3..7eaf43b67 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptable.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptable.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptableProxy.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptableProxy.java index 28a147e2d..41d366174 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptableProxy.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/SimpleScriptableProxy.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/TimeoutError.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/TimeoutError.java index b162b40c2..25ba3dbae 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/TimeoutError.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/TimeoutError.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/BackgroundJavaScriptFactory.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/BackgroundJavaScriptFactory.java index a126ea22c..0d8c0c11e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/BackgroundJavaScriptFactory.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/BackgroundJavaScriptFactory.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/BasicJavaScriptJob.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/BasicJavaScriptJob.java index 33db1cd2f..df12ee249 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/BasicJavaScriptJob.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/BasicJavaScriptJob.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/DefaultJavaScriptExecutor.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/DefaultJavaScriptExecutor.java index 59196ad4f..79198131e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/DefaultJavaScriptExecutor.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/DefaultJavaScriptExecutor.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/DownloadBehaviorJob.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/DownloadBehaviorJob.java index af5c717d2..8a6c00fdf 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/DownloadBehaviorJob.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/DownloadBehaviorJob.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptExecutionJob.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptExecutionJob.java index c5154a1af..acc437fbc 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptExecutionJob.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptExecutionJob.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptExecutor.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptExecutor.java index 7aafc9d6f..8fcfedc1b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptExecutor.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptExecutor.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptFunctionJob.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptFunctionJob.java index 87ee36a0b..f7354a9af 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptFunctionJob.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptFunctionJob.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptJob.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptJob.java index 6200f2fce..26242a94e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptJob.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptJob.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptJobManager.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptJobManager.java index 183013c6f..03b63d313 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptJobManager.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptJobManager.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptJobManagerImpl.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptJobManagerImpl.java index 6ffa7e8c0..e8b38cb3f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptJobManagerImpl.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptJobManagerImpl.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptStringJob.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptStringJob.java index 0298cf4a9..0ba728560 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptStringJob.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavaScriptStringJob.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavascriptXMLHttpRequestJob.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavascriptXMLHttpRequestJob.java index 0a4f47cf1..053fb53eb 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavascriptXMLHttpRequestJob.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/JavascriptXMLHttpRequestJob.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/package-info.java index 471f7430c..14434519b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/background/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/AbstractJavaScriptConfiguration.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/AbstractJavaScriptConfiguration.java index 3cd54298b..4e10477e6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/AbstractJavaScriptConfiguration.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/AbstractJavaScriptConfiguration.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/BrowserFeature.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/BrowserFeature.java index d20cac36a..464452a88 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/BrowserFeature.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/BrowserFeature.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/ClassConfiguration.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/ClassConfiguration.java index a6e542eb6..776850fa1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/ClassConfiguration.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/ClassConfiguration.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JavaScriptConfiguration.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JavaScriptConfiguration.java index 5f57a6208..4b60504db 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JavaScriptConfiguration.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JavaScriptConfiguration.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -441,7 +441,7 @@ public final class JavaScriptConfiguration extends AbstractJavaScriptConfigurati HTMLAnchorElement.class, HTMLAppletElement.class, HTMLAreaElement.class, HTMLAudioElement.class, HTMLBaseElement.class, HTMLBaseFontElement.class, HTMLBGSoundElement.class, HTMLBlockElement.class, HTMLBodyElement.class, HTMLBRElement.class, HTMLButtonElement.class, - HTMLCanvasElement.class, HTMLCollection.class, HTMLContentElement.class, + HTMLCanvasElement.class, HTMLCollection.class, HTMLDataElement.class, HTMLDataListElement.class, HTMLDDElement.class, HTMLDetailsElement.class, HTMLDialogElement.class, HTMLDirectoryElement.class, HTMLDivElement.class, HTMLDListElement.class, HTMLDocument.class, HTMLDTElement.class, HTMLElement.class, @@ -459,7 +459,7 @@ public final class JavaScriptConfiguration extends AbstractJavaScriptConfigurati HTMLOptionElement.class, HTMLOptionsCollection.class, HTMLOutputElement.class, HTMLParagraphElement.class, HTMLParamElement.class, HTMLPhraseElement.class, HTMLPictureElement.class, HTMLPreElement.class, HTMLProgressElement.class, HTMLQuoteElement.class, HTMLScriptElement.class, - HTMLSelectElement.class, HTMLShadowElement.class, HTMLSlotElement.class, HTMLSourceElement.class, + HTMLSelectElement.class, HTMLSlotElement.class, HTMLSourceElement.class, HTMLSpanElement.class, HTMLStyleElement.class, HTMLTableCaptionElement.class, HTMLTableCellElement.class, HTMLTableColElement.class, HTMLTableComponent.class, HTMLTableDataCellElement.class, HTMLTableElement.class, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxClass.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxClass.java index 4c6b33e08..eca75c091 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxClass.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxClass.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxClasses.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxClasses.java index 395ac16d3..03e6effc3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxClasses.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxClasses.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxConstant.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxConstant.java index c0c4f2e60..579cac830 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxConstant.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxConstant.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxConstructor.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxConstructor.java index e7849358d..2be31fcd2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxConstructor.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxConstructor.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxFunction.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxFunction.java index f024a75a9..69939a160 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxFunction.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxFunction.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxGetter.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxGetter.java index f3100fe5a..48b896f04 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxGetter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxGetter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxSetter.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxSetter.java index 14543bdbc..1646f200d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxSetter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxSetter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxStaticFunction.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxStaticFunction.java index 14a4874ec..6ed39acf8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxStaticFunction.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxStaticFunction.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxStaticGetter.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxStaticGetter.java index 0c48a3ae0..f0352b2b9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxStaticGetter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxStaticGetter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxSymbol.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxSymbol.java index c1dc429bf..bfcdcc1f6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxSymbol.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/JsxSymbol.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/SupportedBrowser.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/SupportedBrowser.java index 578394aef..563763e35 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/SupportedBrowser.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/SupportedBrowser.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/package-info.java index 0ae695a54..9e146578f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/configuration/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ActiveXObject.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ActiveXObject.java index c60d67b3d..d39e57b0e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ActiveXObject.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ActiveXObject.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ActiveXObjectImpl.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ActiveXObjectImpl.java index 0c3e2aade..7aa856bce 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ActiveXObjectImpl.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ActiveXObjectImpl.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ApplicationCache.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ApplicationCache.java index f0e352255..ab5e6ef6e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ApplicationCache.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ApplicationCache.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -153,7 +153,7 @@ public void setOndownloading(final Object o) { */ @JsxGetter public Object getOnprogress() { - return getHandlerForJavaScript("progress"); + return getHandlerForJavaScript(Event.TYPE_PROGRESS); } /** @@ -162,7 +162,7 @@ public Object getOnprogress() { */ @JsxSetter public void setOnprogress(final Object o) { - setHandlerForJavaScript("progress", o); + setHandlerForJavaScript(Event.TYPE_PROGRESS, o); } /** diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/AudioScheduledSourceNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/AudioScheduledSourceNode.java index 0bb93e7a9..afbd0b241 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/AudioScheduledSourceNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/AudioScheduledSourceNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/BarProp.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/BarProp.java index 96b60defd..7a92a6f22 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/BarProp.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/BarProp.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/BatteryManager.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/BatteryManager.java index fce6b9378..7579a0047 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/BatteryManager.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/BatteryManager.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/BroadcastChannel.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/BroadcastChannel.java index 9a4fad297..e6e2ee08b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/BroadcastChannel.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/BroadcastChannel.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Cache.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Cache.java index cff2eec68..11bc7a806 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Cache.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Cache.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/CacheStorage.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/CacheStorage.java index 8b66f3939..c6c8852f1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/CacheStorage.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/CacheStorage.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ClientRect.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ClientRect.java index 4f930651b..a12de990d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ClientRect.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ClientRect.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ClientRectList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ClientRectList.java index 755ff90a9..e0e6fd928 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ClientRectList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ClientRectList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Console.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Console.java index 65ee439f3..0cdc2de00 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Console.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Console.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/DateCustom.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/DateCustom.java index bcd83dc45..cc7c14953 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/DateCustom.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/DateCustom.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element.java index ca170b131..41f0b572f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -64,6 +64,7 @@ import com.gargoylesoftware.htmlunit.javascript.host.dom.Node; import com.gargoylesoftware.htmlunit.javascript.host.dom.NodeList; import com.gargoylesoftware.htmlunit.javascript.host.dom.TextRange; +import com.gargoylesoftware.htmlunit.javascript.host.event.Event; import com.gargoylesoftware.htmlunit.javascript.host.event.EventHandler; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLCollection; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument; @@ -71,6 +72,7 @@ import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement.ProxyDomNode; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLScriptElement; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLStyleElement; +import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLTemplateElement; import net.sourceforge.htmlunit.corejs.javascript.BaseFunction; import net.sourceforge.htmlunit.corejs.javascript.Context; @@ -907,15 +909,17 @@ private static void parseHtmlSnippet(final DomNode target, final String source) */ @JsxGetter({CHROME, EDGE, FF, FF78}) public String getInnerHTML() { - final DomNode domNode; try { - domNode = getDomNodeOrDie(); + DomNode domNode = getDomNodeOrDie(); + if (this instanceof HTMLTemplateElement) { + domNode = ((HtmlTemplate) getDomNodeOrDie()).getContent(); + } + return getInnerHTML(domNode); } catch (final IllegalStateException e) { Context.throwAsScriptRuntimeEx(e); return ""; } - return getInnerHTML(domNode); } /** @@ -1308,7 +1312,7 @@ public Object getNamespaceURI() { */ @JsxGetter({CHROME, EDGE}) public Function getOnbeforecopy() { - return getEventHandler("beforecopy"); + return getEventHandler(Event.TYPE_BEFORECOPY); } /** @@ -1317,7 +1321,7 @@ public Function getOnbeforecopy() { */ @JsxSetter({CHROME, EDGE}) public void setOnbeforecopy(final Object onbeforecopy) { - setEventHandler("beforecopy", onbeforecopy); + setEventHandler(Event.TYPE_BEFORECOPY, onbeforecopy); } /** @@ -1326,7 +1330,7 @@ public void setOnbeforecopy(final Object onbeforecopy) { */ @JsxGetter({CHROME, EDGE}) public Function getOnbeforecut() { - return getEventHandler("beforecut"); + return getEventHandler(Event.TYPE_BEFORECUT); } /** @@ -1335,7 +1339,7 @@ public Function getOnbeforecut() { */ @JsxSetter({CHROME, EDGE}) public void setOnbeforecut(final Object onbeforecut) { - setEventHandler("beforecut", onbeforecut); + setEventHandler(Event.TYPE_BEFORECUT, onbeforecut); } /** @@ -1344,7 +1348,7 @@ public void setOnbeforecut(final Object onbeforecut) { */ @JsxGetter({CHROME, EDGE}) public Function getOnbeforepaste() { - return getEventHandler("beforepaste"); + return getEventHandler(Event.TYPE_BEFOREPASTE); } /** @@ -1353,61 +1357,7 @@ public Function getOnbeforepaste() { */ @JsxSetter({CHROME, EDGE}) public void setOnbeforepaste(final Object onbeforepaste) { - setEventHandler("beforepaste", onbeforepaste); - } - - /** - * Returns the {@code oncopy} event handler for this element. - * @return the {@code oncopy} event handler for this element - */ - @JsxGetter({CHROME, EDGE}) - public Function getOncopy() { - return getEventHandler("copy"); - } - - /** - * Sets the {@code oncopy} event handler for this element. - * @param oncopy the {@code oncopy} event handler for this element - */ - @JsxSetter({CHROME, EDGE}) - public void setOncopy(final Object oncopy) { - setEventHandler("copy", oncopy); - } - - /** - * Returns the {@code oncut} event handler for this element. - * @return the {@code oncut} event handler for this element - */ - @JsxGetter({CHROME, EDGE}) - public Function getOncut() { - return getEventHandler("cut"); - } - - /** - * Sets the {@code oncut} event handler for this element. - * @param oncut the {@code oncut} event handler for this element - */ - @JsxSetter({CHROME, EDGE}) - public void setOncut(final Object oncut) { - setEventHandler("cut", oncut); - } - - /** - * Returns the {@code onpaste} event handler for this element. - * @return the {@code onpaste} event handler for this element - */ - @JsxGetter({CHROME, EDGE}) - public Function getOnpaste() { - return getEventHandler("paste"); - } - - /** - * Sets the {@code onpaste} event handler for this element. - * @param onpaste the {@code onpaste} event handler for this element - */ - @JsxSetter({CHROME, EDGE}) - public void setOnpaste(final Object onpaste) { - setEventHandler("paste", onpaste); + setEventHandler(Event.TYPE_BEFOREPASTE, onbeforepaste); } /** @@ -1416,7 +1366,7 @@ public void setOnpaste(final Object onpaste) { */ @JsxGetter({CHROME, EDGE}) public Function getOnsearch() { - return getEventHandler("search"); + return getEventHandler(Event.TYPE_SEARCH); } /** @@ -1425,25 +1375,7 @@ public Function getOnsearch() { */ @JsxSetter({CHROME, EDGE}) public void setOnsearch(final Object onsearch) { - setEventHandler("search", onsearch); - } - - /** - * Returns the {@code onselectstart} event handler for this element. - * @return the {@code onselectstart} event handler for this element - */ - @JsxGetter({CHROME, EDGE}) - public Function getOnselectstart() { - return getEventHandler("selectstart"); - } - - /** - * Sets the {@code onselectstart} event handler for this element. - * @param onselectstart the {@code onselectstart} event handler for this element - */ - @JsxSetter({CHROME, EDGE}) - public void setOnselectstart(final Object onselectstart) { - setEventHandler("selectstart", onselectstart); + setEventHandler(Event.TYPE_SEARCH, onsearch); } /** @@ -1452,7 +1384,7 @@ public void setOnselectstart(final Object onselectstart) { */ @JsxGetter({CHROME, EDGE}) public Function getOnwebkitfullscreenchange() { - return getEventHandler("webkitfullscreenchange"); + return getEventHandler(Event.TYPE_WEBKITFULLSCREENCHANGE); } /** @@ -1461,7 +1393,7 @@ public Function getOnwebkitfullscreenchange() { */ @JsxSetter({CHROME, EDGE}) public void setOnwebkitfullscreenchange(final Object onwebkitfullscreenchange) { - setEventHandler("webkitfullscreenchange", onwebkitfullscreenchange); + setEventHandler(Event.TYPE_WEBKITFULLSCREENCHANGE, onwebkitfullscreenchange); } /** @@ -1470,7 +1402,7 @@ public void setOnwebkitfullscreenchange(final Object onwebkitfullscreenchange) { */ @JsxGetter({CHROME, EDGE}) public Function getOnwebkitfullscreenerror() { - return getEventHandler("webkitfullscreenerror"); + return getEventHandler(Event.TYPE_WEBKITFULLSCREENERROR); } /** @@ -1479,7 +1411,7 @@ public Function getOnwebkitfullscreenerror() { */ @JsxSetter({CHROME, EDGE}) public void setOnwebkitfullscreenerror(final Object onwebkitfullscreenerror) { - setEventHandler("webkitfullscreenerror", onwebkitfullscreenerror); + setEventHandler(Event.TYPE_WEBKITFULLSCREENERROR, onwebkitfullscreenerror); } /** @@ -1487,7 +1419,7 @@ public void setOnwebkitfullscreenerror(final Object onwebkitfullscreenerror) { * @return the {@code onwheel} event handler for this element */ public Function getOnwheel() { - return getEventHandler("wheel"); + return getEventHandler(Event.TYPE_WHEEL); } /** @@ -1495,7 +1427,7 @@ public Function getOnwheel() { * @param onwheel the {@code onwheel} event handler for this element */ public void setOnwheel(final Object onwheel) { - setEventHandler("wheel", onwheel); + setEventHandler(Event.TYPE_WHEEL, onwheel); } /** @@ -1504,7 +1436,7 @@ public void setOnwheel(final Object onwheel) { */ @JsxGetter(IE) public Function getOngotpointercapture() { - return getEventHandler("gotpointercapture"); + return getEventHandler(Event.TYPE_GOTPOINTERCAPTURE); } /** @@ -1513,7 +1445,7 @@ public Function getOngotpointercapture() { */ @JsxSetter(IE) public void setOngotpointercapture(final Object ongotpointercapture) { - setEventHandler("gotpointercapture", ongotpointercapture); + setEventHandler(Event.TYPE_GOTPOINTERCAPTURE, ongotpointercapture); } /** @@ -1522,7 +1454,7 @@ public void setOngotpointercapture(final Object ongotpointercapture) { */ @JsxGetter(IE) public Function getOnlostpointercapture() { - return getEventHandler("lostpointercapture"); + return getEventHandler(Event.TYPE_LOSTPOINTERCAPTURE); } /** @@ -1531,7 +1463,7 @@ public Function getOnlostpointercapture() { */ @JsxSetter(IE) public void setOnlostpointercapture(final Object onlostpointercapture) { - setEventHandler("lostpointercapture", onlostpointercapture); + setEventHandler(Event.TYPE_LOSTPOINTERCAPTURE, onlostpointercapture); } /** @@ -1540,7 +1472,7 @@ public void setOnlostpointercapture(final Object onlostpointercapture) { */ @JsxGetter(IE) public Function getOnmsgesturechange() { - return getEventHandler("msgesturechange"); + return getEventHandler(Event.TYPE_MSGESTURECHANGE); } /** @@ -1549,7 +1481,7 @@ public Function getOnmsgesturechange() { */ @JsxSetter(IE) public void setOnmsgesturechange(final Object onmsgesturechange) { - setEventHandler("msgesturechange", onmsgesturechange); + setEventHandler(Event.TYPE_MSGESTURECHANGE, onmsgesturechange); } /** @@ -1558,7 +1490,7 @@ public void setOnmsgesturechange(final Object onmsgesturechange) { */ @JsxGetter(IE) public Function getOnmsgesturedoubletap() { - return getEventHandler("msgesturedoubletap"); + return getEventHandler(Event.TYPE_MSGESTUREDOUBLETAP); } /** @@ -1567,7 +1499,7 @@ public Function getOnmsgesturedoubletap() { */ @JsxSetter(IE) public void setOnmsgesturedoubletap(final Object onmsgesturedoubletap) { - setEventHandler("msgesturedoubletap", onmsgesturedoubletap); + setEventHandler(Event.TYPE_MSGESTUREDOUBLETAP, onmsgesturedoubletap); } /** @@ -1576,7 +1508,7 @@ public void setOnmsgesturedoubletap(final Object onmsgesturedoubletap) { */ @JsxGetter(IE) public Function getOnmsgestureend() { - return getEventHandler("msgestureend"); + return getEventHandler(Event.TYPE_MSGESTUREEND); } /** @@ -1585,7 +1517,7 @@ public Function getOnmsgestureend() { */ @JsxSetter(IE) public void setOnmsgestureend(final Object onmsgestureend) { - setEventHandler("msgestureend", onmsgestureend); + setEventHandler(Event.TYPE_MSGESTUREEND, onmsgestureend); } /** @@ -1594,7 +1526,7 @@ public void setOnmsgestureend(final Object onmsgestureend) { */ @JsxGetter(IE) public Function getOnmsgesturehold() { - return getEventHandler("msgesturehold"); + return getEventHandler(Event.TYPE_MSGESTUREHOLD); } /** @@ -1603,7 +1535,7 @@ public Function getOnmsgesturehold() { */ @JsxSetter(IE) public void setOnmsgesturehold(final Object onmsgesturehold) { - setEventHandler("msgesturehold", onmsgesturehold); + setEventHandler(Event.TYPE_MSGESTUREHOLD, onmsgesturehold); } /** @@ -1612,7 +1544,7 @@ public void setOnmsgesturehold(final Object onmsgesturehold) { */ @JsxGetter(IE) public Function getOnmsgesturestart() { - return getEventHandler("msgesturestart"); + return getEventHandler(Event.TYPE_MSGESTURESTART); } /** @@ -1621,7 +1553,7 @@ public Function getOnmsgesturestart() { */ @JsxSetter(IE) public void setOnmsgesturestart(final Object onmsgesturestart) { - setEventHandler("msgesturestart", onmsgesturestart); + setEventHandler(Event.TYPE_MSGESTURESTART, onmsgesturestart); } /** @@ -1630,7 +1562,7 @@ public void setOnmsgesturestart(final Object onmsgesturestart) { */ @JsxGetter(IE) public Function getOnmsgesturetap() { - return getEventHandler("msgesturetap"); + return getEventHandler(Event.TYPE_MSGESTURETAP); } /** @@ -1639,7 +1571,7 @@ public Function getOnmsgesturetap() { */ @JsxSetter(IE) public void setOnmsgesturetap(final Object onmsgesturetap) { - setEventHandler("msgesturetap", onmsgesturetap); + setEventHandler(Event.TYPE_MSGESTURETAP, onmsgesturetap); } /** @@ -1648,7 +1580,7 @@ public void setOnmsgesturetap(final Object onmsgesturetap) { */ @JsxGetter(IE) public Function getOnmsgotpointercapture() { - return getEventHandler("msgotpointercapture"); + return getEventHandler(Event.TYPE_MSGOTPOINTERCAPTURE); } /** @@ -1657,7 +1589,7 @@ public Function getOnmsgotpointercapture() { */ @JsxSetter(IE) public void setOnmsgotpointercapture(final Object onmsgotpointercapture) { - setEventHandler("msgotpointercapture", onmsgotpointercapture); + setEventHandler(Event.TYPE_MSGOTPOINTERCAPTURE, onmsgotpointercapture); } /** @@ -1666,7 +1598,7 @@ public void setOnmsgotpointercapture(final Object onmsgotpointercapture) { */ @JsxGetter(IE) public Function getOnmsinertiastart() { - return getEventHandler("msinertiastart"); + return getEventHandler(Event.TYPE_MSINERTIASTART); } /** @@ -1675,7 +1607,7 @@ public Function getOnmsinertiastart() { */ @JsxSetter(IE) public void setOnmsinertiastart(final Object onmsinertiastart) { - setEventHandler("msinertiastart", onmsinertiastart); + setEventHandler(Event.TYPE_MSINERTIASTART, onmsinertiastart); } /** @@ -1684,7 +1616,7 @@ public void setOnmsinertiastart(final Object onmsinertiastart) { */ @JsxGetter(IE) public Function getOnmslostpointercapture() { - return getEventHandler("mslostpointercapture"); + return getEventHandler(Event.TYPE_MSLOSTPOINTERCAPTURE); } /** @@ -1693,7 +1625,7 @@ public Function getOnmslostpointercapture() { */ @JsxSetter(IE) public void setOnmslostpointercapture(final Object onmslostpointercapture) { - setEventHandler("mslostpointercapture", onmslostpointercapture); + setEventHandler(Event.TYPE_MSLOSTPOINTERCAPTURE, onmslostpointercapture); } /** @@ -1702,7 +1634,7 @@ public void setOnmslostpointercapture(final Object onmslostpointercapture) { */ @JsxGetter(IE) public Function getOnmspointercancel() { - return getEventHandler("mspointercancel"); + return getEventHandler(Event.TYPE_MSPOINTERCANCEL); } /** @@ -1711,7 +1643,7 @@ public Function getOnmspointercancel() { */ @JsxSetter(IE) public void setOnmspointercancel(final Object onmspointercancel) { - setEventHandler("mspointercancel", onmspointercancel); + setEventHandler(Event.TYPE_MSPOINTERCANCEL, onmspointercancel); } /** @@ -1720,7 +1652,7 @@ public void setOnmspointercancel(final Object onmspointercancel) { */ @JsxGetter(IE) public Function getOnmspointerdown() { - return getEventHandler("mspointerdown"); + return getEventHandler(Event.TYPE_MSPOINTERDOWN); } /** @@ -1729,7 +1661,7 @@ public Function getOnmspointerdown() { */ @JsxSetter(IE) public void setOnmspointerdown(final Object onmspointerdown) { - setEventHandler("mspointerdown", onmspointerdown); + setEventHandler(Event.TYPE_MSPOINTERDOWN, onmspointerdown); } /** @@ -1738,7 +1670,7 @@ public void setOnmspointerdown(final Object onmspointerdown) { */ @JsxGetter(IE) public Function getOnmspointerenter() { - return getEventHandler("mspointerenter"); + return getEventHandler(Event.TYPE_MSPOINTENTER); } /** @@ -1747,7 +1679,7 @@ public Function getOnmspointerenter() { */ @JsxSetter(IE) public void setOnmspointerenter(final Object onmspointerenter) { - setEventHandler("mspointerenter", onmspointerenter); + setEventHandler(Event.TYPE_MSPOINTENTER, onmspointerenter); } /** @@ -1756,7 +1688,7 @@ public void setOnmspointerenter(final Object onmspointerenter) { */ @JsxGetter(IE) public Function getOnmspointerleave() { - return getEventHandler("mspointerleave"); + return getEventHandler(Event.TYPE_MSPOINTERLEAVE); } /** @@ -1765,7 +1697,7 @@ public Function getOnmspointerleave() { */ @JsxSetter(IE) public void setOnmspointerleave(final Object onmspointerleave) { - setEventHandler("mspointerleave", onmspointerleave); + setEventHandler(Event.TYPE_MSPOINTERLEAVE, onmspointerleave); } /** @@ -1774,7 +1706,7 @@ public void setOnmspointerleave(final Object onmspointerleave) { */ @JsxGetter(IE) public Function getOnmspointermove() { - return getEventHandler("mspointermove"); + return getEventHandler(Event.TYPE_MSPOINTERMOVE); } /** @@ -1783,7 +1715,7 @@ public Function getOnmspointermove() { */ @JsxSetter(IE) public void setOnmspointermove(final Object onmspointermove) { - setEventHandler("mspointermove", onmspointermove); + setEventHandler(Event.TYPE_MSPOINTERMOVE, onmspointermove); } /** @@ -1792,7 +1724,7 @@ public void setOnmspointermove(final Object onmspointermove) { */ @JsxGetter(IE) public Function getOnmspointerout() { - return getEventHandler("mspointerout"); + return getEventHandler(Event.TYPE_MSPOINTEROUT); } /** @@ -1801,7 +1733,7 @@ public Function getOnmspointerout() { */ @JsxSetter(IE) public void setOnmspointerout(final Object onmspointerout) { - setEventHandler("mspointerout", onmspointerout); + setEventHandler(Event.TYPE_MSPOINTEROUT, onmspointerout); } /** @@ -1810,7 +1742,7 @@ public void setOnmspointerout(final Object onmspointerout) { */ @JsxGetter(IE) public Function getOnmspointerover() { - return getEventHandler("mspointerover"); + return getEventHandler(Event.TYPE_MSPOINTEROVER); } /** @@ -1819,7 +1751,7 @@ public Function getOnmspointerover() { */ @JsxSetter(IE) public void setOnmspointerover(final Object onmspointerover) { - setEventHandler("mspointerover", onmspointerover); + setEventHandler(Event.TYPE_MSPOINTEROVER, onmspointerover); } /** @@ -1828,7 +1760,7 @@ public void setOnmspointerover(final Object onmspointerover) { */ @JsxGetter(IE) public Function getOnmspointerup() { - return getEventHandler("mspointerup"); + return getEventHandler(Event.TYPE_MSPOINTERUP); } /** @@ -1837,7 +1769,7 @@ public Function getOnmspointerup() { */ @JsxSetter(IE) public void setOnmspointerup(final Object onmspointerup) { - setEventHandler("mspointerup", onmspointerup); + setEventHandler(Event.TYPE_MSPOINTERUP, onmspointerup); } /** @@ -1846,7 +1778,7 @@ public void setOnmspointerup(final Object onmspointerup) { */ @JsxGetter(IE) public Function getOnpointercancel() { - return getEventHandler("pointercancel"); + return getEventHandler(Event.TYPE_POINTERCANCEL); } /** @@ -1855,7 +1787,7 @@ public Function getOnpointercancel() { */ @JsxSetter(IE) public void setOnpointercancel(final Object onpointercancel) { - setEventHandler("pointercancel", onpointercancel); + setEventHandler(Event.TYPE_POINTERCANCEL, onpointercancel); } /** @@ -1864,7 +1796,7 @@ public void setOnpointercancel(final Object onpointercancel) { */ @JsxGetter(IE) public Function getOnpointerdown() { - return getEventHandler("pointerdown"); + return getEventHandler(Event.TYPE_POINTERDOWN); } /** @@ -1873,7 +1805,7 @@ public Function getOnpointerdown() { */ @JsxSetter(IE) public void setOnpointerdown(final Object onpointerdown) { - setEventHandler("pointerdown", onpointerdown); + setEventHandler(Event.TYPE_POINTERDOWN, onpointerdown); } /** @@ -1882,7 +1814,7 @@ public void setOnpointerdown(final Object onpointerdown) { */ @JsxGetter(IE) public Function getOnpointerenter() { - return getEventHandler("pointerenter"); + return getEventHandler(Event.TYPE_POINTERENTER); } /** @@ -1891,7 +1823,7 @@ public Function getOnpointerenter() { */ @JsxSetter(IE) public void setOnpointerenter(final Object onpointerenter) { - setEventHandler("pointerenter", onpointerenter); + setEventHandler(Event.TYPE_POINTERENTER, onpointerenter); } /** @@ -1900,7 +1832,7 @@ public void setOnpointerenter(final Object onpointerenter) { */ @JsxGetter(IE) public Function getOnpointerleave() { - return getEventHandler("pointerleave"); + return getEventHandler(Event.TYPE_POINTERLEAVE); } /** @@ -1909,7 +1841,7 @@ public Function getOnpointerleave() { */ @JsxSetter(IE) public void setOnpointerleave(final Object onpointerleave) { - setEventHandler("pointerleave", onpointerleave); + setEventHandler(Event.TYPE_POINTERLEAVE, onpointerleave); } /** @@ -1918,7 +1850,7 @@ public void setOnpointerleave(final Object onpointerleave) { */ @JsxGetter(IE) public Function getOnpointermove() { - return getEventHandler("pointermove"); + return getEventHandler(Event.TYPE_POINTERMOVE); } /** @@ -1927,7 +1859,7 @@ public Function getOnpointermove() { */ @JsxSetter(IE) public void setOnpointermove(final Object onpointermove) { - setEventHandler("pointermove", onpointermove); + setEventHandler(Event.TYPE_POINTERMOVE, onpointermove); } /** @@ -1936,7 +1868,7 @@ public void setOnpointermove(final Object onpointermove) { */ @JsxGetter(IE) public Function getOnpointerout() { - return getEventHandler("pointerout"); + return getEventHandler(Event.TYPE_POINTEROUT); } /** @@ -1945,7 +1877,7 @@ public Function getOnpointerout() { */ @JsxSetter(IE) public void setOnpointerout(final Object onpointerout) { - setEventHandler("pointerout", onpointerout); + setEventHandler(Event.TYPE_POINTEROUT, onpointerout); } /** @@ -1954,7 +1886,7 @@ public void setOnpointerout(final Object onpointerout) { */ @JsxGetter(IE) public Function getOnpointerover() { - return getEventHandler("pointerover"); + return getEventHandler(Event.TYPE_POINTEROVER); } /** @@ -1963,7 +1895,7 @@ public Function getOnpointerover() { */ @JsxSetter(IE) public void setOnpointerover(final Object onpointerover) { - setEventHandler("pointerover", onpointerover); + setEventHandler(Event.TYPE_POINTEROVER, onpointerover); } /** @@ -1972,7 +1904,7 @@ public void setOnpointerover(final Object onpointerover) { */ @JsxGetter(IE) public Function getOnpointerup() { - return getEventHandler("pointerup"); + return getEventHandler(Event.TYPE_POINTERUP); } /** @@ -1981,7 +1913,7 @@ public Function getOnpointerup() { */ @JsxSetter(IE) public void setOnpointerup(final Object onpointerup) { - setEventHandler("pointerup", onpointerup); + setEventHandler(Event.TYPE_POINTERUP, onpointerup); } /** diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/External.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/External.java index 48aa8f71f..f476ac4b7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/External.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/External.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/FontFace.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/FontFace.java index 98ea1a718..7e66c6aa5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/FontFace.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/FontFace.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/FontFaceSet.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/FontFaceSet.java index 0daea88eb..25d5c2428 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/FontFaceSet.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/FontFaceSet.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Gamepad.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Gamepad.java index 7157b355a..de3f05f7c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Gamepad.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Gamepad.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/GamepadButton.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/GamepadButton.java index 7b59797fe..15846ae62 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/GamepadButton.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/GamepadButton.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/History.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/History.java index 3adcb89b4..f1c6ff711 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/History.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/History.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ImageBitmap.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ImageBitmap.java index ed24b76a8..d6e5a88d9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ImageBitmap.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ImageBitmap.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/InstallTrigger.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/InstallTrigger.java index 8509c30dc..b8ed7c7ab 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/InstallTrigger.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/InstallTrigger.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Location.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Location.java index dcb19acb9..f1971a315 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Location.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Location.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -35,9 +35,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.Page; -import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.WebRequest; import com.gargoylesoftware.htmlunit.WebWindow; import com.gargoylesoftware.htmlunit.html.HtmlPage; @@ -65,6 +63,7 @@ * @author Ronald Brill * @author Frank Danek * @author Adam Afeltowicz + * @author Atsushi Nakagawa * * @see MSDN Documentation */ @@ -138,16 +137,15 @@ public void assign(final String url) throws IOException { */ @JsxFunction public void reload(final boolean force) throws IOException { - final HtmlPage htmlPage = (HtmlPage) getWindow(getStartingScope()).getWebWindow().getEnclosedPage(); + final HtmlPage htmlPage = (HtmlPage) window_.getWebWindow().getEnclosedPage(); final WebRequest request = htmlPage.getWebResponse().getWebRequest(); if (getBrowserVersion().hasFeature(JS_LOCATION_RELOAD_REFERRER)) { - final String referer = htmlPage.getUrl().toExternalForm(); - request.setAdditionalHeader(HttpHeader.REFERER, referer); + request.setRefererlHeader(htmlPage.getUrl()); } final WebWindow webWindow = window_.getWebWindow(); - webWindow.getWebClient().download(webWindow, "", request, true, false, "JS location.reload"); + webWindow.getWebClient().download(webWindow, "", request, true, false, false, "JS location.reload"); } /** @@ -166,9 +164,8 @@ public void replace(final String url) throws IOException { * Returns the location URL. * @return the location URL */ - @Override - @JsxFunction - public String toString() { + @JsxFunction(functionName = "toString") + public String jsToString() { if (window_ != null) { return getHref(); } @@ -202,7 +199,9 @@ public String getHref() { return s; } catch (final MalformedURLException e) { - LOG.error(e.getMessage(), e); + if (LOG.isErrorEnabled()) { + LOG.error(e.getMessage(), e); + } return page.getUrl().toExternalForm(); } } @@ -239,10 +238,10 @@ public void setHref(final String newLocation) throws IOException { } final WebRequest request = new WebRequest(url); - request.setAdditionalHeader(HttpHeader.REFERER, page.getUrl().toExternalForm()); + request.setRefererlHeader(page.getUrl()); final WebWindow webWindow = window_.getWebWindow(); - webWindow.getWebClient().download(webWindow, "", request, true, false, "JS set location"); + webWindow.getWebClient().download(webWindow, "", request, true, false, false, "JS set location"); } catch (final MalformedURLException e) { if (LOG.isErrorEnabled()) { @@ -434,7 +433,7 @@ public void setHost(final String host) throws Exception { */ @JsxGetter public String getPathname() { - if (WebClient.URL_ABOUT_BLANK == getUrl()) { + if (UrlUtils.URL_ABOUT_BLANK == getUrl()) { if (getBrowserVersion().hasFeature(URL_ABOUT_BLANK_HAS_BLANK_PATH)) { return "blank"; } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MessageChannel.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MessageChannel.java index fb600c1fa..8704fc569 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MessageChannel.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MessageChannel.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MessagePort.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MessagePort.java index feae67cff..42fb624b0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MessagePort.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MessagePort.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,8 @@ import java.net.URL; +import com.gargoylesoftware.htmlunit.Page; +import com.gargoylesoftware.htmlunit.WebWindow; import com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine; import com.gargoylesoftware.htmlunit.javascript.PostponedAction; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; @@ -96,16 +98,17 @@ private void setHandlerForJavaScript(final String eventName, final Object handle public void postMessage(final String message, final Object transfer) { if (port1_ != null) { final Window w = getWindow(); - final URL currentURL = w.getWebWindow().getEnclosedPage().getUrl(); + final WebWindow webWindow = w.getWebWindow(); + final Page page = webWindow.getEnclosedPage(); + final URL currentURL = page.getUrl(); final MessageEvent event = new MessageEvent(); final String origin = currentURL.getProtocol() + "://" + currentURL.getHost() + ':' + currentURL.getPort(); event.initMessageEvent(Event.TYPE_MESSAGE, false, false, message, origin, "", w, transfer); event.setParentScope(port1_); event.setPrototype(getPrototype(event.getClass())); - final JavaScriptEngine jsEngine - = (JavaScriptEngine) w.getWebWindow().getWebClient().getJavaScriptEngine(); - final PostponedAction action = new PostponedAction(w.getWebWindow().getEnclosedPage()) { + final JavaScriptEngine jsEngine = (JavaScriptEngine) webWindow.getWebClient().getJavaScriptEngine(); + final PostponedAction action = new PostponedAction(page, "MessagePort.postMessage") { @Override public void execute() throws Exception { final ContextFactory cf = jsEngine.getContextFactory(); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MimeType.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MimeType.java index 68c734c34..f82f5df52 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MimeType.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MimeType.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MimeTypeArray.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MimeTypeArray.java index 784a26dc3..90560d715 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MimeTypeArray.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/MimeTypeArray.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Namespace.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Namespace.java index 3fe56155d..23f7609f1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Namespace.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Namespace.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NamespaceCollection.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NamespaceCollection.java index 182f786b4..448b42bd3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NamespaceCollection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NamespaceCollection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NativeFunctionPrefixResolver.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NativeFunctionPrefixResolver.java index 379d6ba5d..89c884457 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NativeFunctionPrefixResolver.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NativeFunctionPrefixResolver.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Navigator.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Navigator.java index e9fa8ecce..97d72fb72 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Navigator.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Navigator.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -29,6 +29,7 @@ import com.gargoylesoftware.htmlunit.javascript.configuration.JsxFunction; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter; import com.gargoylesoftware.htmlunit.javascript.host.geo.Geolocation; +import com.gargoylesoftware.htmlunit.javascript.host.media.MediaDevices; import com.gargoylesoftware.htmlunit.javascript.host.network.NetworkInformation; /** @@ -40,6 +41,7 @@ * @author Ahmed Ashour * @author Marc Guillemot * @author Frank Danek + * @author Ronald Brill * * @see MSDN documentation */ @@ -48,6 +50,7 @@ public class Navigator extends SimpleScriptable { private PluginArray plugins_; private MimeTypeArray mimeTypes_; + private MediaDevices mediaDevices_; /** * Creates an instance. @@ -335,4 +338,18 @@ public NetworkInformation getConnection() { networkInformation.setParentScope(getParentScope()); return networkInformation; } + + /** + * Returns the {@code mimeTypes} property. + * @return the {@code mimeTypes} property + */ + @JsxGetter({CHROME, EDGE, FF, FF78}) + public MediaDevices getMediaDevices() { + if (mediaDevices_ == null) { + mediaDevices_ = new MediaDevices(); + mediaDevices_.setPrototype(getPrototype(mediaDevices_.getClass())); + mediaDevices_.setParentScope(getParentScope()); + } + return mediaDevices_; + } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Netscape.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Netscape.java index 299b7634b..12b117227 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Netscape.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Netscape.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Notification.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Notification.java index 8523f6904..03b999380 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Notification.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Notification.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NumberCustom.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NumberCustom.java index 30fa2f974..65f88550a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NumberCustom.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/NumberCustom.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PerformanceObserver.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PerformanceObserver.java index 3cd1d53af..617443dd0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PerformanceObserver.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PerformanceObserver.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PerformanceObserverEntryList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PerformanceObserverEntryList.java index 825f623b4..c32af2c2f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PerformanceObserverEntryList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PerformanceObserverEntryList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PermissionStatus.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PermissionStatus.java index f9d0c2c3c..2b8bd5d3c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PermissionStatus.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PermissionStatus.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Permissions.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Permissions.java index 05e9fedde..a2ab5aee0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Permissions.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Permissions.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Plugin.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Plugin.java index ba8d191bd..c44be519b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Plugin.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Plugin.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PluginArray.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PluginArray.java index ef671d540..59d2f6036 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PluginArray.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PluginArray.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Promise.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Promise.java index e7d6461c9..bfee752cd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Promise.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Promise.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PushManager.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PushManager.java index fa0212c4e..865c61c63 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PushManager.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PushManager.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PushSubscription.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PushSubscription.java index 36b50bdc8..a4794bb43 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PushSubscription.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PushSubscription.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PushSubscriptionOptions.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PushSubscriptionOptions.java index 8d59eab6b..99e8cef05 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PushSubscriptionOptions.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/PushSubscriptionOptions.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ReadableStream.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ReadableStream.java index c19997969..6f954ac9c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ReadableStream.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ReadableStream.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Reflect.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Reflect.java index fef028cc2..e6ab5bc2e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Reflect.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Reflect.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Screen.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Screen.java index 3c1420849..7d4d92b9d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Screen.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Screen.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ScreenOrientation.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ScreenOrientation.java index 571af2562..bb08af2bf 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ScreenOrientation.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/ScreenOrientation.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/SharedWorker.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/SharedWorker.java index 6b28cde6c..bf0b3977d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/SharedWorker.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/SharedWorker.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/SimpleArray.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/SimpleArray.java index 353cb3e32..9c1a0cb00 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/SimpleArray.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/SimpleArray.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Storage.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Storage.java index e300fe36c..962883d56 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Storage.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Storage.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/StorageManager.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/StorageManager.java index 467513ecf..7207906d1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/StorageManager.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/StorageManager.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TextDecoder.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TextDecoder.java index ce1e0eb3d..165d07647 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TextDecoder.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TextDecoder.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TextEncoder.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TextEncoder.java index cb2b6391e..9adede6c7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TextEncoder.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TextEncoder.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Touch.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Touch.java index ba936a72a..1ecfca56e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Touch.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Touch.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TouchList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TouchList.java index 10d3c9298..3a45dac38 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TouchList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TouchList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/URL.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/URL.java index 2c8374dd4..23dd665f3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/URL.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/URL.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,6 +14,7 @@ */ package com.gargoylesoftware.htmlunit.javascript.host; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_ANCHOR_HOSTNAME_IGNORE_BLANK; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; @@ -26,7 +27,9 @@ import com.gargoylesoftware.htmlunit.javascript.SimpleScriptable; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxFunction; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxSetter; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxStaticFunction; import com.gargoylesoftware.htmlunit.javascript.host.file.File; import com.gargoylesoftware.htmlunit.util.UrlUtils; @@ -75,6 +78,7 @@ public URL(final String url, final Object base) { final java.net.URL baseUrl = UrlUtils.toUrlUnsafe(baseStr); url_ = new java.net.URL(baseUrl, url); } + checkRemoveRedundantPort(); } catch (final MalformedURLException e) { throw ScriptRuntime.typeError(e.toString()); @@ -108,6 +112,145 @@ public static String createObjectURL(final Object fileOrBlob) { public static void revokeObjectURL(final Object objectURL) { } + /** + * @return hash property of the URL containing a '#' followed by the fragment identifier of the URL. + */ + @JsxGetter + public String getHash() { + if (url_ == null) { + return null; + } + final String ref = url_.getRef(); + return ref == null ? "" : "#" + ref; + } + + @JsxSetter + public void setHash(final String fragment) throws MalformedURLException { + if (url_ == null) { + return; + } + url_ = UrlUtils.getUrlWithNewRef(url_, StringUtils.isEmpty(fragment) ? null : fragment); + } + + /** + * @return the host, that is the hostname, and then, if the port of the URL is nonempty, + * a ':', followed by the port of the URL. + */ + @JsxGetter + public String getHost() { + if (url_ == null) { + return null; + } + final int port = url_.getPort(); + return url_.getHost() + (port > 0 ? ":" + port : ""); + } + + @JsxSetter + public void setHost(final String host) throws MalformedURLException { + if (url_ == null) { + return; + } + + String newHost = StringUtils.substringBefore(host, ':'); + if (StringUtils.isEmpty(newHost)) { + return; + } + + try { + int ip = Integer.parseInt(newHost); + final StringBuilder ipString = new StringBuilder(); + ipString.insert(0, Integer.toString(ip % 256)); + ipString.insert(0, '.'); + + ip = ip / 256; + ipString.insert(0, Integer.toString(ip % 256)); + ipString.insert(0, '.'); + + ip = ip / 256; + ipString.insert(0, Integer.toString(ip % 256)); + ipString.insert(0, '.'); + ip = ip / 256; + ipString.insert(0, Integer.toString(ip % 256)); + + newHost = ipString.toString(); + } + catch (final Exception e) { + // back to string + } + + url_ = UrlUtils.getUrlWithNewHost(url_, newHost); + + final String newPort = StringUtils.substringAfter(host, ':'); + if (StringUtils.isNotBlank(newHost)) { + try { + url_ = UrlUtils.getUrlWithNewHostAndPort(url_, newHost, Integer.parseInt(newPort)); + } + catch (final Exception e) { + // back to string + } + } + else { + url_ = UrlUtils.getUrlWithNewHost(url_, newHost); + } + + checkRemoveRedundantPort(); + } + + /** Removes port if it can be deduced from protocol */ + private void checkRemoveRedundantPort() throws MalformedURLException { + if (("https".equals(url_.getProtocol()) && url_.getPort() == 443) + || ("http".equals(url_.getProtocol()) && url_.getPort() == 80)) { + url_ = UrlUtils.getUrlWithNewPort(url_, -1); + } + } + + /** + * @return the host, that is the hostname, and then, if the port of the URL is nonempty, + * a ':', followed by the port of the URL. + */ + @JsxGetter + public String getHostname() { + if (url_ == null) { + return null; + } + + return UrlUtils.encodeAnchor(url_.getHost()); + } + + @JsxSetter + public void setHostname(final String hostname) throws MalformedURLException { + if (getBrowserVersion().hasFeature(JS_ANCHOR_HOSTNAME_IGNORE_BLANK)) { + if (!StringUtils.isBlank(hostname)) { + url_ = UrlUtils.getUrlWithNewHost(url_, hostname); + } + } + else if (!StringUtils.isEmpty(hostname)) { + url_ = UrlUtils.getUrlWithNewHost(url_, hostname); + } + } + + /** + * @return whole URL + */ + @JsxGetter + public String getHref() { + if (url_ == null) { + return null; + } + + return jsToString(); + } + + @JsxSetter + public void setHref(final String href) throws MalformedURLException { + if (url_ == null) { + return; + } + + url_ = UrlUtils.toUrlUnsafe(href); + checkRemoveRedundantPort(); + } + /** * @return the origin */ @@ -121,7 +264,7 @@ public Object getOrigin() { } /** - * @return the origin + * @return a URLSearchParams object allowing access to the GET decoded query arguments contained in the URL. */ @JsxGetter public URLSearchParams getSearchParams() { @@ -132,6 +275,159 @@ public URLSearchParams getSearchParams() { return new URLSearchParams(url_.getQuery()); } + /** + * @return the password specified before the domain name. + */ + @JsxGetter + public String getPassword() { + if (url_ == null) { + return null; + } + + final String userInfo = url_.getUserInfo(); + final int idx = userInfo == null ? -1 : userInfo.indexOf(':'); + return idx == -1 ? "" : userInfo.substring(idx + 1); + } + + @JsxSetter + public void setPassword(final String password) throws MalformedURLException { + if (url_ == null) { + return; + } + + url_ = UrlUtils.getUrlWithNewUserPassword(url_, password.isEmpty() ? null : password); + } + + /** + * @return a URLSearchParams object allowing access to the GET decoded query arguments contained in the URL. + */ + @JsxGetter + public String getPathname() { + if (url_ == null) { + return null; + } + + final String path = url_.getPath(); + return path.isEmpty() ? "/" : path; + } + + @JsxSetter + public void setPathname(final String path) throws MalformedURLException { + if (url_ == null) { + return; + } + + url_ = UrlUtils.getUrlWithNewPath(url_, path.startsWith("/") ? path : "/" + path); + } + + /** + * @return the port number of the URL. If the URL does not contain an explicit port number, + * it will be set to '' + */ + @JsxGetter + public String getPort() { + if (url_ == null) { + return null; + } + + final int port = url_.getPort(); + return port == -1 ? "" : Integer.toString(port); + } + + @JsxSetter + public void setPort(final String port) throws MalformedURLException { + if (url_ == null) { + return; + } + final int portInt = port.isEmpty() ? -1 : Integer.parseInt(port); + url_ = UrlUtils.getUrlWithNewPort(url_, portInt); + checkRemoveRedundantPort(); + } + + /** + * @return the protocol scheme of the URL, including the final ':'. + */ + @JsxGetter + public String getProtocol() { + if (url_ == null) { + return null; + } + final String protocol = url_.getProtocol(); + return protocol.isEmpty() ? "" : (protocol + ":"); + } + + @JsxSetter + public void setProtocol(final String protocol) throws MalformedURLException { + if (url_ == null || protocol.isEmpty() || !UrlUtils.isValidScheme(protocol)) { + return; + } + + try { + url_ = UrlUtils.getUrlWithNewProtocol(url_, protocol); + checkRemoveRedundantPort(); + } + catch (final MalformedURLException e) { + // ignore + } + } + + /** + * @return the query string containing a '?' followed by the parameters of the URL + */ + @JsxGetter + public String getSearch() { + if (url_ == null) { + return null; + } + final String search = url_.getQuery(); + return search == null ? "" : "?" + search; + } + + @JsxSetter + public void setSearch(final String search) throws MalformedURLException { + if (url_ == null) { + return; + } + + final String query; + if (search == null || "?".equals(search) || "".equals(search)) { + query = null; + } + else if (search.charAt(0) == '?') { + query = search.substring(1); + } + else { + query = search; + } + + url_ = UrlUtils.getUrlWithNewQuery(url_, query); + } + + /** + * @return the username specified before the domain name. + */ + @JsxGetter + public String getUsername() { + if (url_ == null) { + return null; + } + + final String userInfo = url_.getUserInfo(); + if (userInfo == null) { + return ""; + } + + return StringUtils.substringBefore(userInfo, ':'); + } + + @JsxSetter + public void setUsername(final String username) throws MalformedURLException { + if (url_ == null) { + return; + } + url_ = UrlUtils.getUrlWithNewUserName(url_, username.isEmpty() ? null : username); + } + /** * Calls for instance for implicit conversion to string. * @see com.gargoylesoftware.htmlunit.javascript.SimpleScriptable#getDefaultValue(java.lang.Class) @@ -149,4 +445,30 @@ public Object getDefaultValue(final Class hint) { } return url_.toExternalForm(); } + + /** + * @return a serialized version of the URL, + * although in practice it seems to have the same effect as URL.toString(). + */ + @JsxFunction + public String toJSON() { + return jsToString(); + } + + /** + * Returns the text of the URL. + * @return the text + */ + @JsxFunction(functionName = "toString") + public String jsToString() { + if (StringUtils.isEmpty(url_.getPath())) { + try { + return UrlUtils.getUrlWithNewPath(url_, "/").toExternalForm(); + } + catch (final MalformedURLException e) { + return url_.toExternalForm(); + } + } + return url_.toExternalForm(); + } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/URLSearchParams.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/URLSearchParams.java index 572e3f8ca..26c801232 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/URLSearchParams.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/URLSearchParams.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -328,6 +328,15 @@ public Object values() { "URLSearchParams Iterator", NativeParamsIterator.Type.VALUES, params_.iterator()); } + /** + * Returns the text of the Range. + * @return the text + */ + @JsxFunction(functionName = "toString") + public String jsToString() { + return URLEncodedUtils.format(NameValuePair.toHttpClient(params_), "UTF-8"); + } + /** * Calls for instance for implicit conversion to string. * @see com.gargoylesoftware.htmlunit.javascript.SimpleScriptable#getDefaultValue(java.lang.Class) @@ -336,7 +345,7 @@ public Object values() { */ @Override public Object getDefaultValue(final Class hint) { - return URLEncodedUtils.format(NameValuePair.toHttpClient(params_), "UTF-8"); + return jsToString(); } /** diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WebSocket.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WebSocket.java index 6f4763d24..a38284da3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WebSocket.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WebSocket.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -402,7 +402,7 @@ public void close(final Object code, final Object reason) { } try { - webSocketImpl_.closeClinet(); + webSocketImpl_.closeClient(); } catch (final Exception e) { throw new RuntimeException(e); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java index 2e341c525..99819b057 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -110,13 +110,13 @@ import com.gargoylesoftware.htmlunit.javascript.host.event.MouseEvent; import com.gargoylesoftware.htmlunit.javascript.host.html.DataTransfer; import com.gargoylesoftware.htmlunit.javascript.host.html.DocumentProxy; -import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLBodyElement; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLCollection; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement; import com.gargoylesoftware.htmlunit.javascript.host.performance.Performance; import com.gargoylesoftware.htmlunit.javascript.host.speech.SpeechSynthesis; import com.gargoylesoftware.htmlunit.javascript.host.xml.XMLDocument; +import com.gargoylesoftware.htmlunit.util.UrlUtils; import com.gargoylesoftware.htmlunit.xml.XmlPage; import net.sourceforge.htmlunit.corejs.javascript.Context; @@ -556,7 +556,7 @@ public WindowProxy open(final Object url, final Object name, final Object featur private URL makeUrlForOpenWindow(final String urlString) { if (urlString.isEmpty()) { - return WebClient.URL_ABOUT_BLANK; + return UrlUtils.URL_ABOUT_BLANK; } try { @@ -1206,6 +1206,9 @@ public void scrollBy(final int x, final int y) { if (body != null) { body.setScrollLeft(body.getScrollLeft() + x); body.setScrollTop(body.getScrollTop() + y); + + final Event event = new Event(body, Event.TYPE_SCROLL); + body.fireEvent(event); } } @@ -1218,6 +1221,9 @@ public void scrollByLines(final int lines) { final HTMLElement body = ((HTMLDocument) document_).getBody(); if (body != null) { body.setScrollTop(body.getScrollTop() + (19 * lines)); + + final Event event = new Event(body, Event.TYPE_SCROLL); + body.fireEvent(event); } } @@ -1230,6 +1236,9 @@ public void scrollByPages(final int pages) { final HTMLElement body = ((HTMLDocument) document_).getBody(); if (body != null) { body.setScrollTop(body.getScrollTop() + (getInnerHeight() * pages)); + + final Event event = new Event(body, Event.TYPE_SCROLL); + body.fireEvent(event); } } @@ -1244,6 +1253,9 @@ public void scrollTo(final int x, final int y) { if (body != null) { body.setScrollLeft(x); body.setScrollTop(y); + + final Event event = new Event(body, Event.TYPE_SCROLL); + body.fireEvent(event); } } @@ -1253,17 +1265,7 @@ public void scrollTo(final int x, final int y) { */ @JsxGetter public Object getOnload() { - final Object onload = getEventHandler(Event.TYPE_LOAD); - if (onload == null) { - final HtmlPage page = (HtmlPage) getWebWindow().getEnclosedPage(); - final HtmlElement body = page.getBody(); - if (body != null) { - final HTMLBodyElement b = body.getScriptableObject(); - return b.getEventHandler("onload"); - } - return null; - } - return onload; + return getEventHandler(Event.TYPE_LOAD); } /** @@ -2237,7 +2239,8 @@ public void setOnsubmit(final Object onsubmit) { */ @JsxFunction public void postMessage(final String message, final String targetOrigin, final Object transfer) { - final Page page = getWebWindow().getEnclosedPage(); + final WebWindow webWindow = getWebWindow(); + final Page page = webWindow.getEnclosedPage(); final URL currentURL = page.getUrl(); if (!"*".equals(targetOrigin) && !"/".equals(targetOrigin)) { @@ -2269,8 +2272,8 @@ public void postMessage(final String message, final String targetOrigin, final O event.setParentScope(this); event.setPrototype(getPrototype(event.getClass())); - final JavaScriptEngine jsEngine = (JavaScriptEngine) getWebWindow().getWebClient().getJavaScriptEngine(); - final PostponedAction action = new PostponedAction(page) { + final JavaScriptEngine jsEngine = (JavaScriptEngine) webWindow.getWebClient().getJavaScriptEngine(); + final PostponedAction action = new PostponedAction(page, "Window.postMessage") { @Override public void execute() throws Exception { final ContextAction contextAction = new ContextAction() { @@ -2464,7 +2467,7 @@ public void setOnfocus(final Object onfocus) { */ @JsxGetter public Function getOndragend() { - return getEventHandler("dragend"); + return getEventHandler(Event.TYPE_DRAGEND); } /** @@ -2473,7 +2476,7 @@ public Function getOndragend() { */ @JsxSetter public void setOndragend(final Object ondragend) { - setHandlerForJavaScript("dragend", ondragend); + setHandlerForJavaScript(Event.TYPE_DRAGEND, ondragend); } /** @@ -2482,7 +2485,7 @@ public void setOndragend(final Object ondragend) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOninvalid() { - return getEventHandler("invalid"); + return getEventHandler(Event.TYPE_INVALID); } /** @@ -2491,7 +2494,7 @@ public Function getOninvalid() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOninvalid(final Object oninvalid) { - setHandlerForJavaScript("invalid", oninvalid); + setHandlerForJavaScript(Event.TYPE_INVALID, oninvalid); } /** @@ -2500,7 +2503,7 @@ public void setOninvalid(final Object oninvalid) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointerout() { - return getEventHandler("pointerout"); + return getEventHandler(Event.TYPE_POINTEROUT); } /** @@ -2509,7 +2512,7 @@ public Function getOnpointerout() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointerout(final Object onpointerout) { - setHandlerForJavaScript("pointerout", onpointerout); + setHandlerForJavaScript(Event.TYPE_POINTEROUT, onpointerout); } /** @@ -2518,7 +2521,7 @@ public void setOnpointerout(final Object onpointerout) { */ @JsxGetter(IE) public Function getOnhelp() { - return getEventHandler("help"); + return getEventHandler(Event.TYPE_HELP); } /** @@ -2527,7 +2530,7 @@ public Function getOnhelp() { */ @JsxSetter(IE) public void setOnhelp(final Object onhelp) { - setHandlerForJavaScript("help", onhelp); + setHandlerForJavaScript(Event.TYPE_HELP, onhelp); } /** @@ -2536,7 +2539,7 @@ public void setOnhelp(final Object onhelp) { */ @JsxGetter public Function getOnratechange() { - return getEventHandler("ratechange"); + return getEventHandler(Event.TYPE_RATECHANGE); } /** @@ -2545,7 +2548,7 @@ public Function getOnratechange() { */ @JsxSetter public void setOnratechange(final Object onratechange) { - setHandlerForJavaScript("ratechange", onratechange); + setHandlerForJavaScript(Event.TYPE_RATECHANGE, onratechange); } /** @@ -2554,7 +2557,7 @@ public void setOnratechange(final Object onratechange) { */ @JsxGetter({CHROME, EDGE}) public Function getOnanimationiteration() { - return getEventHandler("animationiteration"); + return getEventHandler(Event.TYPE_ANIMATIONITERATION); } /** @@ -2563,7 +2566,7 @@ public Function getOnanimationiteration() { */ @JsxSetter({CHROME, EDGE}) public void setOnanimationiteration(final Object onanimationiteration) { - setHandlerForJavaScript("animationiteration", onanimationiteration); + setHandlerForJavaScript(Event.TYPE_ANIMATIONITERATION, onanimationiteration); } /** @@ -2572,7 +2575,7 @@ public void setOnanimationiteration(final Object onanimationiteration) { */ @JsxGetter public Function getOncanplaythrough() { - return getEventHandler("canplaythrough"); + return getEventHandler(Event.TYPE_CANPLAYTHROUGH); } /** @@ -2581,7 +2584,7 @@ public Function getOncanplaythrough() { */ @JsxSetter public void setOncanplaythrough(final Object oncanplaythrough) { - setHandlerForJavaScript("canplaythrough", oncanplaythrough); + setHandlerForJavaScript(Event.TYPE_CANPLAYTHROUGH, oncanplaythrough); } /** @@ -2590,7 +2593,7 @@ public void setOncanplaythrough(final Object oncanplaythrough) { */ @JsxGetter({CHROME, EDGE}) public Function getOncancel() { - return getEventHandler("cancel"); + return getEventHandler(Event.TYPE_CANCEL); } /** @@ -2599,7 +2602,7 @@ public Function getOncancel() { */ @JsxSetter({CHROME, EDGE}) public void setOncancel(final Object oncancel) { - setHandlerForJavaScript("cancel", oncancel); + setHandlerForJavaScript(Event.TYPE_CANCEL, oncancel); } /** @@ -2608,7 +2611,7 @@ public void setOncancel(final Object oncancel) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointerenter() { - return getEventHandler("pointerenter"); + return getEventHandler(Event.TYPE_POINTERENTER); } /** @@ -2617,7 +2620,7 @@ public Function getOnpointerenter() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointerenter(final Object onpointerenter) { - setHandlerForJavaScript("pointerenter", onpointerenter); + setHandlerForJavaScript(Event.TYPE_POINTERENTER, onpointerenter); } /** @@ -2626,7 +2629,7 @@ public void setOnpointerenter(final Object onpointerenter) { */ @JsxGetter public Function getOnselect() { - return getEventHandler("select"); + return getEventHandler(Event.TYPE_SELECT); } /** @@ -2635,7 +2638,7 @@ public Function getOnselect() { */ @JsxSetter public void setOnselect(final Object onselect) { - setHandlerForJavaScript("select", onselect); + setHandlerForJavaScript(Event.TYPE_SELECT, onselect); } /** @@ -2644,7 +2647,7 @@ public void setOnselect(final Object onselect) { */ @JsxGetter({CHROME, EDGE}) public Function getOnauxclick() { - return getEventHandler("auxclick"); + return getEventHandler(Event.TYPE_AUXCLICK); } /** @@ -2653,7 +2656,7 @@ public Function getOnauxclick() { */ @JsxSetter({CHROME, EDGE}) public void setOnauxclick(final Object onauxclick) { - setHandlerForJavaScript("auxclick", onauxclick); + setHandlerForJavaScript(Event.TYPE_AUXCLICK, onauxclick); } /** @@ -2662,7 +2665,7 @@ public void setOnauxclick(final Object onauxclick) { */ @JsxGetter public Function getOnscroll() { - return getEventHandler("scroll"); + return getEventHandler(Event.TYPE_SCROLL); } /** @@ -2671,7 +2674,7 @@ public Function getOnscroll() { */ @JsxSetter public void setOnscroll(final Object onscroll) { - setHandlerForJavaScript("scroll", onscroll); + setHandlerForJavaScript(Event.TYPE_SCROLL, onscroll); } /** @@ -2698,7 +2701,7 @@ public void setOnkeydown(final Object onkeydown) { */ @JsxGetter(IE) public Function getOnmspointerleave() { - return getEventHandler("mspointerleave"); + return getEventHandler(Event.TYPE_MSPOINTERLEAVE); } /** @@ -2707,7 +2710,7 @@ public Function getOnmspointerleave() { */ @JsxSetter(IE) public void setOnmspointerleave(final Object onmspointerleave) { - setHandlerForJavaScript("mspointerleave", onmspointerleave); + setHandlerForJavaScript(Event.TYPE_MSPOINTERLEAVE, onmspointerleave); } /** @@ -2716,7 +2719,7 @@ public void setOnmspointerleave(final Object onmspointerleave) { */ @JsxGetter({CHROME, EDGE}) public Function getOnwebkitanimationstart() { - return getEventHandler("webkitanimationstart"); + return getEventHandler(Event.TYPE_WEBANIMATIONSTART); } /** @@ -2725,7 +2728,7 @@ public Function getOnwebkitanimationstart() { */ @JsxSetter({CHROME, EDGE}) public void setOnwebkitanimationstart(final Object onwebkitanimationstart) { - setHandlerForJavaScript("webkitanimationstart", onwebkitanimationstart); + setHandlerForJavaScript(Event.TYPE_WEBANIMATIONSTART, onwebkitanimationstart); } /** @@ -2752,7 +2755,7 @@ public void setOnkeyup(final Object onkeyup) { */ @JsxGetter(IE) public Function getOnmsgesturestart() { - return getEventHandler("msgesturestart"); + return getEventHandler(Event.TYPE_MSGESTURESTART); } /** @@ -2761,7 +2764,7 @@ public Function getOnmsgesturestart() { */ @JsxSetter(IE) public void setOnmsgesturestart(final Object onmsgesturestart) { - setHandlerForJavaScript("msgesturestart", onmsgesturestart); + setHandlerForJavaScript(Event.TYPE_MSGESTURESTART, onmsgesturestart); } /** @@ -2770,7 +2773,7 @@ public void setOnmsgesturestart(final Object onmsgesturestart) { */ @JsxGetter({FF, FF78}) public Function getOndeviceproximity() { - return getEventHandler("deviceproximity"); + return getEventHandler(Event.TYPE_DEVICEPROXIMITY); } /** @@ -2779,7 +2782,7 @@ public Function getOndeviceproximity() { */ @JsxSetter({FF, FF78}) public void setOndeviceproximity(final Object ondeviceproximity) { - setHandlerForJavaScript("deviceproximity", ondeviceproximity); + setHandlerForJavaScript(Event.TYPE_DEVICEPROXIMITY, ondeviceproximity); } /** @@ -2824,7 +2827,7 @@ public void setOnkeypress(final Object onkeypress) { */ @JsxGetter public Function getOndrag() { - return getEventHandler("drag"); + return getEventHandler(Event.TYPE_DRAG); } /** @@ -2833,7 +2836,7 @@ public Function getOndrag() { */ @JsxSetter public void setOndrag(final Object ondrag) { - setHandlerForJavaScript("drag", ondrag); + setHandlerForJavaScript(Event.TYPE_DRAG, ondrag); } /** @@ -2860,7 +2863,7 @@ public void setOnfocusout(final Object onfocusout) { */ @JsxGetter public Function getOnseeked() { - return getEventHandler("seeked"); + return getEventHandler(Event.TYPE_SEEKED); } /** @@ -2869,7 +2872,7 @@ public Function getOnseeked() { */ @JsxSetter public void setOnseeked(final Object onseeked) { - setHandlerForJavaScript("seeked", onseeked); + setHandlerForJavaScript(Event.TYPE_SEEKED, onseeked); } /** @@ -2878,7 +2881,7 @@ public void setOnseeked(final Object onseeked) { */ @JsxGetter public Function getOnoffline() { - return getEventHandler("offline"); + return getEventHandler(Event.TYPE_OFFLINE); } /** @@ -2887,7 +2890,7 @@ public Function getOnoffline() { */ @JsxSetter public void setOnoffline(final Object onoffline) { - setHandlerForJavaScript("offline", onoffline); + setHandlerForJavaScript(Event.TYPE_OFFLINE, onoffline); } /** @@ -2896,7 +2899,7 @@ public void setOnoffline(final Object onoffline) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOndeviceorientation() { - return getEventHandler("deviceorientation"); + return getEventHandler(Event.TYPE_DEVICEORIENTATION); } /** @@ -2905,7 +2908,7 @@ public Function getOndeviceorientation() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOndeviceorientation(final Object ondeviceorientation) { - setHandlerForJavaScript("deviceorientation", ondeviceorientation); + setHandlerForJavaScript(Event.TYPE_DEVICEORIENTATION, ondeviceorientation); } /** @@ -2914,7 +2917,7 @@ public void setOndeviceorientation(final Object ondeviceorientation) { */ @JsxGetter({CHROME, EDGE}) public Function getOntoggle() { - return getEventHandler("toggle"); + return getEventHandler(Event.TYPE_TOGGLE); } /** @@ -2923,7 +2926,7 @@ public Function getOntoggle() { */ @JsxSetter({CHROME, EDGE}) public void setOntoggle(final Object ontoggle) { - setHandlerForJavaScript("toggle", ontoggle); + setHandlerForJavaScript(Event.TYPE_TOGGLE, ontoggle); } /** @@ -2932,7 +2935,7 @@ public void setOntoggle(final Object ontoggle) { */ @JsxGetter public Function getOnplay() { - return getEventHandler("play"); + return getEventHandler(Event.TYPE_PLAY); } /** @@ -2941,7 +2944,7 @@ public Function getOnplay() { */ @JsxSetter public void setOnplay(final Object onplay) { - setHandlerForJavaScript("play", onplay); + setHandlerForJavaScript(Event.TYPE_PLAY, onplay); } /** @@ -3004,7 +3007,7 @@ public void setOnreadystatechange(final Object onreadystatechange) { */ @JsxGetter(IE) public Function getOnmspointerover() { - return getEventHandler("mspointerover"); + return getEventHandler(Event.TYPE_MSPOINTEROVER); } /** @@ -3013,7 +3016,7 @@ public Function getOnmspointerover() { */ @JsxSetter(IE) public void setOnmspointerover(final Object onmspointerover) { - setHandlerForJavaScript("mspointerover", onmspointerover); + setHandlerForJavaScript(Event.TYPE_MSPOINTEROVER, onmspointerover); } /** @@ -3022,7 +3025,7 @@ public void setOnmspointerover(final Object onmspointerover) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointermove() { - return getEventHandler("pointermove"); + return getEventHandler(Event.TYPE_POINTERMOVE); } /** @@ -3031,7 +3034,7 @@ public Function getOnpointermove() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointermove(final Object onpointermove) { - setHandlerForJavaScript("pointermove", onpointermove); + setHandlerForJavaScript(Event.TYPE_POINTERMOVE, onpointermove); } /** @@ -3040,7 +3043,7 @@ public void setOnpointermove(final Object onpointermove) { */ @JsxGetter(IE) public Function getOnmspointermove() { - return getEventHandler("mspointermove"); + return getEventHandler(Event.TYPE_MSPOINTERMOVE); } /** @@ -3049,7 +3052,7 @@ public Function getOnmspointermove() { */ @JsxSetter(IE) public void setOnmspointermove(final Object onmspointermove) { - setHandlerForJavaScript("mspointermove", onmspointermove); + setHandlerForJavaScript(Event.TYPE_MSPOINTERMOVE, onmspointermove); } /** @@ -3076,7 +3079,7 @@ public void setOnmouseover(final Object onmouseover) { */ @JsxGetter({FF, FF78}) public Function getOnuserproximity() { - return getEventHandler("userproximity"); + return getEventHandler(Event.TYPE_USERPROXIMITY); } /** @@ -3085,7 +3088,7 @@ public Function getOnuserproximity() { */ @JsxSetter({FF, FF78}) public void setOnuserproximity(final Object onuserproximity) { - setHandlerForJavaScript("userproximity", onuserproximity); + setHandlerForJavaScript(Event.TYPE_USERPROXIMITY, onuserproximity); } /** @@ -3094,7 +3097,7 @@ public void setOnuserproximity(final Object onuserproximity) { */ @JsxGetter({CHROME, EDGE}) public Function getOnlostpointercapture() { - return getEventHandler("lostpointercapture"); + return getEventHandler(Event.TYPE_LOSTPOINTERCAPTURE); } /** @@ -3103,7 +3106,7 @@ public Function getOnlostpointercapture() { */ @JsxSetter({CHROME, EDGE}) public void setOnlostpointercapture(final Object onlostpointercapture) { - setHandlerForJavaScript("lostpointercapture", onlostpointercapture); + setHandlerForJavaScript(Event.TYPE_LOSTPOINTERCAPTURE, onlostpointercapture); } /** @@ -3112,7 +3115,7 @@ public void setOnlostpointercapture(final Object onlostpointercapture) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointerover() { - return getEventHandler("pointerover"); + return getEventHandler(Event.TYPE_POINTEROVER); } /** @@ -3121,7 +3124,7 @@ public Function getOnpointerover() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointerover(final Object onpointerover) { - setHandlerForJavaScript("pointerover", onpointerover); + setHandlerForJavaScript(Event.TYPE_POINTEROVER, onpointerover); } /** @@ -3148,7 +3151,7 @@ public void setOnclose(final Object onclose) { */ @JsxGetter({CHROME, EDGE}) public Function getOnanimationend() { - return getEventHandler("animationend"); + return getEventHandler(Event.TYPE_ANIMATIONEND); } /** @@ -3157,7 +3160,7 @@ public Function getOnanimationend() { */ @JsxSetter({CHROME, EDGE}) public void setOnanimationend(final Object onanimationend) { - setHandlerForJavaScript("animationend", onanimationend); + setHandlerForJavaScript(Event.TYPE_ANIMATIONEND, onanimationend); } /** @@ -3166,7 +3169,7 @@ public void setOnanimationend(final Object onanimationend) { */ @JsxGetter public Function getOndragenter() { - return getEventHandler("dragenter"); + return getEventHandler(Event.TYPE_DRAGENTER); } /** @@ -3175,7 +3178,7 @@ public Function getOndragenter() { */ @JsxSetter public void setOndragenter(final Object ondragenter) { - setHandlerForJavaScript("dragenter", ondragenter); + setHandlerForJavaScript(Event.TYPE_DRAGENTER, ondragenter); } /** @@ -3184,7 +3187,7 @@ public void setOndragenter(final Object ondragenter) { */ @JsxGetter({FF, FF78, IE}) public Function getOnafterprint() { - return getEventHandler("afterprint"); + return getEventHandler(Event.TYPE_AFTERPRINT); } /** @@ -3193,7 +3196,7 @@ public Function getOnafterprint() { */ @JsxSetter({FF, FF78, IE}) public void setOnafterprint(final Object onafterprint) { - setHandlerForJavaScript("afterprint", onafterprint); + setHandlerForJavaScript(Event.TYPE_AFTERPRINT, onafterprint); } /** @@ -3202,7 +3205,7 @@ public void setOnafterprint(final Object onafterprint) { */ @JsxGetter({FF, FF78}) public Function getOnmozfullscreenerror() { - return getEventHandler("mozfullscreenerror"); + return getEventHandler(Event.TYPE_MOZFULLSCREENERROR); } /** @@ -3211,7 +3214,7 @@ public Function getOnmozfullscreenerror() { */ @JsxSetter({FF, FF78}) public void setOnmozfullscreenerror(final Object onmozfullscreenerror) { - setHandlerForJavaScript("mozfullscreenerror", onmozfullscreenerror); + setHandlerForJavaScript(Event.TYPE_MOZFULLSCREENERROR, onmozfullscreenerror); } /** @@ -3220,7 +3223,7 @@ public void setOnmozfullscreenerror(final Object onmozfullscreenerror) { */ @JsxGetter public Function getOnmouseleave() { - return getEventHandler("mouseleave"); + return getEventHandler(Event.TYPE_MOUSELEAVE); } /** @@ -3229,7 +3232,7 @@ public Function getOnmouseleave() { */ @JsxSetter public void setOnmouseleave(final Object onmouseleave) { - setHandlerForJavaScript("mouseleave", onmouseleave); + setHandlerForJavaScript(Event.TYPE_MOUSELEAVE, onmouseleave); } /** @@ -3238,7 +3241,7 @@ public void setOnmouseleave(final Object onmouseleave) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnmousewheel() { - return getEventHandler("mousewheel"); + return getEventHandler(Event.TYPE_MOUSEWHEEL); } /** @@ -3247,7 +3250,7 @@ public Function getOnmousewheel() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnmousewheel(final Object onmousewheel) { - setHandlerForJavaScript("mousewheel", onmousewheel); + setHandlerForJavaScript(Event.TYPE_MOUSEWHEEL, onmousewheel); } /** @@ -3256,7 +3259,7 @@ public void setOnmousewheel(final Object onmousewheel) { */ @JsxGetter public Function getOnseeking() { - return getEventHandler("seeking"); + return getEventHandler(Event.TYPE_SEEKING); } /** @@ -3265,7 +3268,7 @@ public Function getOnseeking() { */ @JsxSetter public void setOnseeking(final Object onseeking) { - setHandlerForJavaScript("seeking", onseeking); + setHandlerForJavaScript(Event.TYPE_SEEKING, onseeking); } /** @@ -3274,7 +3277,7 @@ public void setOnseeking(final Object onseeking) { */ @JsxGetter({CHROME, EDGE}) public Function getOncuechange() { - return getEventHandler("cuechange"); + return getEventHandler(Event.TYPE_CUECHANGE); } /** @@ -3283,7 +3286,7 @@ public Function getOncuechange() { */ @JsxSetter({CHROME, EDGE}) public void setOncuechange(final Object oncuechange) { - setHandlerForJavaScript("cuechange", oncuechange); + setHandlerForJavaScript(Event.TYPE_CUECHANGE, oncuechange); } /** @@ -3292,7 +3295,7 @@ public void setOncuechange(final Object oncuechange) { */ @JsxGetter public Function getOnpageshow() { - return getEventHandler("pageshow"); + return getEventHandler(Event.TYPE_PAGESHOW); } /** @@ -3301,7 +3304,7 @@ public Function getOnpageshow() { */ @JsxSetter public void setOnpageshow(final Object onpageshow) { - setHandlerForJavaScript("pageshow", onpageshow); + setHandlerForJavaScript(Event.TYPE_PAGESHOW, onpageshow); } /** @@ -3310,7 +3313,7 @@ public void setOnpageshow(final Object onpageshow) { */ @JsxGetter(IE) public Function getOnmspointerenter() { - return getEventHandler("mspointerenter"); + return getEventHandler(Event.TYPE_MSPOINTENTER); } /** @@ -3319,7 +3322,7 @@ public Function getOnmspointerenter() { */ @JsxSetter(IE) public void setOnmspointerenter(final Object onmspointerenter) { - setHandlerForJavaScript("mspointerenter", onmspointerenter); + setHandlerForJavaScript(Event.TYPE_MSPOINTENTER, onmspointerenter); } /** @@ -3328,7 +3331,7 @@ public void setOnmspointerenter(final Object onmspointerenter) { */ @JsxGetter({FF, FF78}) public Function getOnmozfullscreenchange() { - return getEventHandler("mozfullscreenchange"); + return getEventHandler(Event.TYPE_MOZFULLSCREENCHANGE); } /** @@ -3337,7 +3340,7 @@ public Function getOnmozfullscreenchange() { */ @JsxSetter({FF, FF78}) public void setOnmozfullscreenchange(final Object onmozfullscreenchange) { - setHandlerForJavaScript("mozfullscreenchange", onmozfullscreenchange); + setHandlerForJavaScript(Event.TYPE_MOZFULLSCREENCHANGE, onmozfullscreenchange); } /** @@ -3346,7 +3349,7 @@ public void setOnmozfullscreenchange(final Object onmozfullscreenchange) { */ @JsxGetter public Function getOndurationchange() { - return getEventHandler("durationchange"); + return getEventHandler(Event.TYPE_DURATIONCHANGE); } /** @@ -3355,7 +3358,7 @@ public Function getOndurationchange() { */ @JsxSetter public void setOndurationchange(final Object ondurationchange) { - setHandlerForJavaScript("durationchange", ondurationchange); + setHandlerForJavaScript(Event.TYPE_DURATIONCHANGE, ondurationchange); } /** @@ -3364,7 +3367,7 @@ public void setOndurationchange(final Object ondurationchange) { */ @JsxGetter public Function getOnplaying() { - return getEventHandler("playing"); + return getEventHandler(Event.TYPE_PLAYNG); } /** @@ -3373,7 +3376,7 @@ public Function getOnplaying() { */ @JsxSetter public void setOnplaying(final Object onplaying) { - setHandlerForJavaScript("playing", onplaying); + setHandlerForJavaScript(Event.TYPE_PLAYNG, onplaying); } /** @@ -3382,7 +3385,7 @@ public void setOnplaying(final Object onplaying) { */ @JsxGetter public Function getOnended() { - return getEventHandler("ended"); + return getEventHandler(Event.TYPE_ENDED); } /** @@ -3391,7 +3394,7 @@ public Function getOnended() { */ @JsxSetter public void setOnended(final Object onended) { - setHandlerForJavaScript("ended", onended); + setHandlerForJavaScript(Event.TYPE_ENDED, onended); } /** @@ -3400,7 +3403,7 @@ public void setOnended(final Object onended) { */ @JsxGetter public Function getOnloadeddata() { - return getEventHandler("loadeddata"); + return getEventHandler(Event.TYPE_LOADEDDATA); } /** @@ -3409,7 +3412,7 @@ public Function getOnloadeddata() { */ @JsxSetter public void setOnloadeddata(final Object onloadeddata) { - setHandlerForJavaScript("loadeddata", onloadeddata); + setHandlerForJavaScript(Event.TYPE_LOADEDDATA, onloadeddata); } /** @@ -3418,7 +3421,7 @@ public void setOnloadeddata(final Object onloadeddata) { */ @JsxGetter({CHROME, EDGE}) public Function getOnunhandledrejection() { - return getEventHandler("unhandledrejection"); + return getEventHandler(Event.TYPE_UNHANDLEDREJECTION); } /** @@ -3427,7 +3430,7 @@ public Function getOnunhandledrejection() { */ @JsxSetter({CHROME, EDGE}) public void setOnunhandledrejection(final Object onunhandledrejection) { - setHandlerForJavaScript("unhandledrejection", onunhandledrejection); + setHandlerForJavaScript(Event.TYPE_UNHANDLEDREJECTION, onunhandledrejection); } /** @@ -3454,7 +3457,7 @@ public void setOnmouseout(final Object onmouseout) { */ @JsxGetter public Function getOnsuspend() { - return getEventHandler("suspend"); + return getEventHandler(Event.TYPE_SUSPEND); } /** @@ -3463,7 +3466,7 @@ public Function getOnsuspend() { */ @JsxSetter public void setOnsuspend(final Object onsuspend) { - setHandlerForJavaScript("suspend", onsuspend); + setHandlerForJavaScript(Event.TYPE_SUSPEND, onsuspend); } /** @@ -3472,7 +3475,7 @@ public void setOnsuspend(final Object onsuspend) { */ @JsxGetter public Function getOnwaiting() { - return getEventHandler("waiting"); + return getEventHandler(Event.TYPE_WAITING); } /** @@ -3481,7 +3484,7 @@ public Function getOnwaiting() { */ @JsxSetter public void setOnwaiting(final Object onwaiting) { - setHandlerForJavaScript("waiting", onwaiting); + setHandlerForJavaScript(Event.TYPE_WAITING, onwaiting); } /** @@ -3490,7 +3493,7 @@ public void setOnwaiting(final Object onwaiting) { */ @JsxGetter public Function getOncanplay() { - return getEventHandler("canplay"); + return getEventHandler(Event.TYPE_CANPLAY); } /** @@ -3499,7 +3502,7 @@ public Function getOncanplay() { */ @JsxSetter public void setOncanplay(final Object oncanplay) { - setHandlerForJavaScript("canplay", oncanplay); + setHandlerForJavaScript(Event.TYPE_CANPLAY, oncanplay); } /** @@ -3526,7 +3529,7 @@ public void setOnmousedown(final Object onmousedown) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnlanguagechange() { - return getEventHandler("languagechange"); + return getEventHandler(Event.TYPE_LANGUAGECHANGE); } /** @@ -3535,7 +3538,7 @@ public Function getOnlanguagechange() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnlanguagechange(final Object onlanguagechange) { - setHandlerForJavaScript("languagechange", onlanguagechange); + setHandlerForJavaScript(Event.TYPE_LANGUAGECHANGE, onlanguagechange); } /** @@ -3544,7 +3547,7 @@ public void setOnlanguagechange(final Object onlanguagechange) { */ @JsxGetter public Function getOnemptied() { - return getEventHandler("emptied"); + return getEventHandler(Event.TYPE_EMPTIED); } /** @@ -3553,7 +3556,7 @@ public Function getOnemptied() { */ @JsxSetter public void setOnemptied(final Object onemptied) { - setHandlerForJavaScript("emptied", onemptied); + setHandlerForJavaScript(Event.TYPE_EMPTIED, onemptied); } /** @@ -3562,7 +3565,7 @@ public void setOnemptied(final Object onemptied) { */ @JsxGetter({CHROME, EDGE}) public Function getOnrejectionhandled() { - return getEventHandler("rejectionhandled"); + return getEventHandler(Event.TYPE_REJECTIONHANDLED); } /** @@ -3571,7 +3574,7 @@ public Function getOnrejectionhandled() { */ @JsxSetter({CHROME, EDGE}) public void setOnrejectionhandled(final Object onrejectionhandled) { - setHandlerForJavaScript("rejectionhandled", onrejectionhandled); + setHandlerForJavaScript(Event.TYPE_REJECTIONHANDLED, onrejectionhandled); } /** @@ -3580,7 +3583,7 @@ public void setOnrejectionhandled(final Object onrejectionhandled) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointercancel() { - return getEventHandler("pointercancel"); + return getEventHandler(Event.TYPE_POINTERCANCEL); } /** @@ -3589,7 +3592,7 @@ public Function getOnpointercancel() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointercancel(final Object onpointercancel) { - setHandlerForJavaScript("pointercancel", onpointercancel); + setHandlerForJavaScript(Event.TYPE_POINTERCANCEL, onpointercancel); } /** @@ -3598,7 +3601,7 @@ public void setOnpointercancel(final Object onpointercancel) { */ @JsxGetter(IE) public Function getOnmsgestureend() { - return getEventHandler("msgestureend"); + return getEventHandler(Event.TYPE_MSGESTUREEND); } /** @@ -3607,7 +3610,7 @@ public Function getOnmsgestureend() { */ @JsxSetter(IE) public void setOnmsgestureend(final Object onmsgestureend) { - setHandlerForJavaScript("msgestureend", onmsgestureend); + setHandlerForJavaScript(Event.TYPE_MSGESTUREEND, onmsgestureend); } /** @@ -3616,7 +3619,7 @@ public void setOnmsgestureend(final Object onmsgestureend) { */ @JsxGetter public Function getOnresize() { - return getEventHandler("resize"); + return getEventHandler(Event.TYPE_RESIZE); } /** @@ -3625,7 +3628,7 @@ public Function getOnresize() { */ @JsxSetter public void setOnresize(final Object onresize) { - setHandlerForJavaScript("resize", onresize); + setHandlerForJavaScript(Event.TYPE_RESIZE, onresize); } /** @@ -3634,7 +3637,7 @@ public void setOnresize(final Object onresize) { */ @JsxGetter public Function getOnpause() { - return getEventHandler("pause"); + return getEventHandler(Event.TYPE_PAUSE); } /** @@ -3643,7 +3646,7 @@ public Function getOnpause() { */ @JsxSetter public void setOnpause(final Object onpause) { - setHandlerForJavaScript("pause", onpause); + setHandlerForJavaScript(Event.TYPE_PAUSE, onpause); } /** @@ -3652,7 +3655,7 @@ public void setOnpause(final Object onpause) { */ @JsxGetter public Function getOnloadstart() { - return getEventHandler("loadstart"); + return getEventHandler(Event.TYPE_LOAD_START); } /** @@ -3661,7 +3664,7 @@ public Function getOnloadstart() { */ @JsxSetter public void setOnloadstart(final Object onloadstart) { - setHandlerForJavaScript("loadstart", onloadstart); + setHandlerForJavaScript(Event.TYPE_LOAD_START, onloadstart); } /** @@ -3670,7 +3673,7 @@ public void setOnloadstart(final Object onloadstart) { */ @JsxGetter public Function getOnprogress() { - return getEventHandler("progress"); + return getEventHandler(Event.TYPE_PROGRESS); } /** @@ -3679,7 +3682,7 @@ public Function getOnprogress() { */ @JsxSetter public void setOnprogress(final Object onprogress) { - setHandlerForJavaScript("progress", onprogress); + setHandlerForJavaScript(Event.TYPE_PROGRESS, onprogress); } /** @@ -3688,7 +3691,7 @@ public void setOnprogress(final Object onprogress) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointerup() { - return getEventHandler("pointerup"); + return getEventHandler(Event.TYPE_POINTERUP); } /** @@ -3697,7 +3700,7 @@ public Function getOnpointerup() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointerup(final Object onpointerup) { - setHandlerForJavaScript("pointerup", onpointerup); + setHandlerForJavaScript(Event.TYPE_POINTERUP, onpointerup); } /** @@ -3706,7 +3709,7 @@ public void setOnpointerup(final Object onpointerup) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnwheel() { - return getEventHandler("wheel"); + return getEventHandler(Event.TYPE_WHEEL); } /** @@ -3715,7 +3718,7 @@ public Function getOnwheel() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnwheel(final Object onwheel) { - setHandlerForJavaScript("wheel", onwheel); + setHandlerForJavaScript(Event.TYPE_WHEEL, onwheel); } /** @@ -3724,7 +3727,7 @@ public void setOnwheel(final Object onwheel) { */ @JsxGetter(IE) public Function getOnmspointerdown() { - return getEventHandler("mspointerdown"); + return getEventHandler(Event.TYPE_MSPOINTERDOWN); } /** @@ -3733,7 +3736,7 @@ public Function getOnmspointerdown() { */ @JsxSetter(IE) public void setOnmspointerdown(final Object onmspointerdown) { - setHandlerForJavaScript("mspointerdown", onmspointerdown); + setHandlerForJavaScript(Event.TYPE_MSPOINTERDOWN, onmspointerdown); } /** @@ -3742,7 +3745,7 @@ public void setOnmspointerdown(final Object onmspointerdown) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointerleave() { - return getEventHandler("pointerleave"); + return getEventHandler(Event.TYPE_POINTERLEAVE); } /** @@ -3751,7 +3754,7 @@ public Function getOnpointerleave() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointerleave(final Object onpointerleave) { - setHandlerForJavaScript("pointerleave", onpointerleave); + setHandlerForJavaScript(Event.TYPE_POINTERLEAVE, onpointerleave); } /** @@ -3760,7 +3763,7 @@ public void setOnpointerleave(final Object onpointerleave) { */ @JsxGetter({FF, FF78, IE}) public Function getOnbeforeprint() { - return getEventHandler("beforeprint"); + return getEventHandler(Event.TYPE_BEFOREPRINT); } /** @@ -3769,7 +3772,7 @@ public Function getOnbeforeprint() { */ @JsxSetter({FF, FF78, IE}) public void setOnbeforeprint(final Object onbeforeprint) { - setHandlerForJavaScript("beforeprint", onbeforeprint); + setHandlerForJavaScript(Event.TYPE_BEFOREPRINT, onbeforeprint); } /** @@ -3778,7 +3781,7 @@ public void setOnbeforeprint(final Object onbeforeprint) { */ @JsxGetter public Function getOnstorage() { - return getEventHandler("storage"); + return getEventHandler(Event.TYPE_STORAGE); } /** @@ -3787,7 +3790,7 @@ public Function getOnstorage() { */ @JsxSetter public void setOnstorage(final Object onstorage) { - setHandlerForJavaScript("storage", onstorage); + setHandlerForJavaScript(Event.TYPE_STORAGE, onstorage); } /** @@ -3796,7 +3799,7 @@ public void setOnstorage(final Object onstorage) { */ @JsxGetter({FF, FF78}) public Function getOndevicelight() { - return getEventHandler("devicelight"); + return getEventHandler(Event.TYPE_DEVICELIGHT); } /** @@ -3805,7 +3808,7 @@ public Function getOndevicelight() { */ @JsxSetter({FF, FF78}) public void setOndevicelight(final Object ondevicelight) { - setHandlerForJavaScript("devicelight", ondevicelight); + setHandlerForJavaScript(Event.TYPE_DEVICELIGHT, ondevicelight); } /** @@ -3814,7 +3817,7 @@ public void setOndevicelight(final Object ondevicelight) { */ @JsxGetter({CHROME, EDGE}) public Function getOnanimationstart() { - return getEventHandler("animationstart"); + return getEventHandler(Event.TYPE_ANIMATIONSTART); } /** @@ -3823,7 +3826,7 @@ public Function getOnanimationstart() { */ @JsxSetter({CHROME, EDGE}) public void setOnanimationstart(final Object onanimationstart) { - setHandlerForJavaScript("animationstart", onanimationstart); + setHandlerForJavaScript(Event.TYPE_ANIMATIONSTART, onanimationstart); } /** @@ -3832,7 +3835,7 @@ public void setOnanimationstart(final Object onanimationstart) { */ @JsxGetter(IE) public Function getOnmspointercancel() { - return getEventHandler("mspointercancel"); + return getEventHandler(Event.TYPE_MSPOINTERCANCEL); } /** @@ -3841,7 +3844,7 @@ public Function getOnmspointercancel() { */ @JsxSetter(IE) public void setOnmspointercancel(final Object onmspointercancel) { - setHandlerForJavaScript("mspointercancel", onmspointercancel); + setHandlerForJavaScript(Event.TYPE_MSPOINTERCANCEL, onmspointercancel); } /** @@ -3850,7 +3853,7 @@ public void setOnmspointercancel(final Object onmspointercancel) { */ @JsxGetter public Function getOntimeupdate() { - return getEventHandler("timeupdate"); + return getEventHandler(Event.TYPE_TIMEUPDATE); } /** @@ -3859,7 +3862,7 @@ public Function getOntimeupdate() { */ @JsxSetter public void setOntimeupdate(final Object ontimeupdate) { - setHandlerForJavaScript("timeupdate", ontimeupdate); + setHandlerForJavaScript(Event.TYPE_TIMEUPDATE, ontimeupdate); } /** @@ -3868,7 +3871,7 @@ public void setOntimeupdate(final Object ontimeupdate) { */ @JsxGetter public Function getOnpagehide() { - return getEventHandler("pagehide"); + return getEventHandler(Event.TYPE_PAGEHIDE); } /** @@ -3877,7 +3880,7 @@ public Function getOnpagehide() { */ @JsxSetter public void setOnpagehide(final Object onpagehide) { - setHandlerForJavaScript("pagehide", onpagehide); + setHandlerForJavaScript(Event.TYPE_PAGEHIDE, onpagehide); } /** @@ -3886,7 +3889,7 @@ public void setOnpagehide(final Object onpagehide) { */ @JsxGetter({CHROME, EDGE}) public Function getOnwebkitanimationiteration() { - return getEventHandler("webkitanimationiteration"); + return getEventHandler(Event.TYPE_WEBKITANIMATIONITERATION); } /** @@ -3895,7 +3898,7 @@ public Function getOnwebkitanimationiteration() { */ @JsxSetter({CHROME, EDGE}) public void setOnwebkitanimationiteration(final Object onwebkitanimationiteration) { - setHandlerForJavaScript("webkitanimationiteration", onwebkitanimationiteration); + setHandlerForJavaScript(Event.TYPE_WEBKITANIMATIONITERATION, onwebkitanimationiteration); } /** @@ -3904,7 +3907,7 @@ public void setOnwebkitanimationiteration(final Object onwebkitanimationiteratio */ @JsxGetter(IE) public Function getOnmspointerup() { - return getEventHandler("mspointerup"); + return getEventHandler(Event.TYPE_MSPOINTERUP); } /** @@ -3913,7 +3916,7 @@ public Function getOnmspointerup() { */ @JsxSetter(IE) public void setOnmspointerup(final Object onmspointerup) { - setHandlerForJavaScript("mspointerup", onmspointerup); + setHandlerForJavaScript(Event.TYPE_MSPOINTERUP, onmspointerup); } /** @@ -3922,7 +3925,7 @@ public void setOnmspointerup(final Object onmspointerup) { */ @JsxGetter public Function getOnabort() { - return getEventHandler("abort"); + return getEventHandler(Event.TYPE_ABORT); } /** @@ -3931,7 +3934,7 @@ public Function getOnabort() { */ @JsxSetter public void setOnabort(final Object onabort) { - setHandlerForJavaScript("abort", onabort); + setHandlerForJavaScript(Event.TYPE_ABORT, onabort); } /** @@ -3940,7 +3943,7 @@ public void setOnabort(final Object onabort) { */ @JsxGetter public Function getOnloadedmetadata() { - return getEventHandler("loadedmetadata"); + return getEventHandler(Event.TYPE_LOADEDMETADATA); } /** @@ -3949,7 +3952,7 @@ public Function getOnloadedmetadata() { */ @JsxSetter public void setOnloadedmetadata(final Object onloadedmetadata) { - setHandlerForJavaScript("loadedmetadata", onloadedmetadata); + setHandlerForJavaScript(Event.TYPE_LOADEDMETADATA, onloadedmetadata); } /** @@ -3958,7 +3961,7 @@ public void setOnloadedmetadata(final Object onloadedmetadata) { */ @JsxGetter(IE) public Function getOnmsinertiastart() { - return getEventHandler("msinertiastart"); + return getEventHandler(Event.TYPE_MSINERTIASTART); } /** @@ -3967,7 +3970,7 @@ public Function getOnmsinertiastart() { */ @JsxSetter(IE) public void setOnmsinertiastart(final Object onmsinertiastart) { - setHandlerForJavaScript("msinertiastart", onmsinertiastart); + setHandlerForJavaScript(Event.TYPE_MSINERTIASTART, onmsinertiastart); } /** @@ -3994,7 +3997,7 @@ public void setOnmouseup(final Object onmouseup) { */ @JsxGetter(IE) public Function getOnmsgesturetap() { - return getEventHandler("msgesturetap"); + return getEventHandler(Event.TYPE_MSGESTURETAP); } /** @@ -4003,7 +4006,7 @@ public Function getOnmsgesturetap() { */ @JsxSetter(IE) public void setOnmsgesturetap(final Object onmsgesturetap) { - setHandlerForJavaScript("msgesturetap", onmsgesturetap); + setHandlerForJavaScript(Event.TYPE_MSGESTURETAP, onmsgesturetap); } /** @@ -4012,7 +4015,7 @@ public void setOnmsgesturetap(final Object onmsgesturetap) { */ @JsxGetter public Function getOndragover() { - return getEventHandler("dragover"); + return getEventHandler(Event.TYPE_DRAGOVER); } /** @@ -4021,7 +4024,7 @@ public Function getOndragover() { */ @JsxSetter public void setOndragover(final Object ondragover) { - setHandlerForJavaScript("dragover", ondragover); + setHandlerForJavaScript(Event.TYPE_DRAGOVER, ondragover); } /** @@ -4030,7 +4033,7 @@ public void setOndragover(final Object ondragover) { */ @JsxGetter public Function getOnonline() { - return getEventHandler("online"); + return getEventHandler(Event.TYPE_ONLINE); } /** @@ -4039,7 +4042,7 @@ public Function getOnonline() { */ @JsxSetter public void setOnonline(final Object ononline) { - setHandlerForJavaScript("online", ononline); + setHandlerForJavaScript(Event.TYPE_ONLINE, ononline); } /** @@ -4048,7 +4051,7 @@ public void setOnonline(final Object ononline) { */ @JsxGetter(IE) public Function getOnmsgesturedoubletap() { - return getEventHandler("msgesturedoubletap"); + return getEventHandler(Event.TYPE_MSGESTUREDOUBLETAP); } /** @@ -4057,7 +4060,7 @@ public Function getOnmsgesturedoubletap() { */ @JsxSetter(IE) public void setOnmsgesturedoubletap(final Object onmsgesturedoubletap) { - setHandlerForJavaScript("msgesturedoubletap", onmsgesturedoubletap); + setHandlerForJavaScript(Event.TYPE_MSGESTUREDOUBLETAP, onmsgesturedoubletap); } /** @@ -4066,7 +4069,7 @@ public void setOnmsgesturedoubletap(final Object onmsgesturedoubletap) { */ @JsxGetter({CHROME, EDGE}) public Function getOnsearch() { - return getEventHandler("search"); + return getEventHandler(Event.TYPE_SEARCH); } /** @@ -4075,7 +4078,7 @@ public Function getOnsearch() { */ @JsxSetter({CHROME, EDGE}) public void setOnsearch(final Object onsearch) { - setHandlerForJavaScript("search", onsearch); + setHandlerForJavaScript(Event.TYPE_SEARCH, onsearch); } /** @@ -4102,7 +4105,7 @@ public void setOninput(final Object oninput) { */ @JsxGetter({CHROME, EDGE}) public Function getOnwebkittransitionend() { - return getEventHandler("webkittransitionend"); + return getEventHandler(Event.TYPE_WEBKITTRANSITIONEND); } /** @@ -4111,7 +4114,7 @@ public Function getOnwebkittransitionend() { */ @JsxSetter({CHROME, EDGE}) public void setOnwebkittransitionend(final Object onwebkittransitionend) { - setHandlerForJavaScript("webkittransitionend", onwebkittransitionend); + setHandlerForJavaScript(Event.TYPE_WEBKITTRANSITIONEND, onwebkittransitionend); } /** @@ -4120,7 +4123,7 @@ public void setOnwebkittransitionend(final Object onwebkittransitionend) { */ @JsxGetter(IE) public Function getOnmspointerout() { - return getEventHandler("mspointerout"); + return getEventHandler(Event.TYPE_MSPOINTEROUT); } /** @@ -4129,7 +4132,7 @@ public Function getOnmspointerout() { */ @JsxSetter(IE) public void setOnmspointerout(final Object onmspointerout) { - setHandlerForJavaScript("mspointerout", onmspointerout); + setHandlerForJavaScript(Event.TYPE_MSPOINTEROUT, onmspointerout); } /** @@ -4138,7 +4141,7 @@ public void setOnmspointerout(final Object onmspointerout) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOndevicemotion() { - return getEventHandler("devicemotion"); + return getEventHandler(Event.TYPE_DEVICEMOTION); } /** @@ -4147,7 +4150,7 @@ public Function getOndevicemotion() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOndevicemotion(final Object ondevicemotion) { - setHandlerForJavaScript("devicemotion", ondevicemotion); + setHandlerForJavaScript(Event.TYPE_DEVICEMOTION, ondevicemotion); } /** @@ -4156,7 +4159,7 @@ public void setOndevicemotion(final Object ondevicemotion) { */ @JsxGetter public Function getOnstalled() { - return getEventHandler("stalled"); + return getEventHandler(Event.TYPE_STALLED); } /** @@ -4165,7 +4168,7 @@ public Function getOnstalled() { */ @JsxSetter public void setOnstalled(final Object onstalled) { - setHandlerForJavaScript("stalled", onstalled); + setHandlerForJavaScript(Event.TYPE_STALLED, onstalled); } /** @@ -4174,7 +4177,7 @@ public void setOnstalled(final Object onstalled) { */ @JsxGetter public Function getOnmouseenter() { - return getEventHandler("mouseenter"); + return getEventHandler(Event.TYPE_MOUDEENTER); } /** @@ -4183,7 +4186,7 @@ public Function getOnmouseenter() { */ @JsxSetter public void setOnmouseenter(final Object onmouseenter) { - setHandlerForJavaScript("mouseenter", onmouseenter); + setHandlerForJavaScript(Event.TYPE_MOUDEENTER, onmouseenter); } /** @@ -4192,7 +4195,7 @@ public void setOnmouseenter(final Object onmouseenter) { */ @JsxGetter public Function getOndragleave() { - return getEventHandler("dragleave"); + return getEventHandler(Event.TYPE_DRAGLEAVE); } /** @@ -4201,7 +4204,7 @@ public Function getOndragleave() { */ @JsxSetter public void setOndragleave(final Object ondragleave) { - setHandlerForJavaScript("dragleave", ondragleave); + setHandlerForJavaScript(Event.TYPE_DRAGLEAVE, ondragleave); } /** @@ -4210,7 +4213,7 @@ public void setOndragleave(final Object ondragleave) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointerdown() { - return getEventHandler("pointerdown"); + return getEventHandler(Event.TYPE_POINTERDOWN); } /** @@ -4219,7 +4222,7 @@ public Function getOnpointerdown() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointerdown(final Object onpointerdown) { - setHandlerForJavaScript("pointerdown", onpointerdown); + setHandlerForJavaScript(Event.TYPE_POINTERDOWN, onpointerdown); } /** @@ -4228,7 +4231,7 @@ public void setOnpointerdown(final Object onpointerdown) { */ @JsxGetter public Function getOndrop() { - return getEventHandler("drop"); + return getEventHandler(Event.TYPE_DROP); } /** @@ -4237,7 +4240,7 @@ public Function getOndrop() { */ @JsxSetter public void setOndrop(final Object ondrop) { - setHandlerForJavaScript("drop", ondrop); + setHandlerForJavaScript(Event.TYPE_DROP, ondrop); } /** @@ -4264,7 +4267,7 @@ public void setOnunload(final Object onunload) { */ @JsxGetter({CHROME, EDGE}) public Function getOnwebkitanimationend() { - return getEventHandler("webkitanimationend"); + return getEventHandler(Event.TYPE_WEBKITANIMATIONEND); } /** @@ -4273,7 +4276,7 @@ public Function getOnwebkitanimationend() { */ @JsxSetter({CHROME, EDGE}) public void setOnwebkitanimationend(final Object onwebkitanimationend) { - setHandlerForJavaScript("webkitanimationend", onwebkitanimationend); + setHandlerForJavaScript(Event.TYPE_WEBKITANIMATIONEND, onwebkitanimationend); } /** @@ -4282,7 +4285,7 @@ public void setOnwebkitanimationend(final Object onwebkitanimationend) { */ @JsxGetter public Function getOndragstart() { - return getEventHandler("dragstart"); + return getEventHandler(Event.TYPE_DRAGSTART); } /** @@ -4291,7 +4294,7 @@ public Function getOndragstart() { */ @JsxSetter public void setOndragstart(final Object ondragstart) { - setHandlerForJavaScript("dragstart", ondragstart); + setHandlerForJavaScript(Event.TYPE_DRAGSTART, ondragstart); } /** @@ -4300,7 +4303,7 @@ public void setOndragstart(final Object ondragstart) { */ @JsxGetter({CHROME, EDGE}) public Function getOntransitionend() { - return getEventHandler("transitionend"); + return getEventHandler(Event.TYPE_TRANSITIONEND); } /** @@ -4309,7 +4312,7 @@ public Function getOntransitionend() { */ @JsxSetter({CHROME, EDGE}) public void setOntransitionend(final Object ontransitionend) { - setHandlerForJavaScript("transitionend", ontransitionend); + setHandlerForJavaScript(Event.TYPE_TRANSITIONEND, ontransitionend); } /** @@ -4318,7 +4321,7 @@ public void setOntransitionend(final Object ontransitionend) { */ @JsxGetter(IE) public Function getOnmsgesturehold() { - return getEventHandler("msgesturehold"); + return getEventHandler(Event.TYPE_MSGESTUREHOLD); } /** @@ -4327,7 +4330,7 @@ public Function getOnmsgesturehold() { */ @JsxSetter(IE) public void setOnmsgesturehold(final Object onmsgesturehold) { - setHandlerForJavaScript("msgesturehold", onmsgesturehold); + setHandlerForJavaScript(Event.TYPE_MSGESTUREHOLD, onmsgesturehold); } /** @@ -4336,7 +4339,7 @@ public void setOnmsgesturehold(final Object onmsgesturehold) { */ @JsxGetter({CHROME, EDGE}) public Function getOndeviceorientationabsolute() { - return getEventHandler("deviceorientationabsolute"); + return getEventHandler(Event.TYPE_DEVICEORIENTATIONABSOLUTE); } /** @@ -4345,25 +4348,25 @@ public Function getOndeviceorientationabsolute() { */ @JsxSetter({CHROME, EDGE}) public void setOndeviceorientationabsolute(final Object ondeviceorientationabsolute) { - setHandlerForJavaScript("deviceorientationabsolute", ondeviceorientationabsolute); + setHandlerForJavaScript(Event.TYPE_DEVICEORIENTATIONABSOLUTE, ondeviceorientationabsolute); } /** * Returns the {@code onshow} event handler. * @return the {@code onshow} event handler */ - @JsxGetter({FF, FF78}) + @JsxGetter(FF78) public Function getOnshow() { - return getEventHandler("show"); + return getEventHandler(Event.TYPE_SHOW); } /** * Sets the {@code onshow} event handler. * @param onshow the {@code onshow} event handler */ - @JsxSetter({FF, FF78}) + @JsxSetter(FF78) public void setOnshow(final Object onshow) { - setHandlerForJavaScript("show", onshow); + setHandlerForJavaScript(Event.TYPE_SHOW, onshow); } /** @@ -4372,7 +4375,7 @@ public void setOnshow(final Object onshow) { */ @JsxGetter public Function getOnvolumechange() { - return getEventHandler("volumechange"); + return getEventHandler(Event.TYPE_VOLUMECHANGE); } /** @@ -4381,7 +4384,7 @@ public Function getOnvolumechange() { */ @JsxSetter public void setOnvolumechange(final Object onvolumechange) { - setHandlerForJavaScript("volumechange", onvolumechange); + setHandlerForJavaScript(Event.TYPE_VOLUMECHANGE, onvolumechange); } /** @@ -4390,7 +4393,7 @@ public void setOnvolumechange(final Object onvolumechange) { */ @JsxGetter(IE) public Function getOnmsgesturechange() { - return getEventHandler("msgesturechange"); + return getEventHandler(Event.TYPE_MSGESTURECHANGE); } /** @@ -4399,7 +4402,7 @@ public Function getOnmsgesturechange() { */ @JsxSetter(IE) public void setOnmsgesturechange(final Object onmsgesturechange) { - setHandlerForJavaScript("msgesturechange", onmsgesturechange); + setHandlerForJavaScript(Event.TYPE_MSGESTURECHANGE, onmsgesturechange); } /** @@ -4408,7 +4411,7 @@ public void setOnmsgesturechange(final Object onmsgesturechange) { */ @JsxGetter({CHROME, EDGE}) public Function getOngotpointercapture() { - return getEventHandler("gotpointercapture"); + return getEventHandler(Event.TYPE_GOTPOINTERCAPTURE); } /** @@ -4417,7 +4420,7 @@ public Function getOngotpointercapture() { */ @JsxSetter({CHROME, EDGE}) public void setOngotpointercapture(final Object ongotpointercapture) { - setHandlerForJavaScript("gotpointercapture", ongotpointercapture); + setHandlerForJavaScript(Event.TYPE_GOTPOINTERCAPTURE, ongotpointercapture); } /** diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WindowOrWorkerGlobalScope.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WindowOrWorkerGlobalScope.java index 973e6a810..81194ee38 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WindowOrWorkerGlobalScope.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WindowOrWorkerGlobalScope.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WindowOrWorkerGlobalScopeMixin.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WindowOrWorkerGlobalScopeMixin.java index 9ef35c494..280b277cc 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WindowOrWorkerGlobalScopeMixin.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WindowOrWorkerGlobalScopeMixin.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WindowProxy.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WindowProxy.java index 24dec676a..f94022d07 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WindowProxy.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/WindowProxy.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/XPathExpression.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/XPathExpression.java index a33fc5fb3..64c805798 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/XPathExpression.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/XPathExpression.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/Animation.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/Animation.java index 6fc3fc5de..0fe719795 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/Animation.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/Animation.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/AnimationEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/AnimationEvent.java index 0b5861849..09124aa2a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/AnimationEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/AnimationEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/KeyframeEffect.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/KeyframeEffect.java index 51fa9826e..911c34949 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/KeyframeEffect.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/KeyframeEffect.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/package-info.java index 025fef964..57503be3a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/animations/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Atomics.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Atomics.java index 9d06d5775..82f9a3b7b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Atomics.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Atomics.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/SharedArrayBuffer.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/SharedArrayBuffer.java index 9ace904b4..8f7859b84 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/SharedArrayBuffer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/SharedArrayBuffer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/package-info.java index 7e23ddfc9..e2e4e5cdb 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasCaptureMediaStream.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasCaptureMediaStream.java index c74012a55..383ad0212 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasCaptureMediaStream.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasCaptureMediaStream.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasCaptureMediaStreamTrack.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasCaptureMediaStreamTrack.java index bd2525e6f..a7636053a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasCaptureMediaStreamTrack.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasCaptureMediaStreamTrack.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasGradient.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasGradient.java index d97bf1e31..6ed40f18f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasGradient.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasGradient.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasPattern.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasPattern.java index 5d0a09fcb..071818c78 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasPattern.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasPattern.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2D.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2D.java index e9006e455..f8ce36571 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2D.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2D.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -390,35 +390,47 @@ public CanvasGradient createRadialGradient(final double x0, final double y0, @SuppressWarnings("unused") public void drawImage(final Object image, final int sx, final int sy, final Object sWidth, final Object sHeight, final Object dx, final Object dy, final Object dWidth, final Object dHeight) { - final Integer dxI; - final Integer dyI; - Integer dWidthI = null; - Integer dHeightI = null; - Integer sWidthI = null; - Integer sHeightI = null; - if (!Undefined.isUndefined(dx)) { - dxI = ((Number) dx).intValue(); - dyI = ((Number) dy).intValue(); - dWidthI = ((Number) dWidth).intValue(); - dHeightI = ((Number) dHeight).intValue(); - } - else { - dxI = sx; - dyI = sy; - } - if (!Undefined.isUndefined(sWidth)) { - sWidthI = ((Number) sWidth).intValue(); - sHeightI = ((Number) sHeight).intValue(); - } - try { - if (image instanceof HTMLImageElement) { - final ImageReader imageReader = - ((HtmlImage) ((HTMLImageElement) image).getDomNodeOrDie()).getImageReader(); - getRenderingBackend().drawImage(imageReader, dxI, dyI); + if (image instanceof HTMLImageElement) { + final HTMLImageElement imageElem = (HTMLImageElement) image; + try { + final ImageReader imageReader = ((HtmlImage) imageElem.getDomNodeOrDie()).getImageReader(); + + // 3 arguments + // void ctx.drawImage(image, dx, dy); + if (Undefined.isUndefined(sWidth)) { + getRenderingBackend().drawImage(imageReader, 0, 0, null, null, sx, sy, null, null); + } + + // 5 arguments + // void ctx.drawImage(image, dx, dy, dWidth, dHeight); + else if (Undefined.isUndefined(dx)) { + final int dWidthI = ScriptRuntime.toInt32(sWidth); + final int dHeightI = ScriptRuntime.toInt32(sHeight); + + getRenderingBackend().drawImage(imageReader, 0, 0, null, null, sx, sy, dWidthI, dHeightI); + } + + // all 9 arguments + // void ctx.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight); + else { + final int sWidthI = ScriptRuntime.toInt32(sWidth); + final int sHeightI = ScriptRuntime.toInt32(sHeight); + + final int dxI = ScriptRuntime.toInt32(dx); + final int dyI = ScriptRuntime.toInt32(dy); + final int dWidthI = ScriptRuntime.toInt32(dWidth); + final int dHeightI = ScriptRuntime.toInt32(dHeight); + + getRenderingBackend().drawImage(imageReader, + sx, sy, sWidthI, sHeightI, dxI, dyI, dWidthI, dHeightI); + } + } + catch (final IOException ioe) { + LOG.info("There is no ImageReader available for you imgage with src '" + imageElem.getSrc() + "'" + + "Please have a look at https://htmlunit.sourceforge.io/images-howto.html " + + "for a possible solution."); } - } - catch (final IOException ioe) { } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ImageBitmapRenderingContext.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ImageBitmapRenderingContext.java index a7b78c7b8..f9ee8396d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ImageBitmapRenderingContext.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ImageBitmapRenderingContext.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ImageData.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ImageData.java index 40fbb9a94..3ebb4f12b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ImageData.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ImageData.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/IntersectionObserver.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/IntersectionObserver.java index 7a7c0aba1..23edd17b6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/IntersectionObserver.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/IntersectionObserver.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/IntersectionObserverEntry.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/IntersectionObserverEntry.java index 81cb1156f..2d47eb127 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/IntersectionObserverEntry.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/IntersectionObserverEntry.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/Path2D.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/Path2D.java index 400a6e57b..5d78f4712 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/Path2D.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/Path2D.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/TextMetrics.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/TextMetrics.java index fb0c47e2c..fd2e1fa59 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/TextMetrics.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/TextMetrics.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGL2RenderingContext.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGL2RenderingContext.java index b38096349..690b72aa8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGL2RenderingContext.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGL2RenderingContext.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLActiveInfo.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLActiveInfo.java index ef49c385a..994cb0d75 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLActiveInfo.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLActiveInfo.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLBuffer.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLBuffer.java index aabc5686d..d646ce89f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLBuffer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLBuffer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLFramebuffer.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLFramebuffer.java index d74b87fa0..797856658 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLFramebuffer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLFramebuffer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLProgram.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLProgram.java index 0d002978b..8d5ace138 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLProgram.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLProgram.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLQuery.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLQuery.java index d2ff20413..f0fc1fd83 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLQuery.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLQuery.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLRenderbuffer.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLRenderbuffer.java index 5f305407d..58f803493 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLRenderbuffer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLRenderbuffer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLRenderingContext.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLRenderingContext.java index b6e108826..e1cb90358 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLRenderingContext.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLRenderingContext.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLSampler.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLSampler.java index 97363028b..5749cb19b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLSampler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLSampler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLShader.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLShader.java index 29e04352f..00a6dc512 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLShader.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLShader.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLShaderPrecisionFormat.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLShaderPrecisionFormat.java index e9a3553ba..07d49f979 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLShaderPrecisionFormat.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLShaderPrecisionFormat.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLSync.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLSync.java index b69f2af95..07a626018 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLSync.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLSync.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLTexture.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLTexture.java index 837704853..4f132cc8c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLTexture.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLTexture.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLTransformFeedback.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLTransformFeedback.java index cc4eedc6d..142b20939 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLTransformFeedback.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLTransformFeedback.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLUniformLocation.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLUniformLocation.java index c8c6b5021..f197c867f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLUniformLocation.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLUniformLocation.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLVertexArrayObject.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLVertexArrayObject.java index 15914464e..84736598f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLVertexArrayObject.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/WebGLVertexArrayObject.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/ANGLE_instanced_arrays.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/ANGLE_instanced_arrays.java index ad5828eda..2c2cad111 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/ANGLE_instanced_arrays.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/ANGLE_instanced_arrays.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/EXT_texture_filter_anisotropic.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/EXT_texture_filter_anisotropic.java index 27e1266c7..8a1852a29 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/EXT_texture_filter_anisotropic.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/EXT_texture_filter_anisotropic.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_element_index_uint.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_element_index_uint.java index 2d973714f..7ae9c8e23 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_element_index_uint.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_element_index_uint.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_standard_derivatives.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_standard_derivatives.java index b81486709..0e11eea5b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_standard_derivatives.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_standard_derivatives.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_texture_float.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_texture_float.java index 2e7949a27..4a7b2b2de 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_texture_float.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_texture_float.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_texture_float_linear.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_texture_float_linear.java index cb0d13e06..3bd023276 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_texture_float_linear.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/OES_texture_float_linear.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/WEBGL_compressed_texture_s3tc.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/WEBGL_compressed_texture_s3tc.java index 485737260..9edec776c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/WEBGL_compressed_texture_s3tc.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/WEBGL_compressed_texture_s3tc.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/WEBGL_debug_renderer_info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/WEBGL_debug_renderer_info.java index 0569ef798..b940a7f27 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/WEBGL_debug_renderer_info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/WEBGL_debug_renderer_info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/package-info.java index 2012f83f7..750732b49 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ext/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/package-info.java index f98b41236..b046fb320 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/rendering/AwtRenderingBackend.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/rendering/AwtRenderingBackend.java index 2f0ce0634..0e0509615 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/rendering/AwtRenderingBackend.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/rendering/AwtRenderingBackend.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,10 @@ import java.awt.AlphaComposite; import java.awt.BasicStroke; import java.awt.Color; +import java.awt.Composite; +import java.awt.Font; import java.awt.Graphics2D; +import java.awt.Image; import java.awt.RenderingHints; import java.awt.Shape; import java.awt.geom.AffineTransform; @@ -26,6 +29,7 @@ import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; +import java.awt.image.ImageObserver; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -257,6 +261,9 @@ public AwtRenderingBackend(final int imageWidth, final int imageHeight) { setGlobalAlpha(1.0); graphics2D_.setClip(null); + final Font font = new Font("SansSerif", Font.PLAIN, 10); + graphics2D_.setFont(font); + graphics2D_.setBackground(new Color(0f, 0f, 0f, 0f)); graphics2D_.setColor(Color.black); graphics2D_.clearRect(0, 0, imageWidth, imageHeight); @@ -387,18 +394,26 @@ public void clearRect(final double x, final double y, final double w, final doub LOG.debug("[" + id_ + "] clearRect(" + x + ", " + y + ", " + w + ", " + h + ")"); } - graphics2D_.setColor(Color.WHITE); + final Composite saved = graphics2D_.getComposite(); + + graphics2D_.setColor(Color.BLACK); + graphics2D_.setComposite(AlphaComposite.Clear); // overpaint final Rectangle2D rect = new Rectangle2D.Double(x, y, w, h); graphics2D_.fill(transformation_.createTransformedShape(rect)); + + graphics2D_.setComposite(saved); } /** * {@inheritDoc} */ @Override - public void drawImage(final ImageReader imageReader, final int dxI, final int dyI) throws IOException { + public void drawImage(final ImageReader imageReader, + final int sx, final int sy, final Integer sWidth, final Integer sHeight, + final int dx, final int dy, final Integer dWidth, final Integer dHeight) throws IOException { if (LOG.isDebugEnabled()) { - LOG.debug("[" + id_ + "] drawImage()"); + LOG.debug("[" + id_ + "] drawImage(" + sx + ", " + sy + ", " + sWidth + ", " + sHeight + + "," + dx + ", " + dy + ", " + dWidth + ", " + dHeight + ")"); } if (imageReader.getNumImages(true) != 0) { @@ -408,7 +423,92 @@ public void drawImage(final ImageReader imageReader, final int dxI, final int dy try { graphics2D_.setTransform(transformation_); graphics2D_.setColor(fillColor_); - graphics2D_.drawImage(img, dxI, dyI, image_.getWidth(), image_.getHeight(), null); + + final int sx2; + if (sWidth == null) { + sx2 = sx + img.getWidth(); + } + else { + sx2 = sx + sWidth; + } + + final int sy2; + if (sHeight == null) { + sy2 = sy + img.getHeight(); + } + else { + sy2 = sy + sHeight; + } + + int dx1 = dx; + final int dx2; + if (dWidth == null) { + dx2 = dx + img.getWidth(); + } + else { + if (dWidth < 0) { + dx1 = dx1 + dWidth; + dx2 = dx1 - dWidth; + } + else { + dx2 = dx1 + dWidth; + } + } + + int dy1 = dy; + final int dy2; + if (dHeight == null) { + dy2 = dy + img.getHeight(); + } + else { + if (dHeight < 0) { + dy1 = dy1 + dHeight; + dy2 = dy1 - dHeight; + } + else { + dy2 = dy1 + dHeight; + } + } + + final Object done = new Object(); + final ImageObserver imageObserver = new ImageObserver() { + @Override + public boolean imageUpdate(final Image img, final int flags, + final int x, final int y, final int width, final int height) { + + if ((flags & ImageObserver.ALLBITS) == ImageObserver.ALLBITS) { + return true; + } + + if ((flags & ImageObserver.ABORT) == ImageObserver.ABORT + || (flags & ImageObserver.ERROR) == ImageObserver.ERROR) { + return true; + } + + synchronized (done) { + done.notify(); + } + + return false; + } + }; + + synchronized (done) { + final boolean completelyLoaded = + graphics2D_.drawImage(img, dx1, dy1, dx2, dy2, sx, sy, sx2, sy2, imageObserver); + if (!completelyLoaded) { + while (true) { + try { + done.wait(4 * 1000); // max 4s + break; + } + catch (final InterruptedException e) { + LOG.error("[" + id_ + "] AwtRenderingBackend interrupted " + + "while waiting for drawImage to finish.", e); + } + } + } + } } finally { graphics2D_.setTransform(savedTransform); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/rendering/RenderingBackend.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/rendering/RenderingBackend.java index 11ee890e8..80be6e0dd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/rendering/RenderingBackend.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/rendering/RenderingBackend.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -80,11 +80,21 @@ void arc(double x, double y, double radius, double startAngle, * Draws images onto the context. * * @param imageReader the reader to read the image from 8the first one) - * @param dxI the x coordinate of the starting point (top left) - * @param dyI the y coordinate of the starting point (top left) + * @param sx the X coordinate of the top left corner of the sub-rectangle of the source image + * to draw into the destination context + * @param sy the Y coordinate of the top left corner of the sub-rectangle of the source image + * to draw into the destination context + * @param sWidth the width of the sub-rectangle of the source image to draw into the destination context + * @param sHeight the height of the sub-rectangle of the source image to draw into the destination context + * @param dx the X coordinate in the destination canvas at which to place the top-left corner of the source image + * @param dy the Y coordinate in the destination canvas at which to place the top-left corner of the source image + * @param dWidth the width to draw the image in the destination canvas. This allows scaling of the drawn image + * @param dHeight the height to draw the image in the destination canvas. This allows scaling of the drawn image * @throws IOException in case o problems */ - void drawImage(ImageReader imageReader, int dxI, int dyI) throws IOException; + void drawImage(ImageReader imageReader, + int sx, int sy, Integer sWidth, Integer sHeight, + int dx, int dy, Integer dWidth, Integer dHeight) throws IOException; /** * Constructs a base64 encoded string out of the image data. diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/rendering/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/rendering/package-info.java index 08101e9c3..4816f0e81 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/rendering/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/rendering/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/Crypto.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/Crypto.java index 189d76c0f..431a1d835 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/Crypto.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/Crypto.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/CryptoKey.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/CryptoKey.java index eb2c633ea..6abdfd0b8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/CryptoKey.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/CryptoKey.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/SubtleCrypto.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/SubtleCrypto.java index ca5287612..ffdf33262 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/SubtleCrypto.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/SubtleCrypto.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,12 +22,16 @@ import com.gargoylesoftware.htmlunit.javascript.SimpleScriptable; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxFunction; +import com.gargoylesoftware.htmlunit.javascript.host.Promise; +import com.gargoylesoftware.htmlunit.javascript.host.dom.DOMException; /** * A JavaScript object for {@code SubtleCrypto}. * * @author Ahmed Ashour * @author Ronald Brill + * @author Atsushi Nakagawa */ @JsxClass public class SubtleCrypto extends SimpleScriptable { @@ -39,4 +43,63 @@ public class SubtleCrypto extends SimpleScriptable { public SubtleCrypto() { } + private Promise notImplemented() { + return Promise.reject(null, this, + new Object[] {new DOMException("Operation is not supported", DOMException.NOT_SUPPORTED_ERR)}, null); + } + + @JsxFunction + public Promise encrypt() { + return notImplemented(); + } + + @JsxFunction + public Promise decrypt() { + return notImplemented(); + } + + @JsxFunction + public Promise sign() { + return notImplemented(); + } + + @JsxFunction + public Promise verify() { + return notImplemented(); + } + + @JsxFunction + public Promise digest() { + return notImplemented(); + } + + @JsxFunction + public Promise generateKey() { + return notImplemented(); + } + + @JsxFunction + public Promise deriveKey() { + return notImplemented(); + } + + @JsxFunction + public Promise importKey() { + return notImplemented(); + } + + @JsxFunction + public Promise exportKey() { + return notImplemented(); + } + + @JsxFunction + public Promise wrapKey() { + return notImplemented(); + } + + @JsxFunction + public Promise unwrapKey() { + return notImplemented(); + } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/package-info.java index 955068ce0..f505bec56 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/BrowserConfiguration.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/BrowserConfiguration.java index a10573410..2ed0687a6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/BrowserConfiguration.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/BrowserConfiguration.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSS.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSS.java index 593fbd7f6..a1bf9c5e5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSS.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSS.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,7 +22,6 @@ import com.gargoylesoftware.htmlunit.javascript.SimpleScriptable; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; -import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor; import net.sourceforge.htmlunit.corejs.javascript.Scriptable; @@ -38,7 +37,6 @@ public class CSS extends SimpleScriptable { /** * Default constructor. */ - @JsxConstructor({CHROME, EDGE}) public CSS() { } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSS2Properties.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSS2Properties.java index 302697a28..214e19b54 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSS2Properties.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSS2Properties.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSConditionRule.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSConditionRule.java index 8360a663a..c85c5a0f7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSConditionRule.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSConditionRule.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSCounterStyleRule.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSCounterStyleRule.java index 76666ffb9..c57a20eaf 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSCounterStyleRule.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSCounterStyleRule.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSFontFaceRule.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSFontFaceRule.java index d15a0d0d1..31504db05 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSFontFaceRule.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSFontFaceRule.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSGroupingRule.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSGroupingRule.java index 296e2ad22..016d421e7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSGroupingRule.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSGroupingRule.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSImportRule.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSImportRule.java index df8882d0f..f6200f09b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSImportRule.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSImportRule.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSKeyframeRule.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSKeyframeRule.java index b0b7b4b58..dcc728f0e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSKeyframeRule.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSKeyframeRule.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSKeyframesRule.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSKeyframesRule.java index 68f466588..190b71226 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSKeyframesRule.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSKeyframesRule.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSMediaRule.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSMediaRule.java index 7cfaee029..f17e4aae4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSMediaRule.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSMediaRule.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSNamespaceRule.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSNamespaceRule.java index f9e8d790a..6db62cc44 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSNamespaceRule.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSNamespaceRule.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSPageRule.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSPageRule.java index c3d68501d..14e49aeeb 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSPageRule.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSPageRule.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRule.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRule.java index 515fa9ebe..67b1c21aa 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRule.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRule.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRuleList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRuleList.java index 7f21d7984..841613fed 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRuleList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRuleList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration.java index eb805f942..280612c18 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -153,10 +153,11 @@ * @author Sudhan Moghe * @author Ronald Brill * @author Frank Danek + * @author Dennis Duysak */ @JsxClass public class CSSStyleDeclaration extends SimpleScriptable { - private static final Pattern TO_INT_PATTERN = Pattern.compile("(\\d+).*"); + private static final Pattern TO_FLOAT_PATTERN = Pattern.compile("(\\d+(?:\\.\\d+)?).*"); private static final Pattern URL_PATTERN = Pattern.compile("url\\(\\s*[\"']?(.*?)[\"']?\\s*\\)"); private static final Pattern POSITION_PATTERN = @@ -2886,11 +2887,12 @@ protected static int pixelValue(final Element element, final CssValue value) { private static int pixelValue(final Element element, final CssValue value, final boolean percentMode) { final String s = value.get(element); if (s.endsWith("%") || (s.isEmpty() && element instanceof HTMLHtmlElement)) { - final int i = NumberUtils.toInt(TO_INT_PATTERN.matcher(s).replaceAll("$1"), 100); + final float i = NumberUtils.toFloat(TO_FLOAT_PATTERN.matcher(s).replaceAll("$1"), 100); + final Element parent = element.getParentElement(); final int absoluteValue = (parent == null) ? value.getWindowDefaultValue() : pixelValue(parent, value, true); - return (int) ((i / 100D) * absoluteValue); + return Math.round((i / 100f) * absoluteValue); } if (AUTO.equals(s)) { return value.getDefaultValue(); @@ -2925,12 +2927,12 @@ private static int pixelValue(final Element element, final CssValue value, final * @see #pixelValue(Element, CssValue) */ protected static int pixelValue(final String value) { - int i = NumberUtils.toInt(TO_INT_PATTERN.matcher(value).replaceAll("$1"), 0); + float i = NumberUtils.toFloat(TO_FLOAT_PATTERN.matcher(value).replaceAll("$1"), 0); if (value.length() < 2) { - return i; + return Math.round(i); } if (value.endsWith("px")) { - return i; + return Math.round(i); } if (value.endsWith("em")) { @@ -2957,7 +2959,7 @@ else if (value.endsWith("pt")) { else if (value.endsWith("pc")) { i = i * 24; } - return i; + return Math.round(i); } @Override diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleRule.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleRule.java index 402f7df00..0b605e7b0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleRule.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleRule.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheet.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheet.java index cd3b43e78..b17f81460 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheet.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheet.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -95,7 +95,6 @@ import com.gargoylesoftware.htmlunit.BrowserVersion; import com.gargoylesoftware.htmlunit.Cache; import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.WebRequest; import com.gargoylesoftware.htmlunit.WebResponse; @@ -111,9 +110,7 @@ import com.gargoylesoftware.htmlunit.html.HtmlOption; import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.gargoylesoftware.htmlunit.html.HtmlRadioButtonInput; -import com.gargoylesoftware.htmlunit.html.HtmlSelect; import com.gargoylesoftware.htmlunit.html.HtmlStyle; -import com.gargoylesoftware.htmlunit.html.HtmlTextArea; import com.gargoylesoftware.htmlunit.javascript.SimpleScriptable; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor; @@ -179,7 +176,7 @@ public class CSSStyleSheet extends StyleSheet { "checked", "disabled", "enabled", "indeterminated", "root", "target", "not()", "nth-child()", "nth-last-child()", "nth-of-type()", "nth-last-of-type()", "last-child", "first-of-type", "last-of-type", "only-child", "only-of-type", "empty", - "optional", "required")); + "optional", "required", "valid", "invalid")); static { CSS3_PSEUDO_CLASSES.addAll(CSS2_PSEUDO_CLASSES); @@ -301,7 +298,7 @@ public static CSSStyleSheet loadStylesheet(final HTMLElement element, final Html // Use href. final BrowserVersion browser = client.getBrowserVersion(); request = new WebRequest(new URL(url), browser.getCssAcceptHeader(), browser.getAcceptEncodingHeader()); - request.setAdditionalHeader(HttpHeader.REFERER, uri); + request.setRefererlHeader(page.getUrl()); // our cache is a bit strange; // loadWebResponse check the cache for the web response @@ -744,16 +741,10 @@ private static boolean selectsPseudoClass(final BrowserVersion browserVersion, || (element instanceof HtmlOption && ((HtmlOption) element).isSelected())); case "required": - return (element instanceof HtmlInput - || element instanceof HtmlSelect - || element instanceof HtmlTextArea) - && element.hasAttribute("required"); + return element instanceof HtmlElement && ((HtmlElement) element).isRequired(); case "optional": - return (element instanceof HtmlInput - || element instanceof HtmlSelect - || element instanceof HtmlTextArea) - && !element.hasAttribute("required"); + return element instanceof HtmlElement && ((HtmlElement) element).isOptional(); case "first-child": for (DomNode n = element.getPreviousSibling(); n != null; n = n.getPreviousSibling()) { @@ -816,6 +807,12 @@ private static boolean selectsPseudoClass(final BrowserVersion browserVersion, } return true; + case "valid": + return element instanceof HtmlElement && ((HtmlElement) element).isValid(); + + case "invalid": + return element instanceof HtmlElement && !((HtmlElement) element).isValid(); + case "empty": return isEmpty(element); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSupportsRule.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSupportsRule.java index 324a66633..4fe0f3f8f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSupportsRule.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSupportsRule.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CaretPosition.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CaretPosition.java index ddfce38a1..c7cab5a4d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CaretPosition.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/CaretPosition.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java index dac1d6fea..2f00d09f7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedFont.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedFont.java index ababd13ef..cc776f28a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedFont.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedFont.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/MediaQueryList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/MediaQueryList.java index 813c5ccad..4c0248381 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/MediaQueryList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/MediaQueryList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributes.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributes.java index 1760181a1..7be5832f9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributes.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributes.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,6 @@ import static com.gargoylesoftware.htmlunit.javascript.host.css.BrowserConfiguration.chromeAndEdge; import static com.gargoylesoftware.htmlunit.javascript.host.css.BrowserConfiguration.chromeAndEdgeAndFirefox; import static com.gargoylesoftware.htmlunit.javascript.host.css.BrowserConfiguration.chromeAndEdgeNotIterable; -import static com.gargoylesoftware.htmlunit.javascript.host.css.BrowserConfiguration.edge; import static com.gargoylesoftware.htmlunit.javascript.host.css.BrowserConfiguration.ff; import static com.gargoylesoftware.htmlunit.javascript.host.css.BrowserConfiguration.ffLatest; import static com.gargoylesoftware.htmlunit.javascript.host.css.BrowserConfiguration.ffNotIterable; @@ -182,6 +181,9 @@ public enum Definition { /** The style property {@code ascentOverride}. */ ASCENT_OVERRIDE("ascentOverride", "ascent-override", chromeAndEdge("")), + /** The style property {@code aspectRatio}. */ + ASPECT_RATIO("aspectRatio", "aspect-ratio", chromeAndEdge("auto")), + /** The style property {@code azimuth}. */ AZIMUTH("azimuth", "azimuth"), @@ -431,13 +433,13 @@ public enum Definition { BORDER_COLOR_("border-color", "border-color", ff("")), /** The style property {@code borderEndEndRadius}. */ - BORDER_END_END_RADIUS("borderEndEndRadius", "border-end-end-radius", ff("0px")), + BORDER_END_END_RADIUS("borderEndEndRadius", "border-end-end-radius", chromeAndEdge("0px"), ff("0px")), /** The style property {@code border-end-end-radius}. */ BORDER_END_END_RADIUS_("border-end-end-radius", "border-end-end-radius", ff("0px")), /** The style property {@code borderEndStartRadius}. */ - BORDER_END_START_RADIUS("borderEndStartRadius", "border-end-start-radius", ff("0px")), + BORDER_END_START_RADIUS("borderEndStartRadius", "border-end-start-radius", chromeAndEdge("0px"), ff("0px")), /** The style property {@code border-end-start-radius}. */ BORDER_END_START_RADIUS_("border-end-start-radius", "border-end-start-radius", ff("0px")), @@ -630,13 +632,14 @@ public enum Definition { BORDER_SPACING_("border-spacing", "border-spacing", ff("0px 0px")), /** The style property {@code borderStartEndRadius}. */ - BORDER_START_END_RADIUS("borderStartEndRadius", "border-start-end-radius", ff("0px")), + BORDER_START_END_RADIUS("borderStartEndRadius", "border-start-end-radius", chromeAndEdge("0px"), ff("0px")), /** The style property {@code border-start-end-radius}. */ BORDER_START_END_RADIUS_("border-start-end-radius", "border-start-end-radius", ff("0px")), /** The style property {@code borderStartStartRadius}. */ - BORDER_START_START_RADIUS("borderStartStartRadius", "border-start-start-radius", ff("0px")), + BORDER_START_START_RADIUS("borderStartStartRadius", "border-start-start-radius", + chromeAndEdge("0px"), ff("0px")), /** The style property {@code border-start-start-radius}. */ BORDER_START_START_RADIUS_("border-start-start-radius", "border-start-start-radius", ff("0px")), @@ -1134,7 +1137,7 @@ public enum Definition { /** The style property {@code forcedColorAdjust}. */ FORCED_COLOR_ADJUST("forcedColorAdjust", "forced-color-adjust", - edge("auto")), + chromeAndEdge("auto")), /** The style property {@code gap}. */ GAP("gap", "gap", chromeAndEdge("normal"), ff("")), @@ -2489,6 +2492,9 @@ public enum Definition { /** The style property {@code overflow-block}. */ OVERFLOW_BLOCK_("overflow-block", "overflow-block", ff("visible")), + /** The style property {@code overflowClipMargin}. */ + OVERFLOW_CLIP_MARGIN("overflowClipMargin", "overflow-clip-margin", chromeAndEdge("0px")), + /** The style property {@code overflowInline}. */ OVERFLOW_INLINE("overflowInline", "overflow-inline", ff("visible")), diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleMedia.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleMedia.java index b8bbeefc7..900cdd700 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleMedia.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleMedia.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleSheet.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleSheet.java index 986eb702e..12c71c416 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleSheet.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleSheet.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleSheetList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleSheetList.java index 3d153c394..764a87bff 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleSheetList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleSheetList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/WebKitCSSMatrix.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/WebKitCSSMatrix.java index a89fcbb87..3a6cb2e29 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/WebKitCSSMatrix.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/WebKitCSSMatrix.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/package-info.java index 35add4f80..929e190fe 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/AbstractList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/AbstractList.java index 5c52b4acf..c87808fa9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/AbstractList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/AbstractList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Attr.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Attr.java index 96a505af6..00d5576af 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Attr.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Attr.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CDATASection.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CDATASection.java index 2f4c643bf..ee71e7edf 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CDATASection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CDATASection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CharacterData.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CharacterData.java index 0d4ca8411..712040a96 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CharacterData.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CharacterData.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Comment.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Comment.java index f3609cdac..cfb5957bc 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Comment.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Comment.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CustomElementRegistry.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CustomElementRegistry.java index ce4396786..21ecc69ee 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CustomElementRegistry.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CustomElementRegistry.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMError.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMError.java index f838f7639..f2635bb44 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMError.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMError.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMException.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMException.java index 5e0a35466..65d4fd57a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMException.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMException.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMImplementation.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMImplementation.java index 0507c2fe2..ec59d7582 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMImplementation.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMImplementation.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -46,7 +46,6 @@ import java.io.IOException; import com.gargoylesoftware.htmlunit.StringWebResponse; -import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.WebResponse; import com.gargoylesoftware.htmlunit.WebWindow; import com.gargoylesoftware.htmlunit.html.HtmlPage; @@ -57,6 +56,7 @@ import com.gargoylesoftware.htmlunit.javascript.configuration.JsxFunction; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument; import com.gargoylesoftware.htmlunit.javascript.host.xml.XMLDocument; +import com.gargoylesoftware.htmlunit.util.UrlUtils; import com.gargoylesoftware.htmlunit.xml.XmlPage; import net.sourceforge.htmlunit.corejs.javascript.Context; @@ -281,7 +281,7 @@ && getBrowserVersion().hasFeature(JS_DOMIMPLEMENTATION_CREATE_HTMLDOCOMENT_REQUI + Context.toString(titleObj) + ""; } - final WebResponse webResponse = new StringWebResponse(html, WebClient.URL_ABOUT_BLANK); + final WebResponse webResponse = new StringWebResponse(html, UrlUtils.URL_ABOUT_BLANK); final HtmlPage page = new HtmlPage(webResponse, webWindow); // According to spec and behavior of function in browsers new document // has no location object and is not connected with any window diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMMatrix.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMMatrix.java index ae3ca6f9c..b75ac0853 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMMatrix.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMMatrix.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMMatrixReadOnly.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMMatrixReadOnly.java index 745d182a8..a0730eba6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMMatrixReadOnly.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMMatrixReadOnly.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMParser.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMParser.java index c67c6a50a..3ca364372 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMParser.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMParser.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMPoint.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMPoint.java index e406037aa..604382404 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMPoint.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMPoint.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMPointReadOnly.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMPointReadOnly.java index beabf1f93..fba8a2fb8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMPointReadOnly.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMPointReadOnly.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMRectReadOnly.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMRectReadOnly.java index ea4dd5297..9db4aea32 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMRectReadOnly.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMRectReadOnly.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMRequest.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMRequest.java index e15f84f0a..27a2366ec 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMRequest.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMRequest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMSettableTokenList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMSettableTokenList.java index 32b87d88f..7a2c06108 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMSettableTokenList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMSettableTokenList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMStringList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMStringList.java index bb15ba972..141ce2702 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMStringList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMStringList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMStringMap.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMStringMap.java index 5ad8de2ea..e7bd01793 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMStringMap.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMStringMap.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMTokenList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMTokenList.java index 9ad7696fe..27ffac443 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMTokenList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMTokenList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document.java index ecb8f6b2e..233243e35 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -72,7 +72,6 @@ import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.SgmlPage; -import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.WebResponse; import com.gargoylesoftware.htmlunit.WebWindow; import com.gargoylesoftware.htmlunit.html.BaseFrameElement; @@ -140,6 +139,7 @@ import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLDocument; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement; import com.gargoylesoftware.htmlunit.util.EncodingSniffer; +import com.gargoylesoftware.htmlunit.util.UrlUtils; import com.gargoylesoftware.htmlunit.xml.XmlPage; import net.sourceforge.htmlunit.corejs.javascript.Callable; @@ -1357,7 +1357,7 @@ public Range createRange() { public String getDomain() { if (domain_ == null && getPage().getWebResponse() != null) { URL url = getPage().getUrl(); - if (url == WebClient.URL_ABOUT_BLANK) { + if (url == UrlUtils.URL_ABOUT_BLANK) { final WebWindow w = getWindow().getWebWindow(); if (w instanceof FrameWindow) { url = ((FrameWindow) w).getEnclosingPage().getUrl(); @@ -1404,11 +1404,11 @@ public String getDomain() { public void setDomain(String newDomain) { final BrowserVersion browserVersion = getBrowserVersion(); - // IE (at least 6) doesn't allow to set domain of about:blank - if (WebClient.URL_ABOUT_BLANK == getPage().getUrl() + // IE doesn't allow to set domain of about:blank + if (UrlUtils.URL_ABOUT_BLANK == getPage().getUrl() && browserVersion.hasFeature(JS_DOCUMENT_SETTING_DOMAIN_THROWS_FOR_ABOUT_BLANK)) { throw Context.reportRuntimeError("Illegal domain value, cannot set domain from \"" - + WebClient.URL_ABOUT_BLANK + "\" to: \"" + + UrlUtils.URL_ABOUT_BLANK + "\" to: \"" + newDomain + "\"."); } @@ -1709,7 +1709,7 @@ public Object getOncontextmenu() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnresize(final Object handler) { - setEventHandler("resize", handler); + setEventHandler(Event.TYPE_RESIZE, handler); } /** @@ -1718,7 +1718,7 @@ public void setOnresize(final Object handler) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Object getOnresize() { - return getEventHandler("resize"); + return getEventHandler(Event.TYPE_RESIZE); } /** @@ -2367,7 +2367,7 @@ public String getXmlVersion() { */ @JsxGetter public Function getOnabort() { - return getEventHandler("abort"); + return getEventHandler(Event.TYPE_ABORT); } /** @@ -2376,7 +2376,7 @@ public Function getOnabort() { */ @JsxSetter public void setOnabort(final Object onabort) { - setEventHandler("abort", onabort); + setEventHandler(Event.TYPE_ABORT, onabort); } /** @@ -2385,7 +2385,7 @@ public void setOnabort(final Object onabort) { */ @JsxGetter({CHROME, EDGE}) public Function getOnauxclick() { - return getEventHandler("auxclick"); + return getEventHandler(Event.TYPE_AUXCLICK); } /** @@ -2394,7 +2394,7 @@ public Function getOnauxclick() { */ @JsxSetter({CHROME, EDGE}) public void setOnauxclick(final Object onauxclick) { - setEventHandler("auxclick", onauxclick); + setEventHandler(Event.TYPE_AUXCLICK, onauxclick); } /** @@ -2403,7 +2403,7 @@ public void setOnauxclick(final Object onauxclick) { */ @JsxGetter({CHROME, EDGE}) public Function getOnbeforecopy() { - return getEventHandler("beforecopy"); + return getEventHandler(Event.TYPE_BEFORECOPY); } /** @@ -2412,7 +2412,7 @@ public Function getOnbeforecopy() { */ @JsxSetter({CHROME, EDGE}) public void setOnbeforecopy(final Object onbeforecopy) { - setEventHandler("beforecopy", onbeforecopy); + setEventHandler(Event.TYPE_BEFORECOPY, onbeforecopy); } /** @@ -2421,7 +2421,7 @@ public void setOnbeforecopy(final Object onbeforecopy) { */ @JsxGetter({CHROME, EDGE}) public Function getOnbeforecut() { - return getEventHandler("beforecut"); + return getEventHandler(Event.TYPE_BEFORECUT); } /** @@ -2430,7 +2430,7 @@ public Function getOnbeforecut() { */ @JsxSetter({CHROME, EDGE}) public void setOnbeforecut(final Object onbeforecut) { - setEventHandler("beforecut", onbeforecut); + setEventHandler(Event.TYPE_BEFORECUT, onbeforecut); } /** @@ -2439,7 +2439,7 @@ public void setOnbeforecut(final Object onbeforecut) { */ @JsxGetter({CHROME, EDGE}) public Function getOnbeforepaste() { - return getEventHandler("beforepaste"); + return getEventHandler(Event.TYPE_BEFOREPASTE); } /** @@ -2448,7 +2448,7 @@ public Function getOnbeforepaste() { */ @JsxSetter({CHROME, EDGE}) public void setOnbeforepaste(final Object onbeforepaste) { - setEventHandler("beforepaste", onbeforepaste); + setEventHandler(Event.TYPE_BEFOREPASTE, onbeforepaste); } /** @@ -2457,7 +2457,7 @@ public void setOnbeforepaste(final Object onbeforepaste) { */ @JsxGetter({CHROME, EDGE}) public Function getOncancel() { - return getEventHandler("cancel"); + return getEventHandler(Event.TYPE_CANCEL); } /** @@ -2466,7 +2466,7 @@ public Function getOncancel() { */ @JsxSetter({CHROME, EDGE}) public void setOncancel(final Object oncancel) { - setEventHandler("cancel", oncancel); + setEventHandler(Event.TYPE_CANCEL, oncancel); } /** @@ -2475,7 +2475,7 @@ public void setOncancel(final Object oncancel) { */ @JsxGetter public Function getOncanplay() { - return getEventHandler("canplay"); + return getEventHandler(Event.TYPE_CANPLAY); } /** @@ -2484,7 +2484,7 @@ public Function getOncanplay() { */ @JsxSetter public void setOncanplay(final Object oncanplay) { - setEventHandler("canplay", oncanplay); + setEventHandler(Event.TYPE_CANPLAY, oncanplay); } /** @@ -2493,7 +2493,7 @@ public void setOncanplay(final Object oncanplay) { */ @JsxGetter public Function getOncanplaythrough() { - return getEventHandler("canplaythrough"); + return getEventHandler(Event.TYPE_CANPLAYTHROUGH); } /** @@ -2502,7 +2502,7 @@ public Function getOncanplaythrough() { */ @JsxSetter public void setOncanplaythrough(final Object oncanplaythrough) { - setEventHandler("canplaythrough", oncanplaythrough); + setEventHandler(Event.TYPE_CANPLAYTHROUGH, oncanplaythrough); } /** @@ -2547,7 +2547,7 @@ public void setOnclose(final Object onclose) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOncopy() { - return getEventHandler("copy"); + return getEventHandler(Event.TYPE_COPY); } /** @@ -2556,7 +2556,7 @@ public Function getOncopy() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOncopy(final Object oncopy) { - setEventHandler("copy", oncopy); + setEventHandler(Event.TYPE_COPY, oncopy); } /** @@ -2565,7 +2565,7 @@ public void setOncopy(final Object oncopy) { */ @JsxGetter({CHROME, EDGE}) public Function getOncuechange() { - return getEventHandler("cuechange"); + return getEventHandler(Event.TYPE_CUECHANGE); } /** @@ -2574,7 +2574,7 @@ public Function getOncuechange() { */ @JsxSetter({CHROME, EDGE}) public void setOncuechange(final Object oncuechange) { - setEventHandler("cuechange", oncuechange); + setEventHandler(Event.TYPE_CUECHANGE, oncuechange); } /** @@ -2583,7 +2583,7 @@ public void setOncuechange(final Object oncuechange) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOncut() { - return getEventHandler("cut"); + return getEventHandler(Event.TYPE_CUT); } /** @@ -2592,7 +2592,7 @@ public Function getOncut() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOncut(final Object oncut) { - setEventHandler("cut", oncut); + setEventHandler(Event.TYPE_CUT, oncut); } /** @@ -2601,7 +2601,7 @@ public void setOncut(final Object oncut) { */ @JsxGetter public Function getOndrag() { - return getEventHandler("drag"); + return getEventHandler(Event.TYPE_DRAG); } /** @@ -2610,7 +2610,7 @@ public Function getOndrag() { */ @JsxSetter public void setOndrag(final Object ondrag) { - setEventHandler("drag", ondrag); + setEventHandler(Event.TYPE_DRAG, ondrag); } /** @@ -2619,7 +2619,7 @@ public void setOndrag(final Object ondrag) { */ @JsxGetter public Function getOndragend() { - return getEventHandler("dragend"); + return getEventHandler(Event.TYPE_DRAGEND); } /** @@ -2628,7 +2628,7 @@ public Function getOndragend() { */ @JsxSetter public void setOndragend(final Object ondragend) { - setEventHandler("dragend", ondragend); + setEventHandler(Event.TYPE_DRAGEND, ondragend); } /** @@ -2637,7 +2637,7 @@ public void setOndragend(final Object ondragend) { */ @JsxGetter public Function getOndragenter() { - return getEventHandler("dragenter"); + return getEventHandler(Event.TYPE_DRAGENTER); } /** @@ -2646,7 +2646,7 @@ public Function getOndragenter() { */ @JsxSetter public void setOndragenter(final Object ondragenter) { - setEventHandler("dragenter", ondragenter); + setEventHandler(Event.TYPE_DRAGENTER, ondragenter); } /** @@ -2655,7 +2655,7 @@ public void setOndragenter(final Object ondragenter) { */ @JsxGetter public Function getOndragleave() { - return getEventHandler("dragleave"); + return getEventHandler(Event.TYPE_DRAGLEAVE); } /** @@ -2664,7 +2664,7 @@ public Function getOndragleave() { */ @JsxSetter public void setOndragleave(final Object ondragleave) { - setEventHandler("dragleave", ondragleave); + setEventHandler(Event.TYPE_DRAGLEAVE, ondragleave); } /** @@ -2673,7 +2673,7 @@ public void setOndragleave(final Object ondragleave) { */ @JsxGetter public Function getOndragover() { - return getEventHandler("dragover"); + return getEventHandler(Event.TYPE_DRAGOVER); } /** @@ -2682,7 +2682,7 @@ public Function getOndragover() { */ @JsxSetter public void setOndragover(final Object ondragover) { - setEventHandler("dragover", ondragover); + setEventHandler(Event.TYPE_DRAGOVER, ondragover); } /** @@ -2691,7 +2691,7 @@ public void setOndragover(final Object ondragover) { */ @JsxGetter public Function getOndragstart() { - return getEventHandler("dragstart"); + return getEventHandler(Event.TYPE_DRAGSTART); } /** @@ -2700,7 +2700,7 @@ public Function getOndragstart() { */ @JsxSetter public void setOndragstart(final Object ondragstart) { - setEventHandler("dragstart", ondragstart); + setEventHandler(Event.TYPE_DRAGSTART, ondragstart); } /** @@ -2709,7 +2709,7 @@ public void setOndragstart(final Object ondragstart) { */ @JsxGetter public Function getOndrop() { - return getEventHandler("drop"); + return getEventHandler(Event.TYPE_DROP); } /** @@ -2718,7 +2718,7 @@ public Function getOndrop() { */ @JsxSetter public void setOndrop(final Object ondrop) { - setEventHandler("drop", ondrop); + setEventHandler(Event.TYPE_DROP, ondrop); } /** @@ -2727,7 +2727,7 @@ public void setOndrop(final Object ondrop) { */ @JsxGetter public Function getOndurationchange() { - return getEventHandler("durationchange"); + return getEventHandler(Event.TYPE_DURATIONCHANGE); } /** @@ -2736,7 +2736,7 @@ public Function getOndurationchange() { */ @JsxSetter public void setOndurationchange(final Object ondurationchange) { - setEventHandler("durationchange", ondurationchange); + setEventHandler(Event.TYPE_DURATIONCHANGE, ondurationchange); } /** @@ -2745,7 +2745,7 @@ public void setOndurationchange(final Object ondurationchange) { */ @JsxGetter public Function getOnemptied() { - return getEventHandler("emptied"); + return getEventHandler(Event.TYPE_EMPTIED); } /** @@ -2754,7 +2754,7 @@ public Function getOnemptied() { */ @JsxSetter public void setOnemptied(final Object onemptied) { - setEventHandler("emptied", onemptied); + setEventHandler(Event.TYPE_EMPTIED, onemptied); } /** @@ -2763,7 +2763,7 @@ public void setOnemptied(final Object onemptied) { */ @JsxGetter public Function getOnended() { - return getEventHandler("ended"); + return getEventHandler(Event.TYPE_ENDED); } /** @@ -2772,7 +2772,7 @@ public Function getOnended() { */ @JsxSetter public void setOnended(final Object onended) { - setEventHandler("ended", onended); + setEventHandler(Event.TYPE_ENDED, onended); } /** @@ -2781,7 +2781,7 @@ public void setOnended(final Object onended) { */ @JsxGetter({CHROME, EDGE}) public Function getOngotpointercapture() { - return getEventHandler("gotpointercapture"); + return getEventHandler(Event.TYPE_GOTPOINTERCAPTURE); } /** @@ -2790,7 +2790,7 @@ public Function getOngotpointercapture() { */ @JsxSetter({CHROME, EDGE}) public void setOngotpointercapture(final Object ongotpointercapture) { - setEventHandler("gotpointercapture", ongotpointercapture); + setEventHandler(Event.TYPE_GOTPOINTERCAPTURE, ongotpointercapture); } /** @@ -2799,7 +2799,7 @@ public void setOngotpointercapture(final Object ongotpointercapture) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOninvalid() { - return getEventHandler("invalid"); + return getEventHandler(Event.TYPE_INVALID); } /** @@ -2808,7 +2808,7 @@ public Function getOninvalid() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOninvalid(final Object oninvalid) { - setEventHandler("invalid", oninvalid); + setEventHandler(Event.TYPE_INVALID, oninvalid); } /** @@ -2835,7 +2835,7 @@ public void setOnload(final Object onload) { */ @JsxGetter public Function getOnloadeddata() { - return getEventHandler("loadeddata"); + return getEventHandler(Event.TYPE_LOADEDDATA); } /** @@ -2844,7 +2844,7 @@ public Function getOnloadeddata() { */ @JsxSetter public void setOnloadeddata(final Object onloadeddata) { - setEventHandler("loadeddata", onloadeddata); + setEventHandler(Event.TYPE_LOADEDDATA, onloadeddata); } /** @@ -2853,7 +2853,7 @@ public void setOnloadeddata(final Object onloadeddata) { */ @JsxGetter public Function getOnloadedmetadata() { - return getEventHandler("loadedmetadata"); + return getEventHandler(Event.TYPE_LOADEDMETADATA); } /** @@ -2862,7 +2862,7 @@ public Function getOnloadedmetadata() { */ @JsxSetter public void setOnloadedmetadata(final Object onloadedmetadata) { - setEventHandler("loadedmetadata", onloadedmetadata); + setEventHandler(Event.TYPE_LOADEDMETADATA, onloadedmetadata); } /** @@ -2871,7 +2871,7 @@ public void setOnloadedmetadata(final Object onloadedmetadata) { */ @JsxGetter public Function getOnloadstart() { - return getEventHandler("loadstart"); + return getEventHandler(Event.TYPE_LOAD_START); } /** @@ -2880,7 +2880,7 @@ public Function getOnloadstart() { */ @JsxSetter public void setOnloadstart(final Object onloadstart) { - setEventHandler("loadstart", onloadstart); + setEventHandler(Event.TYPE_LOAD_START, onloadstart); } /** @@ -2889,7 +2889,7 @@ public void setOnloadstart(final Object onloadstart) { */ @JsxGetter({CHROME, EDGE}) public Function getOnlostpointercapture() { - return getEventHandler("lostpointercapture"); + return getEventHandler(Event.TYPE_LOSTPOINTERCAPTURE); } /** @@ -2898,7 +2898,7 @@ public Function getOnlostpointercapture() { */ @JsxSetter({CHROME, EDGE}) public void setOnlostpointercapture(final Object onlostpointercapture) { - setEventHandler("lostpointercapture", onlostpointercapture); + setEventHandler(Event.TYPE_LOSTPOINTERCAPTURE, onlostpointercapture); } /** @@ -2907,7 +2907,7 @@ public void setOnlostpointercapture(final Object onlostpointercapture) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnmouseenter() { - return getEventHandler("mouseenter"); + return getEventHandler(Event.TYPE_MOUDEENTER); } /** @@ -2916,7 +2916,7 @@ public Function getOnmouseenter() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnmouseenter(final Object onmouseenter) { - setEventHandler("mouseenter", onmouseenter); + setEventHandler(Event.TYPE_MOUDEENTER, onmouseenter); } /** @@ -2925,7 +2925,7 @@ public void setOnmouseenter(final Object onmouseenter) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnmouseleave() { - return getEventHandler("mouseleave"); + return getEventHandler(Event.TYPE_MOUSELEAVE); } /** @@ -2934,7 +2934,7 @@ public Function getOnmouseleave() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnmouseleave(final Object onmouseleave) { - setEventHandler("mouseleave", onmouseleave); + setEventHandler(Event.TYPE_MOUSELEAVE, onmouseleave); } /** @@ -2943,7 +2943,7 @@ public void setOnmouseleave(final Object onmouseleave) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnmousewheel() { - return getEventHandler("mousewheel"); + return getEventHandler(Event.TYPE_MOUSEWHEEL); } /** @@ -2952,7 +2952,7 @@ public Function getOnmousewheel() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnmousewheel(final Object onmousewheel) { - setEventHandler("mousewheel", onmousewheel); + setEventHandler(Event.TYPE_MOUSEWHEEL, onmousewheel); } /** @@ -2961,7 +2961,7 @@ public void setOnmousewheel(final Object onmousewheel) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnpaste() { - return getEventHandler("paste"); + return getEventHandler(Event.TYPE_PASTE); } /** @@ -2970,7 +2970,7 @@ public Function getOnpaste() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnpaste(final Object onpaste) { - setEventHandler("paste", onpaste); + setEventHandler(Event.TYPE_PASTE, onpaste); } /** @@ -2979,7 +2979,7 @@ public void setOnpaste(final Object onpaste) { */ @JsxGetter public Function getOnpause() { - return getEventHandler("pause"); + return getEventHandler(Event.TYPE_PAUSE); } /** @@ -2988,7 +2988,7 @@ public Function getOnpause() { */ @JsxSetter public void setOnpause(final Object onpause) { - setEventHandler("pause", onpause); + setEventHandler(Event.TYPE_PAUSE, onpause); } /** @@ -2997,7 +2997,7 @@ public void setOnpause(final Object onpause) { */ @JsxGetter public Function getOnplay() { - return getEventHandler("play"); + return getEventHandler(Event.TYPE_PLAY); } /** @@ -3006,7 +3006,7 @@ public Function getOnplay() { */ @JsxSetter public void setOnplay(final Object onplay) { - setEventHandler("play", onplay); + setEventHandler(Event.TYPE_PLAY, onplay); } /** @@ -3015,7 +3015,7 @@ public void setOnplay(final Object onplay) { */ @JsxGetter public Function getOnplaying() { - return getEventHandler("playing"); + return getEventHandler(Event.TYPE_PLAYNG); } /** @@ -3024,7 +3024,7 @@ public Function getOnplaying() { */ @JsxSetter public void setOnplaying(final Object onplaying) { - setEventHandler("playing", onplaying); + setEventHandler(Event.TYPE_PLAYNG, onplaying); } /** @@ -3033,7 +3033,7 @@ public void setOnplaying(final Object onplaying) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointercancel() { - return getEventHandler("pointercancel"); + return getEventHandler(Event.TYPE_POINTERCANCEL); } /** @@ -3042,7 +3042,7 @@ public Function getOnpointercancel() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointercancel(final Object onpointercancel) { - setEventHandler("pointercancel", onpointercancel); + setEventHandler(Event.TYPE_POINTERCANCEL, onpointercancel); } /** @@ -3051,7 +3051,7 @@ public void setOnpointercancel(final Object onpointercancel) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointerdown() { - return getEventHandler("pointerdown"); + return getEventHandler(Event.TYPE_POINTERDOWN); } /** @@ -3060,7 +3060,7 @@ public Function getOnpointerdown() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointerdown(final Object onpointerdown) { - setEventHandler("pointerdown", onpointerdown); + setEventHandler(Event.TYPE_POINTERDOWN, onpointerdown); } /** @@ -3069,7 +3069,7 @@ public void setOnpointerdown(final Object onpointerdown) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointerenter() { - return getEventHandler("pointerenter"); + return getEventHandler(Event.TYPE_POINTERENTER); } /** @@ -3078,7 +3078,7 @@ public Function getOnpointerenter() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointerenter(final Object onpointerenter) { - setEventHandler("pointerenter", onpointerenter); + setEventHandler(Event.TYPE_POINTERENTER, onpointerenter); } /** @@ -3087,7 +3087,7 @@ public void setOnpointerenter(final Object onpointerenter) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointerleave() { - return getEventHandler("pointerleave"); + return getEventHandler(Event.TYPE_POINTERLEAVE); } /** @@ -3096,7 +3096,7 @@ public Function getOnpointerleave() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointerleave(final Object onpointerleave) { - setEventHandler("pointerleave", onpointerleave); + setEventHandler(Event.TYPE_POINTERLEAVE, onpointerleave); } /** @@ -3105,7 +3105,7 @@ public void setOnpointerleave(final Object onpointerleave) { */ @JsxGetter({CHROME, EDGE}) public Function getOnpointerlockchange() { - return getEventHandler("pointerlockchange"); + return getEventHandler(Event.TYPE_POINTERLOCKCHANGE); } /** @@ -3114,7 +3114,7 @@ public Function getOnpointerlockchange() { */ @JsxSetter({CHROME, EDGE}) public void setOnpointerlockchange(final Object onpointerlockchange) { - setEventHandler("pointerlockchange", onpointerlockchange); + setEventHandler(Event.TYPE_POINTERLOCKCHANGE, onpointerlockchange); } /** @@ -3123,7 +3123,7 @@ public void setOnpointerlockchange(final Object onpointerlockchange) { */ @JsxGetter({CHROME, EDGE}) public Function getOnpointerlockerror() { - return getEventHandler("pointerlockerror"); + return getEventHandler(Event.TYPE_POINTERLOCKERROR); } /** @@ -3132,7 +3132,7 @@ public Function getOnpointerlockerror() { */ @JsxSetter({CHROME, EDGE}) public void setOnpointerlockerror(final Object onpointerlockerror) { - setEventHandler("pointerlockerror", onpointerlockerror); + setEventHandler(Event.TYPE_POINTERLOCKERROR, onpointerlockerror); } /** @@ -3141,7 +3141,7 @@ public void setOnpointerlockerror(final Object onpointerlockerror) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointermove() { - return getEventHandler("pointermove"); + return getEventHandler(Event.TYPE_POINTERMOVE); } /** @@ -3150,7 +3150,7 @@ public Function getOnpointermove() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointermove(final Object onpointermove) { - setEventHandler("pointermove", onpointermove); + setEventHandler(Event.TYPE_POINTERMOVE, onpointermove); } /** @@ -3159,7 +3159,7 @@ public void setOnpointermove(final Object onpointermove) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointerout() { - return getEventHandler("pointerout"); + return getEventHandler(Event.TYPE_POINTEROUT); } /** @@ -3168,7 +3168,7 @@ public Function getOnpointerout() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointerout(final Object onpointerout) { - setEventHandler("pointerout", onpointerout); + setEventHandler(Event.TYPE_POINTEROUT, onpointerout); } /** @@ -3177,7 +3177,7 @@ public void setOnpointerout(final Object onpointerout) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointerover() { - return getEventHandler("pointerover"); + return getEventHandler(Event.TYPE_POINTEROVER); } /** @@ -3186,7 +3186,7 @@ public Function getOnpointerover() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointerover(final Object onpointerover) { - setEventHandler("pointerover", onpointerover); + setEventHandler(Event.TYPE_POINTEROVER, onpointerover); } /** @@ -3195,7 +3195,7 @@ public void setOnpointerover(final Object onpointerover) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnpointerup() { - return getEventHandler("pointerup"); + return getEventHandler(Event.TYPE_POINTERUP); } /** @@ -3204,7 +3204,7 @@ public Function getOnpointerup() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnpointerup(final Object onpointerup) { - setEventHandler("pointerup", onpointerup); + setEventHandler(Event.TYPE_POINTERUP, onpointerup); } /** @@ -3213,7 +3213,7 @@ public void setOnpointerup(final Object onpointerup) { */ @JsxGetter public Function getOnprogress() { - return getEventHandler("progress"); + return getEventHandler(Event.TYPE_PROGRESS); } /** @@ -3222,7 +3222,7 @@ public Function getOnprogress() { */ @JsxSetter public void setOnprogress(final Object onprogress) { - setEventHandler("progress", onprogress); + setEventHandler(Event.TYPE_PROGRESS, onprogress); } /** @@ -3231,7 +3231,7 @@ public void setOnprogress(final Object onprogress) { */ @JsxGetter public Function getOnratechange() { - return getEventHandler("ratechange"); + return getEventHandler(Event.TYPE_RATECHANGE); } /** @@ -3240,7 +3240,7 @@ public Function getOnratechange() { */ @JsxSetter public void setOnratechange(final Object onratechange) { - setEventHandler("ratechange", onratechange); + setEventHandler(Event.TYPE_RATECHANGE, onratechange); } /** @@ -3285,7 +3285,7 @@ public void setOnreset(final Object onreset) { */ @JsxGetter public Function getOnscroll() { - return getEventHandler("scroll"); + return getEventHandler(Event.TYPE_SCROLL); } /** @@ -3294,7 +3294,7 @@ public Function getOnscroll() { */ @JsxSetter public void setOnscroll(final Object onscroll) { - setEventHandler("scroll", onscroll); + setEventHandler(Event.TYPE_SCROLL, onscroll); } /** @@ -3303,7 +3303,7 @@ public void setOnscroll(final Object onscroll) { */ @JsxGetter({CHROME, EDGE}) public Function getOnsearch() { - return getEventHandler("search"); + return getEventHandler(Event.TYPE_SEARCH); } /** @@ -3312,7 +3312,7 @@ public Function getOnsearch() { */ @JsxSetter({CHROME, EDGE}) public void setOnsearch(final Object onsearch) { - setEventHandler("search", onsearch); + setEventHandler(Event.TYPE_SEARCH, onsearch); } /** @@ -3321,7 +3321,7 @@ public void setOnsearch(final Object onsearch) { */ @JsxGetter public Function getOnseeked() { - return getEventHandler("seeked"); + return getEventHandler(Event.TYPE_SEEKED); } /** @@ -3330,7 +3330,7 @@ public Function getOnseeked() { */ @JsxSetter public void setOnseeked(final Object onseeked) { - setEventHandler("seeked", onseeked); + setEventHandler(Event.TYPE_SEEKED, onseeked); } /** @@ -3339,7 +3339,7 @@ public void setOnseeked(final Object onseeked) { */ @JsxGetter public Function getOnseeking() { - return getEventHandler("seeking"); + return getEventHandler(Event.TYPE_SEEKING); } /** @@ -3348,7 +3348,7 @@ public Function getOnseeking() { */ @JsxSetter public void setOnseeking(final Object onseeking) { - setEventHandler("seeking", onseeking); + setEventHandler(Event.TYPE_SEEKING, onseeking); } /** @@ -3357,7 +3357,7 @@ public void setOnseeking(final Object onseeking) { */ @JsxGetter public Function getOnselect() { - return getEventHandler("select"); + return getEventHandler(Event.TYPE_SELECT); } /** @@ -3366,7 +3366,7 @@ public Function getOnselect() { */ @JsxSetter public void setOnselect(final Object onselect) { - setEventHandler("select", onselect); + setEventHandler(Event.TYPE_SELECT, onselect); } /** @@ -3375,7 +3375,7 @@ public void setOnselect(final Object onselect) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnselectionchange() { - return getEventHandler("selectionchange"); + return getEventHandler(Event.TYPE_SELECTIONCHANGE); } /** @@ -3384,7 +3384,7 @@ public Function getOnselectionchange() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnselectionchange(final Object onselectionchange) { - setEventHandler("selectionchange", onselectionchange); + setEventHandler(Event.TYPE_SELECTIONCHANGE, onselectionchange); } /** @@ -3393,7 +3393,7 @@ public void setOnselectionchange(final Object onselectionchange) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnselectstart() { - return getEventHandler("selectstart"); + return getEventHandler(Event.TYPE_SELECTSTART); } /** @@ -3402,25 +3402,25 @@ public Function getOnselectstart() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnselectstart(final Object onselectstart) { - setEventHandler("selectstart", onselectstart); + setEventHandler(Event.TYPE_SELECTSTART, onselectstart); } /** * Returns the {@code onshow} event handler for this element. * @return the {@code onshow} event handler for this element */ - @JsxGetter({FF, FF78}) + @JsxGetter(FF78) public Function getOnshow() { - return getEventHandler("show"); + return getEventHandler(Event.TYPE_SHOW); } /** * Sets the {@code onshow} event handler for this element. * @param onshow the {@code onshow} event handler for this element */ - @JsxSetter({FF, FF78}) + @JsxSetter(FF78) public void setOnshow(final Object onshow) { - setEventHandler("show", onshow); + setEventHandler(Event.TYPE_SHOW, onshow); } /** @@ -3429,7 +3429,7 @@ public void setOnshow(final Object onshow) { */ @JsxGetter public Function getOnstalled() { - return getEventHandler("stalled"); + return getEventHandler(Event.TYPE_STALLED); } /** @@ -3438,7 +3438,7 @@ public Function getOnstalled() { */ @JsxSetter public void setOnstalled(final Object onstalled) { - setEventHandler("stalled", onstalled); + setEventHandler(Event.TYPE_STALLED, onstalled); } /** @@ -3465,7 +3465,7 @@ public void setOnsubmit(final Object onsubmit) { */ @JsxGetter public Function getOnsuspend() { - return getEventHandler("suspend"); + return getEventHandler(Event.TYPE_SUSPEND); } /** @@ -3474,7 +3474,7 @@ public Function getOnsuspend() { */ @JsxSetter public void setOnsuspend(final Object onsuspend) { - setEventHandler("suspend", onsuspend); + setEventHandler(Event.TYPE_SUSPEND, onsuspend); } /** @@ -3483,7 +3483,7 @@ public void setOnsuspend(final Object onsuspend) { */ @JsxGetter public Function getOntimeupdate() { - return getEventHandler("timeupdate"); + return getEventHandler(Event.TYPE_TIMEUPDATE); } /** @@ -3492,7 +3492,7 @@ public Function getOntimeupdate() { */ @JsxSetter public void setOntimeupdate(final Object ontimeupdate) { - setEventHandler("timeupdate", ontimeupdate); + setEventHandler(Event.TYPE_TIMEUPDATE, ontimeupdate); } /** @@ -3501,7 +3501,7 @@ public void setOntimeupdate(final Object ontimeupdate) { */ @JsxGetter({CHROME, EDGE}) public Function getOntoggle() { - return getEventHandler("toggle"); + return getEventHandler(Event.TYPE_TOGGLE); } /** @@ -3510,7 +3510,7 @@ public Function getOntoggle() { */ @JsxSetter({CHROME, EDGE}) public void setOntoggle(final Object ontoggle) { - setEventHandler("toggle", ontoggle); + setEventHandler(Event.TYPE_TOGGLE, ontoggle); } /** @@ -3519,7 +3519,7 @@ public void setOntoggle(final Object ontoggle) { */ @JsxGetter public Function getOnvolumechange() { - return getEventHandler("volumechange"); + return getEventHandler(Event.TYPE_VOLUMECHANGE); } /** @@ -3528,7 +3528,7 @@ public Function getOnvolumechange() { */ @JsxSetter public void setOnvolumechange(final Object onvolumechange) { - setEventHandler("volumechange", onvolumechange); + setEventHandler(Event.TYPE_VOLUMECHANGE, onvolumechange); } /** @@ -3537,7 +3537,7 @@ public void setOnvolumechange(final Object onvolumechange) { */ @JsxGetter public Function getOnwaiting() { - return getEventHandler("waiting"); + return getEventHandler(Event.TYPE_WAITING); } /** @@ -3546,7 +3546,7 @@ public Function getOnwaiting() { */ @JsxSetter public void setOnwaiting(final Object onwaiting) { - setEventHandler("waiting", onwaiting); + setEventHandler(Event.TYPE_WAITING, onwaiting); } /** @@ -3555,7 +3555,7 @@ public void setOnwaiting(final Object onwaiting) { */ @JsxGetter({CHROME, EDGE}) public Function getOnwebkitfullscreenchange() { - return getEventHandler("webkitfullscreenchange"); + return getEventHandler(Event.TYPE_WEBKITFULLSCREENCHANGE); } /** @@ -3564,7 +3564,7 @@ public Function getOnwebkitfullscreenchange() { */ @JsxSetter({CHROME, EDGE}) public void setOnwebkitfullscreenchange(final Object onwebkitfullscreenchange) { - setEventHandler("webkitfullscreenchange", onwebkitfullscreenchange); + setEventHandler(Event.TYPE_WEBKITFULLSCREENCHANGE, onwebkitfullscreenchange); } /** @@ -3573,7 +3573,7 @@ public void setOnwebkitfullscreenchange(final Object onwebkitfullscreenchange) { */ @JsxGetter({CHROME, EDGE}) public Function getOnwebkitfullscreenerror() { - return getEventHandler("webkitfullscreenerror"); + return getEventHandler(Event.TYPE_WEBKITFULLSCREENERROR); } /** @@ -3582,7 +3582,7 @@ public Function getOnwebkitfullscreenerror() { */ @JsxSetter public void setOnwebkitfullscreenerror(final Object onwebkitfullscreenerror) { - setEventHandler("webkitfullscreenerror", onwebkitfullscreenerror); + setEventHandler(Event.TYPE_WEBKITFULLSCREENERROR, onwebkitfullscreenerror); } /** @@ -3591,7 +3591,7 @@ public void setOnwebkitfullscreenerror(final Object onwebkitfullscreenerror) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnwheel() { - return getEventHandler("wheel"); + return getEventHandler(Event.TYPE_WHEEL); } /** @@ -3600,7 +3600,7 @@ public Function getOnwheel() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnwheel(final Object onwheel) { - setEventHandler("wheel", onwheel); + setEventHandler(Event.TYPE_WHEEL, onwheel); } /** @@ -3609,7 +3609,7 @@ public void setOnwheel(final Object onwheel) { */ @JsxGetter({FF, FF78}) public Function getOnafterscriptexecute() { - return getEventHandler("afterscriptexecute"); + return getEventHandler(Event.TYPE_AFTERSCRIPTEXECUTE); } /** @@ -3618,7 +3618,7 @@ public Function getOnafterscriptexecute() { */ @JsxSetter({FF, FF78}) public void setOnafterscriptexecute(final Object onafterscriptexecute) { - setEventHandler("afterscriptexecute", onafterscriptexecute); + setEventHandler(Event.TYPE_AFTERSCRIPTEXECUTE, onafterscriptexecute); } /** @@ -3627,7 +3627,7 @@ public void setOnafterscriptexecute(final Object onafterscriptexecute) { */ @JsxGetter({FF, FF78}) public Function getOnbeforescriptexecute() { - return getEventHandler("beforescriptexecute"); + return getEventHandler(Event.TYPE_BEFORESCRIPTEXECUTE); } /** @@ -3636,7 +3636,7 @@ public Function getOnbeforescriptexecute() { */ @JsxSetter({FF, FF78}) public void setOnbeforescriptexecute(final Object onbeforescriptexecute) { - setEventHandler("beforescriptexecute", onbeforescriptexecute); + setEventHandler(Event.TYPE_BEFORESCRIPTEXECUTE, onbeforescriptexecute); } /** @@ -3645,7 +3645,7 @@ public void setOnbeforescriptexecute(final Object onbeforescriptexecute) { */ @JsxGetter({FF, FF78}) public Function getOnmozfullscreenchange() { - return getEventHandler("mozfullscreenchange"); + return getEventHandler(Event.TYPE_MOZFULLSCREENCHANGE); } /** @@ -3654,7 +3654,7 @@ public Function getOnmozfullscreenchange() { */ @JsxSetter({FF, FF78}) public void setOnmozfullscreenchange(final Object onmozfullscreenchange) { - setEventHandler("mozfullscreenchange", onmozfullscreenchange); + setEventHandler(Event.TYPE_MOZFULLSCREENCHANGE, onmozfullscreenchange); } /** @@ -3663,7 +3663,7 @@ public void setOnmozfullscreenchange(final Object onmozfullscreenchange) { */ @JsxGetter({FF, FF78}) public Function getOnmozfullscreenerror() { - return getEventHandler("mozfullscreenerror"); + return getEventHandler(Event.TYPE_MOZFULLSCREENERROR); } /** @@ -3672,7 +3672,7 @@ public Function getOnmozfullscreenerror() { */ @JsxSetter({FF, FF78}) public void setOnmozfullscreenerror(final Object onmozfullscreenerror) { - setEventHandler("mozfullscreenerror", onmozfullscreenerror); + setEventHandler(Event.TYPE_MOZFULLSCREENERROR, onmozfullscreenerror); } /** @@ -3681,7 +3681,7 @@ public void setOnmozfullscreenerror(final Object onmozfullscreenerror) { */ @JsxGetter(IE) public Function getOnhelp() { - return getEventHandler("help"); + return getEventHandler(Event.TYPE_HELP); } /** @@ -3690,7 +3690,7 @@ public Function getOnhelp() { */ @JsxSetter(IE) public void setOnhelp(final Object onhelp) { - setEventHandler("help", onhelp); + setEventHandler(Event.TYPE_HELP, onhelp); } /** @@ -3699,7 +3699,7 @@ public void setOnhelp(final Object onhelp) { */ @JsxGetter(IE) public Function getOnmscontentzoom() { - return getEventHandler("mscontentzoom"); + return getEventHandler(Event.TYPE_MSCONTENTZOOM); } /** @@ -3708,7 +3708,7 @@ public Function getOnmscontentzoom() { */ @JsxSetter(IE) public void setOnmscontentzoom(final Object onmscontentzoom) { - setEventHandler("mscontentzoom", onmscontentzoom); + setEventHandler(Event.TYPE_MSCONTENTZOOM, onmscontentzoom); } /** @@ -3717,7 +3717,7 @@ public void setOnmscontentzoom(final Object onmscontentzoom) { */ @JsxGetter(IE) public Function getOnmsfullscreenchange() { - return getEventHandler("msfullscreenchange"); + return getEventHandler(Event.TYPE_MSFULLSCREENCHANGE); } /** @@ -3726,7 +3726,7 @@ public Function getOnmsfullscreenchange() { */ @JsxSetter(IE) public void setOnmsfullscreenchange(final Object onmsfullscreenchange) { - setEventHandler("msfullscreenchange", onmsfullscreenchange); + setEventHandler(Event.TYPE_MSFULLSCREENCHANGE, onmsfullscreenchange); } /** @@ -3735,7 +3735,7 @@ public void setOnmsfullscreenchange(final Object onmsfullscreenchange) { */ @JsxGetter(IE) public Function getOnmsfullscreenerror() { - return getEventHandler("msfullscreenerror"); + return getEventHandler(Event.TYPE_MSFULLSCREENERROR); } /** @@ -3744,7 +3744,7 @@ public Function getOnmsfullscreenerror() { */ @JsxSetter(IE) public void setOnmsfullscreenerror(final Object onmsfullscreenerror) { - setEventHandler("msfullscreenerror", onmsfullscreenerror); + setEventHandler(Event.TYPE_MSFULLSCREENERROR, onmsfullscreenerror); } /** @@ -3753,7 +3753,7 @@ public void setOnmsfullscreenerror(final Object onmsfullscreenerror) { */ @JsxGetter(IE) public Function getOnmsgesturechange() { - return getEventHandler("msgesturechange"); + return getEventHandler(Event.TYPE_MSGESTURECHANGE); } /** @@ -3762,7 +3762,7 @@ public Function getOnmsgesturechange() { */ @JsxSetter(IE) public void setOnmsgesturechange(final Object onmsgesturechange) { - setEventHandler("msgesturechange", onmsgesturechange); + setEventHandler(Event.TYPE_MSGESTURECHANGE, onmsgesturechange); } /** @@ -3771,7 +3771,7 @@ public void setOnmsgesturechange(final Object onmsgesturechange) { */ @JsxGetter(IE) public Function getOnmsgesturedoubletap() { - return getEventHandler("msgesturedoubletap"); + return getEventHandler(Event.TYPE_MSGESTUREDOUBLETAP); } /** @@ -3780,7 +3780,7 @@ public Function getOnmsgesturedoubletap() { */ @JsxSetter(IE) public void setOnmsgesturedoubletap(final Object onmsgesturedoubletap) { - setEventHandler("msgesturedoubletap", onmsgesturedoubletap); + setEventHandler(Event.TYPE_MSGESTUREDOUBLETAP, onmsgesturedoubletap); } /** @@ -3789,7 +3789,7 @@ public void setOnmsgesturedoubletap(final Object onmsgesturedoubletap) { */ @JsxGetter(IE) public Function getOnmsgestureend() { - return getEventHandler("msgestureend"); + return getEventHandler(Event.TYPE_MSGESTUREEND); } /** @@ -3798,7 +3798,7 @@ public Function getOnmsgestureend() { */ @JsxSetter(IE) public void setOnmsgestureend(final Object onmsgestureend) { - setEventHandler("msgestureend", onmsgestureend); + setEventHandler(Event.TYPE_MSGESTUREEND, onmsgestureend); } /** @@ -3807,7 +3807,7 @@ public void setOnmsgestureend(final Object onmsgestureend) { */ @JsxGetter(IE) public Function getOnmsgesturehold() { - return getEventHandler("msgesturehold"); + return getEventHandler(Event.TYPE_MSGESTUREHOLD); } /** @@ -3816,7 +3816,7 @@ public Function getOnmsgesturehold() { */ @JsxSetter(IE) public void setOnmsgesturehold(final Object onmsgesturehold) { - setEventHandler("msgesturehold", onmsgesturehold); + setEventHandler(Event.TYPE_MSGESTUREHOLD, onmsgesturehold); } /** @@ -3825,7 +3825,7 @@ public void setOnmsgesturehold(final Object onmsgesturehold) { */ @JsxGetter(IE) public Function getOnmsgesturestart() { - return getEventHandler("msgesturestart"); + return getEventHandler(Event.TYPE_MSGESTURESTART); } /** @@ -3834,7 +3834,7 @@ public Function getOnmsgesturestart() { */ @JsxSetter(IE) public void setOnmsgesturestart(final Object onmsgesturestart) { - setEventHandler("msgesturestart", onmsgesturestart); + setEventHandler(Event.TYPE_MSGESTURESTART, onmsgesturestart); } /** @@ -3843,7 +3843,7 @@ public void setOnmsgesturestart(final Object onmsgesturestart) { */ @JsxGetter(IE) public Function getOnmsgesturetap() { - return getEventHandler("msgesturetap"); + return getEventHandler(Event.TYPE_MSGESTURETAP); } /** @@ -3852,7 +3852,7 @@ public Function getOnmsgesturetap() { */ @JsxSetter(IE) public void setOnmsgesturetap(final Object onmsgesturetap) { - setEventHandler("msgesturetap", onmsgesturetap); + setEventHandler(Event.TYPE_MSGESTURETAP, onmsgesturetap); } /** @@ -3861,7 +3861,7 @@ public void setOnmsgesturetap(final Object onmsgesturetap) { */ @JsxGetter(IE) public Function getOnmsinertiastart() { - return getEventHandler("msinertiastart"); + return getEventHandler(Event.TYPE_MSINERTIASTART); } /** @@ -3870,7 +3870,7 @@ public Function getOnmsinertiastart() { */ @JsxSetter(IE) public void setOnmsinertiastart(final Object onmsinertiastart) { - setEventHandler("msinertiastart", onmsinertiastart); + setEventHandler(Event.TYPE_MSINERTIASTART, onmsinertiastart); } /** @@ -3879,7 +3879,7 @@ public void setOnmsinertiastart(final Object onmsinertiastart) { */ @JsxGetter(IE) public Function getOnmsmanipulationstatechanged() { - return getEventHandler("msmanipulationstatechanged"); + return getEventHandler(Event.TYPE_MSMANIPULATIONSTATECHANGED); } /** @@ -3888,7 +3888,7 @@ public Function getOnmsmanipulationstatechanged() { */ @JsxSetter(IE) public void setOnmsmanipulationstatechanged(final Object onmsmanipulationstatechanged) { - setEventHandler("msmanipulationstatechanged", onmsmanipulationstatechanged); + setEventHandler(Event.TYPE_MSMANIPULATIONSTATECHANGED, onmsmanipulationstatechanged); } /** @@ -3897,7 +3897,7 @@ public void setOnmsmanipulationstatechanged(final Object onmsmanipulationstatech */ @JsxGetter(IE) public Function getOnmspointercancel() { - return getEventHandler("mspointercancel"); + return getEventHandler(Event.TYPE_MSPOINTERCANCEL); } /** @@ -3906,7 +3906,7 @@ public Function getOnmspointercancel() { */ @JsxSetter(IE) public void setOnmspointercancel(final Object onmspointercancel) { - setEventHandler("mspointercancel", onmspointercancel); + setEventHandler(Event.TYPE_MSPOINTERCANCEL, onmspointercancel); } /** @@ -3915,7 +3915,7 @@ public void setOnmspointercancel(final Object onmspointercancel) { */ @JsxGetter(IE) public Function getOnmspointerdown() { - return getEventHandler("mspointerdown"); + return getEventHandler(Event.TYPE_MSPOINTERDOWN); } /** @@ -3924,7 +3924,7 @@ public Function getOnmspointerdown() { */ @JsxSetter(IE) public void setOnmspointerdown(final Object onmspointerdown) { - setEventHandler("mspointerdown", onmspointerdown); + setEventHandler(Event.TYPE_MSPOINTERDOWN, onmspointerdown); } /** @@ -3933,7 +3933,7 @@ public void setOnmspointerdown(final Object onmspointerdown) { */ @JsxGetter(IE) public Function getOnmspointerenter() { - return getEventHandler("mspointerenter"); + return getEventHandler(Event.TYPE_MSPOINTENTER); } /** @@ -3942,7 +3942,7 @@ public Function getOnmspointerenter() { */ @JsxSetter(IE) public void setOnmspointerenter(final Object onmspointerenter) { - setEventHandler("mspointerenter", onmspointerenter); + setEventHandler(Event.TYPE_MSPOINTENTER, onmspointerenter); } /** @@ -3951,7 +3951,7 @@ public void setOnmspointerenter(final Object onmspointerenter) { */ @JsxGetter(IE) public Function getOnmspointerleave() { - return getEventHandler("mspointerleave"); + return getEventHandler(Event.TYPE_MSPOINTERLEAVE); } /** @@ -3960,7 +3960,7 @@ public Function getOnmspointerleave() { */ @JsxSetter(IE) public void setOnmspointerleave(final Object onmspointerleave) { - setEventHandler("mspointerleave", onmspointerleave); + setEventHandler(Event.TYPE_MSPOINTERLEAVE, onmspointerleave); } /** @@ -3969,7 +3969,7 @@ public void setOnmspointerleave(final Object onmspointerleave) { */ @JsxGetter(IE) public Function getOnmspointermove() { - return getEventHandler("mspointermove"); + return getEventHandler(Event.TYPE_MSPOINTERMOVE); } /** @@ -3978,7 +3978,7 @@ public Function getOnmspointermove() { */ @JsxSetter(IE) public void setOnmspointermove(final Object onmspointermove) { - setEventHandler("mspointermove", onmspointermove); + setEventHandler(Event.TYPE_MSPOINTERMOVE, onmspointermove); } /** @@ -3987,7 +3987,7 @@ public void setOnmspointermove(final Object onmspointermove) { */ @JsxGetter(IE) public Function getOnmspointerout() { - return getEventHandler("mspointerout"); + return getEventHandler(Event.TYPE_MSPOINTEROUT); } /** @@ -3996,7 +3996,7 @@ public Function getOnmspointerout() { */ @JsxSetter(IE) public void setOnmspointerout(final Object onmspointerout) { - setEventHandler("mspointerout", onmspointerout); + setEventHandler(Event.TYPE_MSPOINTEROUT, onmspointerout); } /** @@ -4005,7 +4005,7 @@ public void setOnmspointerout(final Object onmspointerout) { */ @JsxGetter(IE) public Function getOnmspointerover() { - return getEventHandler("mspointerover"); + return getEventHandler(Event.TYPE_MSPOINTEROVER); } /** @@ -4014,7 +4014,7 @@ public Function getOnmspointerover() { */ @JsxSetter(IE) public void setOnmspointerover(final Object onmspointerover) { - setEventHandler("mspointerover", onmspointerover); + setEventHandler(Event.TYPE_MSPOINTEROVER, onmspointerover); } /** @@ -4023,7 +4023,7 @@ public void setOnmspointerover(final Object onmspointerover) { */ @JsxGetter(IE) public Function getOnmspointerup() { - return getEventHandler("mspointerup"); + return getEventHandler(Event.TYPE_MSPOINTERUP); } /** @@ -4032,7 +4032,7 @@ public Function getOnmspointerup() { */ @JsxSetter(IE) public void setOnmspointerup(final Object onmspointerup) { - setEventHandler("mspointerup", onmspointerup); + setEventHandler(Event.TYPE_MSPOINTERUP, onmspointerup); } /** @@ -4041,7 +4041,7 @@ public void setOnmspointerup(final Object onmspointerup) { */ @JsxGetter(IE) public Function getOnmssitemodejumplistitemremoved() { - return getEventHandler("mssitemodejumplistitemremoved"); + return getEventHandler(Event.TYPE_MSSITEMODEJUMPLISTITEMREMOVED); } /** @@ -4050,7 +4050,7 @@ public Function getOnmssitemodejumplistitemremoved() { */ @JsxSetter(IE) public void setOnmssitemodejumplistitemremoved(final Object onmssitemodejumplistitemremoved) { - setEventHandler("mssitemodejumplistitemremoved", onmssitemodejumplistitemremoved); + setEventHandler(Event.TYPE_MSSITEMODEJUMPLISTITEMREMOVED, onmssitemodejumplistitemremoved); } /** @@ -4059,7 +4059,7 @@ public void setOnmssitemodejumplistitemremoved(final Object onmssitemodejumplist */ @JsxGetter(IE) public Function getOnmsthumbnailclick() { - return getEventHandler("msthumbnailclick"); + return getEventHandler(Event.TYPE_MSTHUMBNAILCLICK); } /** @@ -4068,7 +4068,7 @@ public Function getOnmsthumbnailclick() { */ @JsxSetter(IE) public void setOnmsthumbnailclick(final Object onmsthumbnailclick) { - setEventHandler("msthumbnailclick", onmsthumbnailclick); + setEventHandler(Event.TYPE_MSTHUMBNAILCLICK, onmsthumbnailclick); } /** @@ -4077,7 +4077,7 @@ public void setOnmsthumbnailclick(final Object onmsthumbnailclick) { */ @JsxGetter(IE) public Function getOnstop() { - return getEventHandler("stop"); + return getEventHandler(Event.TYPE_STOP); } /** @@ -4086,7 +4086,7 @@ public Function getOnstop() { */ @JsxSetter(IE) public void setOnstop(final Object onstop) { - setEventHandler("stop", onstop); + setEventHandler(Event.TYPE_STOP, onstop); } /** @@ -4095,7 +4095,7 @@ public void setOnstop(final Object onstop) { */ @JsxGetter(IE) public Function getOnstoragecommit() { - return getEventHandler("storagecommit"); + return getEventHandler(Event.TYPE_STORAGECOMMIT); } /** @@ -4104,7 +4104,7 @@ public Function getOnstoragecommit() { */ @JsxSetter(IE) public void setOnstoragecommit(final Object onstoragecommit) { - setEventHandler("storagecommit", onstoragecommit); + setEventHandler(Event.TYPE_STORAGECOMMIT, onstoragecommit); } /** @@ -4113,7 +4113,7 @@ public void setOnstoragecommit(final Object onstoragecommit) { */ @JsxGetter(IE) public Function getOnactivate() { - return getEventHandler("activate"); + return getEventHandler(Event.TYPE_ACTIVATE); } /** @@ -4122,7 +4122,7 @@ public Function getOnactivate() { */ @JsxSetter(IE) public void setOnactivate(final Object onactivate) { - setEventHandler("activate", onactivate); + setEventHandler(Event.TYPE_ACTIVATE, onactivate); } /** @@ -4131,7 +4131,7 @@ public void setOnactivate(final Object onactivate) { */ @JsxGetter(IE) public Function getOnbeforeactivate() { - return getEventHandler("beforeactivate"); + return getEventHandler(Event.TYPE_BEFOREACTIVATE); } /** @@ -4140,7 +4140,7 @@ public Function getOnbeforeactivate() { */ @JsxSetter(IE) public void setOnbeforeactivate(final Object onbeforeactivate) { - setEventHandler("beforeactivate", onbeforeactivate); + setEventHandler(Event.TYPE_BEFOREACTIVATE, onbeforeactivate); } /** @@ -4149,7 +4149,7 @@ public void setOnbeforeactivate(final Object onbeforeactivate) { */ @JsxGetter(IE) public Function getOnbeforedeactivate() { - return getEventHandler("beforedeactivate"); + return getEventHandler(Event.TYPE_BEFOREDEACTIVATE); } /** @@ -4158,7 +4158,7 @@ public Function getOnbeforedeactivate() { */ @JsxSetter(IE) public void setOnbeforedeactivate(final Object onbeforedeactivate) { - setEventHandler("beforedeactivate", onbeforedeactivate); + setEventHandler(Event.TYPE_BEFOREDEACTIVATE, onbeforedeactivate); } /** @@ -4167,7 +4167,7 @@ public void setOnbeforedeactivate(final Object onbeforedeactivate) { */ @JsxGetter(IE) public Function getOndeactivate() { - return getEventHandler("deactivate"); + return getEventHandler(Event.TYPE_DEACTIVATE); } /** @@ -4176,7 +4176,7 @@ public Function getOndeactivate() { */ @JsxSetter(IE) public void setOndeactivate(final Object ondeactivate) { - setEventHandler("deactivate", ondeactivate); + setEventHandler(Event.TYPE_DEACTIVATE, ondeactivate); } /** @@ -4239,7 +4239,7 @@ public Object getParentWindow() { @Override protected boolean isReadOnlySettable(final String name, final Object value) { if ("body".equals(name)) { - throw ScriptRuntime.typeError3("msg.set.prop.no.setter", name, getClassName(), Context.toString(value)); + throw ScriptRuntime.typeErrorById("msg.set.prop.no.setter", name, getClassName(), Context.toString(value)); } return super.isReadOnlySettable(name, value); } @@ -4296,4 +4296,13 @@ public Object createCDATASection(final String data) { public void clear() { // nothing } + + /** + * {@inheritDoc} + */ + @JsxFunction({CHROME, EDGE, FF, FF78}) + @Override + public boolean contains(final Object element) { + return getDocumentElement().contains(element); + } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DocumentFragment.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DocumentFragment.java index 0aeec01f6..d132b79ab 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DocumentFragment.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DocumentFragment.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DocumentType.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DocumentType.java index 862d704b2..93ed899a9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DocumentType.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DocumentType.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/IdleDeadline.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/IdleDeadline.java index 06381b790..677479745 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/IdleDeadline.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/IdleDeadline.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MediaList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MediaList.java index 33ca5d3c5..764322d2c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MediaList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MediaList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationObserver.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationObserver.java index d2229a799..005b8d0cb 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationObserver.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationObserver.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -153,7 +153,7 @@ public void characterDataChanged(final CharacterDataChangeEvent event) { final HtmlPage owningPage = (HtmlPage) window.getDocument().getPage(); final JavaScriptEngine jsEngine = (JavaScriptEngine) window.getWebWindow().getWebClient().getJavaScriptEngine(); - jsEngine.addPostponedAction(new PostponedAction(owningPage) { + jsEngine.addPostponedAction(new PostponedAction(owningPage, "MutationObserver.characterDataChanged") { @Override public void execute() throws Exception { final NativeArray array = new NativeArray(new Object[] {mutationRecord}); @@ -203,7 +203,7 @@ public void attributeReplaced(final HtmlAttributeChangeEvent event) { final HtmlPage owningPage = (HtmlPage) window.getDocument().getPage(); final JavaScriptEngine jsEngine = (JavaScriptEngine) window.getWebWindow().getWebClient().getJavaScriptEngine(); - jsEngine.addPostponedAction(new PostponedAction(owningPage) { + jsEngine.addPostponedAction(new PostponedAction(owningPage, "MutationObserver.attributeReplaced") { @Override public void execute() throws Exception { final NativeArray array = new NativeArray(new Object[] {mutationRecord}); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationRecord.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationRecord.java index 3b348f20f..2f288a369 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationRecord.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationRecord.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Node.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Node.java index 92113bf7a..2ea997a1b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Node.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Node.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -674,6 +674,10 @@ public Object getAttributes() { */ @JsxFunction({CHROME, EDGE, FF, FF78}) public boolean contains(final Object element) { + if (element == null || Undefined.isUndefined(element)) { + return false; + } + if (!(element instanceof Node)) { if (getBrowserVersion().hasFeature(JS_NODE_CONTAINS_RETURNS_FALSE_FOR_INVALID_ARG)) { return false; diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeFilter.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeFilter.java index 3f1a5d04f..9e25b85e0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeFilter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeFilter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeIterator.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeIterator.java index ffc574a5a..da6706af0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeIterator.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeIterator.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeList.java index a6481003e..f378c46ab 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/ProcessingInstruction.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/ProcessingInstruction.java index f57f9a92b..81a094554 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/ProcessingInstruction.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/ProcessingInstruction.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/RadioNodeList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/RadioNodeList.java index 1f1bb04fa..9e59dfb9f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/RadioNodeList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/RadioNodeList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Range.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Range.java index 92aef31fc..448685d9e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Range.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Range.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -473,9 +473,8 @@ public void detach() { * Returns the text of the Range. * @return the text */ - @Override - @JsxFunction - public String toString() { + @JsxFunction(functionName = "toString") + public String jsToString() { return toW3C().toString(); } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Selection.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Selection.java index 1275ab5ca..1b5fafec9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Selection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Selection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -59,17 +59,26 @@ public class Selection extends SimpleScriptable { public Selection() { } + /** + * @return a string currently being represented by the selection object, + * i.e. the currently selected text. + */ + @JsxFunction(functionName = "toString") + public String jsToString() { + final StringBuilder sb = new StringBuilder(); + for (final Range r : getRanges()) { + sb.append(r.toString()); + } + return sb.toString(); + } + /** * {@inheritDoc} */ @Override public Object getDefaultValue(final Class hint) { if (getPrototype() != null && (String.class.equals(hint) || hint == null)) { - final StringBuilder sb = new StringBuilder(); - for (final Range r : getRanges()) { - sb.append(r.toString()); - } - return sb.toString(); + return jsToString(); } return super.getDefaultValue(hint); } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/ShadowRoot.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/ShadowRoot.java index 323b7a591..5733e7a03 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/ShadowRoot.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/ShadowRoot.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Text.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Text.java index 807303801..851ab8863 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Text.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Text.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,17 +18,12 @@ import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF78; -import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.IE; -import com.gargoylesoftware.htmlunit.html.DomNode; import com.gargoylesoftware.htmlunit.html.DomText; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxFunction; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter; -import com.gargoylesoftware.htmlunit.xml.XmlPage; - -import net.sourceforge.htmlunit.corejs.javascript.Undefined; /** * A JavaScript object for {@code Text}. @@ -69,17 +64,4 @@ public Object splitText(final int offset) { public String getWholeText() { return ((DomText) getDomNodeOrDie()).getWholeText(); } - - /** - * Returns the value of the node. - * @return the value of the node - */ - @JsxGetter(IE) - public Object getText() { - final DomNode node = getDomNodeOrDie(); - if (node.getPage() instanceof XmlPage) { - return ((DomText) node).getWholeText(); - } - return Undefined.instance; - } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TextRange.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TextRange.java index 0f63b0a72..579ed5a9b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TextRange.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TextRange.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TreeWalker.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TreeWalker.java index 2e8ffdc5c..1a560fb3a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TreeWalker.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TreeWalker.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/WebKitMutationObserver.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/WebKitMutationObserver.java index 872a94433..e43656197 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/WebKitMutationObserver.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/WebKitMutationObserver.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathEvaluator.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathEvaluator.java index 064e10683..1aab16c7d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathEvaluator.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathEvaluator.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathNSResolver.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathNSResolver.java index 5babe4a38..e7f85b39e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathNSResolver.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathNSResolver.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathResult.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathResult.java index 6d4b397d5..92d3834a6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathResult.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathResult.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/package-info.java index 58ba44be9..e46fdc7e1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/AudioProcessingEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/AudioProcessingEvent.java index 4632925e1..cbd503430 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/AudioProcessingEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/AudioProcessingEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeInstallPromptEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeInstallPromptEvent.java index 917b93506..e44bc190b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeInstallPromptEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeInstallPromptEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeUnloadEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeUnloadEvent.java index f59e8298a..2f19caccf 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeUnloadEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeUnloadEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/BlobEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/BlobEvent.java index 66fd35914..496cace96 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/BlobEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/BlobEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/ClipboardEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/ClipboardEvent.java index 64d62b570..2377966ab 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/ClipboardEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/ClipboardEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/CloseEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/CloseEvent.java index 146ff3933..448452b59 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/CloseEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/CloseEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/CompositionEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/CompositionEvent.java index e9aa59ad3..b8d2c7913 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/CompositionEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/CompositionEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/CustomEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/CustomEvent.java index c7015bf32..3f2992fe1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/CustomEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/CustomEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceMotionEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceMotionEvent.java index 8277f9920..75ce21b40 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceMotionEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceMotionEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceOrientationEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceOrientationEvent.java index 33db36218..472a2d4cc 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceOrientationEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceOrientationEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/DragEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/DragEvent.java index d2b95f4ca..9fbc9b749 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/DragEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/DragEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/ErrorEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/ErrorEvent.java index a027633cd..c8624819e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/ErrorEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/ErrorEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event.java index 14bfdb384..cb714d6e5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -152,6 +152,383 @@ public class Event extends SimpleScriptable { /** The timeout event type, triggered by {@code ontimeout} event handlers. */ public static final String TYPE_TIMEOUT = "timeout"; + /** The scroll event type, triggered by {@code onscroll} event handlers. */ + public static final String TYPE_SCROLL = "scroll"; + + /** The search event type, triggered by {@code onsearch} event handlers. */ + public static final String TYPE_SEARCH = "search"; + + /** The dragend event type, triggered by {@code dragend} event handlers. */ + public static final String TYPE_DRAGEND = "dragend"; + + /** The invalid event type, triggered by {@code invalid} event handlers. */ + public static final String TYPE_INVALID = "invalid"; + + /** The pointerout event type, triggered by {@code pointerout} event handlers. */ + public static final String TYPE_POINTEROUT = "pointerout"; + + /** The help event type, triggered by {@code help} event handlers. */ + public static final String TYPE_HELP = "help"; + + /** The ratechange event type, triggered by {@code ratechange} event handlers. */ + public static final String TYPE_RATECHANGE = "ratechange"; + + /** The animationiteration event type, triggered by {@code animationiteration} event handlers. */ + public static final String TYPE_ANIMATIONITERATION = "animationiteration"; + + /** The canplaythrough event type, triggered by {@code canplaythrough} event handlers. */ + public static final String TYPE_CANPLAYTHROUGH = "canplaythrough"; + + /** The cancel event type, triggered by {@code cancel} event handlers. */ + public static final String TYPE_CANCEL = "cancel"; + + /** The pointerenter event type, triggered by {@code pointerenter} event handlers. */ + public static final String TYPE_POINTERENTER = "pointerenter"; + + /** The select event type, triggered by {@code select} event handlers. */ + public static final String TYPE_SELECT = "select"; + + /** The auxclick event type, triggered by {@code auxclick} event handlers. */ + public static final String TYPE_AUXCLICK = "auxclick"; + + /** The mspointerleave event type, triggered by {@code mspointerleave} event handlers. */ + public static final String TYPE_MSPOINTERLEAVE = "mspointerleave"; + + /** The webkitanimationstart event type, triggered by {@code webkitanimationstart} event handlers. */ + public static final String TYPE_WEBANIMATIONSTART = "webkitanimationstart"; + + /** The msgesturestart event type, triggered by {@code msgesturestart} event handlers. */ + public static final String TYPE_MSGESTURESTART = "msgesturestart"; + + /** The deviceproximity event type, triggered by {@code deviceproximity} event handlers. */ + public static final String TYPE_DEVICEPROXIMITY = "deviceproximity"; + + /** The drag event type, triggered by {@code drag} event handlers. */ + public static final String TYPE_DRAG = "drag"; + + /** The seeked event type, triggered by {@code seeked} event handlers. */ + public static final String TYPE_SEEKED = "seeked"; + + /** The offline event type, triggered by {@code offline} event handlers. */ + public static final String TYPE_OFFLINE = "offline"; + + /** The deviceorientation event type, triggered by {@code deviceorientation} event handlers. */ + public static final String TYPE_DEVICEORIENTATION = "deviceorientation"; + + /** The toggle event type, triggered by {@code toggle} event handlers. */ + public static final String TYPE_TOGGLE = "toggle"; + + /** The play event type, triggered by {@code play} event handlers. */ + public static final String TYPE_PLAY = "play"; + + /** The mspointerover event type, triggered by {@code mspointerover} event handlers. */ + public static final String TYPE_MSPOINTEROVER = "mspointerover"; + + /** The mspointerup event type, triggered by {@code mspointerup} event handlers. */ + public static final String TYPE_MSPOINTERUP = "mspointerup"; + + /** The loadedmetadata event type, triggered by {@code loadedmetadata} event handlers. */ + public static final String TYPE_LOADEDMETADATA = "loadedmetadata"; + + /** The msinertiastart event type, triggered by {@code msinertiastart} event handlers. */ + public static final String TYPE_MSINERTIASTART = "msinertiastart"; + + /** The pointermove event type, triggered by {@code pointermove} event handlers. */ + public static final String TYPE_POINTERMOVE = "pointermove"; + + /** The mspointermove event type, triggered by {@code mspointermove} event handlers. */ + public static final String TYPE_MSPOINTERMOVE = "mspointermove"; + + /** The userproximity event type, triggered by {@code userproximity} event handlers. */ + public static final String TYPE_USERPROXIMITY = "userproximity"; + + /** The lostpointercapture event type, triggered by {@code lostpointercapture} event handlers. */ + public static final String TYPE_LOSTPOINTERCAPTURE = "lostpointercapture"; + + /** The pointerover event type, triggered by {@code pointerover} event handlers. */ + public static final String TYPE_POINTEROVER = "pointerover"; + + /** The animationcancel event type, triggered by {@code animationcancel} event handlers. */ + public static final String TYPE_ANIMATIONCANCEL = "animationcancel"; + + /** The animationend event type, triggered by {@code animationend} event handlers. */ + public static final String TYPE_ANIMATIONEND = "animationend"; + + /** The dragenter event type, triggered by {@code dragenter} event handlers. */ + public static final String TYPE_DRAGENTER = "dragenter"; + + /** The afterprint event type, triggered by {@code afterprint} event handlers. */ + public static final String TYPE_AFTERPRINT = "afterprint"; + + /** The mozfullscreenerror event type, triggered by {@code mozfullscreenerror} event handlers. */ + public static final String TYPE_MOZFULLSCREENERROR = "mozfullscreenerror"; + + /** The mouseleave event type, triggered by {@code mouseleave} event handlers. */ + public static final String TYPE_MOUSELEAVE = "mouseleave"; + + /** The mousewheel event type, triggered by {@code mousewheel} event handlers. */ + public static final String TYPE_MOUSEWHEEL = "mousewheel"; + + /** The seeking event type, triggered by {@code seeking} event handlers. */ + public static final String TYPE_SEEKING = "seeking"; + + /** The cuechange event type, triggered by {@code cuechange} event handlers. */ + public static final String TYPE_CUECHANGE = "cuechange"; + + /** The pageshow event type, triggered by {@code pageshow} event handlers. */ + public static final String TYPE_PAGESHOW = "pageshow"; + + /** The mspointerenter event type, triggered by {@code mspointerenter} event handlers. */ + public static final String TYPE_MSPOINTENTER = "mspointerenter"; + + /** The mozfullscreenchange event type, triggered by {@code mozfullscreenchange} event handlers. */ + public static final String TYPE_MOZFULLSCREENCHANGE = "mozfullscreenchange"; + + /** The durationchange event type, triggered by {@code durationchange} event handlers. */ + public static final String TYPE_DURATIONCHANGE = "durationchange"; + + /** The playing event type, triggered by {@code playing} event handlers. */ + public static final String TYPE_PLAYNG = "playing"; + + /** The ended event type, triggered by {@code ended} event handlers. */ + public static final String TYPE_ENDED = "ended"; + + /** The loadeddata event type, triggered by {@code loadeddata} event handlers. */ + public static final String TYPE_LOADEDDATA = "loadeddata"; + + /** The unhandledrejection event type, triggered by {@code unhandledrejection} event handlers. */ + public static final String TYPE_UNHANDLEDREJECTION = "unhandledrejection"; + + /** The suspend event type, triggered by {@code suspend} event handlers. */ + public static final String TYPE_SUSPEND = "suspend"; + + /** The waiting event type, triggered by {@code waiting} event handlers. */ + public static final String TYPE_WAITING = "waiting"; + + /** The canplay event type, triggered by {@code canplay} event handlers. */ + public static final String TYPE_CANPLAY = "canplay"; + + /** The languagechange event type, triggered by {@code languagechange} event handlers. */ + public static final String TYPE_LANGUAGECHANGE = "languagechange"; + + /** The emptied event type, triggered by {@code emptied} event handlers. */ + public static final String TYPE_EMPTIED = "emptied"; + + /** The rejectionhandled event type, triggered by {@code rejectionhandled} event handlers. */ + public static final String TYPE_REJECTIONHANDLED = "rejectionhandled"; + + /** The pointercancel event type, triggered by {@code pointercancel} event handlers. */ + public static final String TYPE_POINTERCANCEL = "pointercancel"; + + /** The msgestureend event type, triggered by {@code msgestureend} event handlers. */ + public static final String TYPE_MSGESTUREEND = "msgestureend"; + + /** The resize event type, triggered by {@code resize} event handlers. */ + public static final String TYPE_RESIZE = "resize"; + + /** The pause event type, triggered by {@code pause} event handlers. */ + public static final String TYPE_PAUSE = "pause"; + + /** The pointerup event type, triggered by {@code pointerup} event handlers. */ + public static final String TYPE_POINTERUP = "pointerup"; + + /** The wheel event type, triggered by {@code wheel} event handlers. */ + public static final String TYPE_WHEEL = "wheel"; + + /** The mspointerdown event type, triggered by {@code mspointerdown} event handlers. */ + public static final String TYPE_MSPOINTERDOWN = "mspointerdown"; + + /** The pointerleave event type, triggered by {@code pointerleave} event handlers. */ + public static final String TYPE_POINTERLEAVE = "pointerleave"; + + /** The beforeprint event type, triggered by {@code beforeprint} event handlers. */ + public static final String TYPE_BEFOREPRINT = "beforeprint"; + + /** The storage event type, triggered by {@code storage} event handlers. */ + public static final String TYPE_STORAGE = "storage"; + + /** The devicelight event type, triggered by {@code devicelight} event handlers. */ + public static final String TYPE_DEVICELIGHT = "devicelight"; + + /** The animationstart event type, triggered by {@code animationstart} event handlers. */ + public static final String TYPE_ANIMATIONSTART = "animationstart"; + + /** The mspointercancel event type, triggered by {@code mspointercancel} event handlers. */ + public static final String TYPE_MSPOINTERCANCEL = "mspointercancel"; + + /** The timeupdate event type, triggered by {@code timeupdate} event handlers. */ + public static final String TYPE_TIMEUPDATE = "timeupdate"; + + /** The pagehide event type, triggered by {@code pagehide} event handlers. */ + public static final String TYPE_PAGEHIDE = "pagehide"; + + /** The webkitanimationiteration event type, triggered by {@code webkitanimationiteration} event handlers. */ + public static final String TYPE_WEBKITANIMATIONITERATION = "webkitanimationiteration"; + + /** The msgesturetap event type, triggered by {@code msgesturetap} event handlers. */ + public static final String TYPE_MSGESTURETAP = "msgesturetap"; + + /** The dragover event type, triggered by {@code dragover} event handlers. */ + public static final String TYPE_DRAGOVER = "dragover"; + + /** The online event type, triggered by {@code online} event handlers. */ + public static final String TYPE_ONLINE = "online"; + + /** The msgesturedoubletap event type, triggered by {@code msgesturedoubletap} event handlers. */ + public static final String TYPE_MSGESTUREDOUBLETAP = "msgesturedoubletap"; + + /** The show event type, triggered by {@code show} event handlers. */ + public static final String TYPE_SHOW = "show"; + + /** The volumechange event type, triggered by {@code volumechange} event handlers. */ + public static final String TYPE_VOLUMECHANGE = "volumechange"; + + /** The msgesturechange event type, triggered by {@code msgesturechange} event handlers. */ + public static final String TYPE_MSGESTURECHANGE = "msgesturechange"; + + /** The gotpointercapture event type, triggered by {@code gotpointercapture} event handlers. */ + public static final String TYPE_GOTPOINTERCAPTURE = "gotpointercapture"; + + /** The webkittransitionend event type, triggered by {@code webkittransitionend} event handlers. */ + public static final String TYPE_WEBKITTRANSITIONEND = "webkittransitionend"; + + /** The webkitanimationend event type, triggered by {@code webkitanimationend} event handlers. */ + public static final String TYPE_WEBKITANIMATIONEND = "webkitanimationend"; + + /** The mspointerout event type, triggered by {@code mspointerout} event handlers. */ + public static final String TYPE_MSPOINTEROUT = "mspointerout"; + + /** The devicemotion event type, triggered by {@code devicemotion} event handlers. */ + public static final String TYPE_DEVICEMOTION = "devicemotion"; + + /** The stalled event type, triggered by {@code stalled} event handlers. */ + public static final String TYPE_STALLED = "stalled"; + + /** The mouseenter event type, triggered by {@code mouseenter} event handlers. */ + public static final String TYPE_MOUDEENTER = "mouseenter"; + + /** The dragleave event type, triggered by {@code dragleave} event handlers. */ + public static final String TYPE_DRAGLEAVE = "dragleave"; + + /** The pointerdown event type, triggered by {@code pointerdown} event handlers. */ + public static final String TYPE_POINTERDOWN = "pointerdown"; + + /** The drop event type, triggered by {@code drop} event handlers. */ + public static final String TYPE_DROP = "drop"; + + /** The dragstart event type, triggered by {@code dragstart} event handlers. */ + public static final String TYPE_DRAGSTART = "dragstart"; + + /** The transitionend event type, triggered by {@code transitionend} event handlers. */ + public static final String TYPE_TRANSITIONEND = "transitionend"; + + /** The msgesturehold event type, triggered by {@code msgesturehold} event handlers. */ + public static final String TYPE_MSGESTUREHOLD = "msgesturehold"; + + /** The deviceorientationabsolute event type, triggered by {@code deviceorientationabsolute} event handlers. */ + public static final String TYPE_DEVICEORIENTATIONABSOLUTE = "deviceorientationabsolute"; + + /** The beforecopy event type, triggered by {@code beforecopy} event handlers. */ + public static final String TYPE_BEFORECOPY = "beforecopy"; + + /** The beforecut event type, triggered by {@code beforecut} event handlers. */ + public static final String TYPE_BEFORECUT = "beforecut"; + + /** The beforepaste event type, triggered by {@code beforepaste} event handlers. */ + public static final String TYPE_BEFOREPASTE = "beforepaste"; + + /** The selectstart event type, triggered by {@code selectstart} event handlers. */ + public static final String TYPE_SELECTSTART = "selectstart"; + + /** The webkitfullscreenchange event type, triggered by {@code webkitfullscreenchange} event handlers. */ + public static final String TYPE_WEBKITFULLSCREENCHANGE = "webkitfullscreenchange"; + + /** The webkitfullscreenerror event type, triggered by {@code webkitfullscreenerror} event handlers. */ + public static final String TYPE_WEBKITFULLSCREENERROR = "webkitfullscreenerror"; + /** The copy event type, triggered by {@code copy} event handlers. */ + public static final String TYPE_COPY = "copy"; + + /** The cut event type, triggered by {@code cut} event handlers. */ + public static final String TYPE_CUT = "cut"; + + /** The paste event type, triggered by {@code paste} event handlers. */ + public static final String TYPE_PASTE = "paste"; + + /** The onmessageerror event type, triggered by {@code onmessageerror} event handlers. */ + public static final String TYPE_ONMESSAGEERROR = "onmessageerror"; + + /** The stop event type, triggered by {@code stop} event handlers. */ + public static final String TYPE_STOP = "stop"; + + /** The msgotpointercapture event type, triggered by {@code msgotpointercapture} event handlers. */ + public static final String TYPE_MSGOTPOINTERCAPTURE = "msgotpointercapture"; + + /** The mslostpointercapture event type, triggered by {@code mslostpointercapture} event handlers. */ + public static final String TYPE_MSLOSTPOINTERCAPTURE = "mslostpointercapture"; + + /** The activate event type, triggered by {@code activate} event handlers. */ + public static final String TYPE_ACTIVATE = "activate"; + + /** The deactivate event type, triggered by {@code deactivate} event handlers. */ + public static final String TYPE_DEACTIVATE = "deactivate"; + + /** The mscontentzoom event type, triggered by {@code mscontentzoom} event handlers. */ + public static final String TYPE_MSCONTENTZOOM = "mscontentzoom"; + + /** The msmanipulationstatechanged event type, triggered by {@code msmanipulationstatechanged} event handlers. */ + public static final String TYPE_MSMANIPULATIONSTATECHANGED = "msmanipulationstatechanged"; + + /** The beforeactivate event type, triggered by {@code beforeactivate} event handlers. */ + public static final String TYPE_BEFOREACTIVATE = "beforeactivate"; + + /** The pointerlockchange event type, triggered by {@code pointerlockchange} event handlers. */ + public static final String TYPE_POINTERLOCKCHANGE = "pointerlockchange"; + + /** The pointerlockerror event type, triggered by {@code pointerlockerror} event handlers. */ + public static final String TYPE_POINTERLOCKERROR = "pointerlockerror"; + + /** The selectionchange event type, triggered by {@code selectionchange} event handlers. */ + public static final String TYPE_SELECTIONCHANGE = "selectionchange"; + + /** The afterscriptexecute event type, triggered by {@code afterscriptexecute} event handlers. */ + public static final String TYPE_AFTERSCRIPTEXECUTE = "afterscriptexecute"; + + /** The beforescriptexecute event type, triggered by {@code beforescriptexecute} event handlers. */ + public static final String TYPE_BEFORESCRIPTEXECUTE = "beforescriptexecute"; + + /** The msfullscreenchange event type, triggered by {@code msfullscreenchange} event handlers. */ + public static final String TYPE_MSFULLSCREENCHANGE = "msfullscreenchange"; + + /** The msfullscreenerror event type, triggered by {@code msfullscreenerror} event handlers. */ + public static final String TYPE_MSFULLSCREENERROR = "msfullscreenerror"; + + /** The beforedeactivate event type, triggered by {@code beforedeactivate} event handlers. */ + public static final String TYPE_BEFOREDEACTIVATE = "beforedeactivate"; + + /** The msthumbnailclick event type, triggered by {@code msthumbnailclick} event handlers. */ + public static final String TYPE_MSTHUMBNAILCLICK = "msthumbnailclick"; + + /** The storagecommit event type, triggered by {@code storagecommit} event handlers. */ + public static final String TYPE_STORAGECOMMIT = "storagecommit"; + + /** The ontransitioncancel event type, triggered by {@code ontransitioncancel} event handlers. */ + public static final String TYPE_ONTRANSITIONCANCEL = "ontransitioncancel"; + + /** The ontransitionend event type, triggered by {@code ontransitionend} event handlers. */ + public static final String TYPE_ONTRANSITIONEND = "ontransitionend"; + + /** The ontransitionrun event type, triggered by {@code ontransitionrun} event handlers. */ + public static final String TYPE_ONTRANSITIONRUN = "ontransitionrun"; + + /** The ontransitionstart event type, triggered by {@code ontransitionstart} event handlers. */ + public static final String TYPE_ONTRANSITIONSTART = "ontransitionstart"; + + /** + * The mssitemodejumplistitemremoved event type, triggered + * by {@code mssitemodejumplistitemremoved} event handlers. + */ + public static final String TYPE_MSSITEMODEJUMPLISTITEMREMOVED = "mssitemodejumplistitemremoved"; + /** No event phase. */ @JsxConstant({CHROME, EDGE, FF, FF78}) public static final short NONE = 0; @@ -704,4 +1081,13 @@ public void setReturnValue(final Object newValue) { public Object getComposed() { return false; } + + /** + * Returns whether the given value indicates a missing or undefined property. + * @param value the new value + * @return whether the given value indicates a missing or undefined property + */ + protected static boolean isMissingOrUndefined(final Object value) { + return value == Scriptable.NOT_FOUND || Undefined.isUndefined(value); + } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventHandler.java index 4f4356102..9669f19a8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,7 +15,6 @@ package com.gargoylesoftware.htmlunit.javascript.host.event; import com.gargoylesoftware.htmlunit.html.DomNode; -import com.gargoylesoftware.htmlunit.javascript.SimpleScriptable; import net.sourceforge.htmlunit.corejs.javascript.BaseFunction; import net.sourceforge.htmlunit.corejs.javascript.Context; @@ -28,6 +27,7 @@ * Allows to wrap event handler code as Function object. * * @author Marc Guillemot + * @author Ronald Brill */ public class EventHandler extends BaseFunction { private final DomNode node_; @@ -59,12 +59,16 @@ public Object call(final Context cx, final Scriptable scope, throws JavaScriptException { // the js object to which this event is attached has to be the scope - final SimpleScriptable jsObj = node_.getScriptableObject(); + // final SimpleScriptable jsObj = node_.getScriptableObject(); + // have changed this - the scope is now thisObj to fix + // https://github.com/HtmlUnit/htmlunit/issues/347 + // but i still have not found any description about the right scope + // compile "just in time" if (realFunction_ == null) { - realFunction_ = cx.compileFunction(jsObj, jsSnippet_, eventName_ + " event for " + node_ + realFunction_ = cx.compileFunction(thisObj, jsSnippet_, eventName_ + " event for " + node_ + " in " + node_.getPage().getUrl(), 0, null); - realFunction_.setParentScope(jsObj); + realFunction_.setParentScope(thisObj); } return realFunction_.call(cx, scope, thisObj, args); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventListenersContainer.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventListenersContainer.java index 35b350975..d4e3d274e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventListenersContainer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventListenersContainer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventSource.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventSource.java index 0c669e35f..3ab050876 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventSource.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventSource.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventTarget.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventTarget.java index 03015726c..3067747a0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventTarget.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventTarget.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -288,10 +288,6 @@ public boolean dispatchEvent(final Event event) { */ @JsxFunction public void removeEventListener(final String type, final Scriptable listener, final boolean useCapture) { - if (isEventHandlerOnWindow()) { - getWindow().getEventListenersContainer().removeEventListener(type, listener, useCapture); - } - if (eventListenersContainer_ == null) { return; } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/FocusEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/FocusEvent.java index 42b62e3a4..6608627c4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/FocusEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/FocusEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/GamepadEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/GamepadEvent.java index 696466d3b..2dbe83243 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/GamepadEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/GamepadEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/HashChangeEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/HashChangeEvent.java index a405c9597..9af5a2e8a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/HashChangeEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/HashChangeEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/IDBVersionChangeEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/IDBVersionChangeEvent.java index 0ab42ea78..b7e96390f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/IDBVersionChangeEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/IDBVersionChangeEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/InputEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/InputEvent.java index 2baab9869..a340a1714 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/InputEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/InputEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,6 +14,7 @@ */ package com.gargoylesoftware.htmlunit.javascript.host.event; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_EVENT_INPUT_CTOR_INPUTTYPE; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; @@ -21,6 +22,11 @@ import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter; + +import net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime; +import net.sourceforge.htmlunit.corejs.javascript.ScriptableObject; +import net.sourceforge.htmlunit.corejs.javascript.Undefined; /** * A JavaScript object for {@code InputEvent}. @@ -31,10 +37,81 @@ @JsxClass({CHROME, EDGE, FF, FF78}) public class InputEvent extends UIEvent { + private String data_; + private String inputType_; + private boolean isComposing_; + /** * Default constructor. */ - @JsxConstructor public InputEvent() { + data_ = ""; + inputType_ = ""; + } + + /** + * JavaScript constructor. + * + * @param type the event type + * @param details the event details (optional) + */ + @Override + @JsxConstructor + public void jsConstructor(final String type, final ScriptableObject details) { + super.jsConstructor(type, details); + + if (details != null && !Undefined.isUndefined(details)) { + if (getBrowserVersion().hasFeature(JS_EVENT_INPUT_CTOR_INPUTTYPE)) { + final Object inputType = details.get("inputType", details); + if (!isMissingOrUndefined(inputType)) { + inputType_ = ScriptRuntime.toString(inputType); + } + } + + final Object dataObj = details.get("data", details); + if (!isMissingOrUndefined(dataObj)) { + data_ = ScriptRuntime.toString(dataObj); + } + + final Object isComposing = details.get("isComposing", details); + if (!isMissingOrUndefined(isComposing)) { + setIsComposing(ScriptRuntime.toBoolean(isComposing)); + } + } + } + + /** + * Returns whether or not the event is fired after the compositionstart and before the compositionend events. + * @return whether or not the event is fired while composing + */ + @JsxGetter + public boolean getIsComposing() { + return isComposing_; + } + + /** + * Sets whether or not this event is fired after the compositionstart and before the compositionend events. + * @param isComposing whether or not this event is fired while composing + */ + protected void setIsComposing(final boolean isComposing) { + isComposing_ = isComposing; + } + + /** + * Retrieves the data contained. + * @return the data contained + */ + @JsxGetter + public Object getData() { + return data_; + } + + /** + * Retrieves the inputType. + * @return the inputType + */ + @JsxGetter + public Object getInputType() { + return inputType_; } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEvent.java index 7015f4605..e89a0ee1c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,6 +15,7 @@ package com.gargoylesoftware.htmlunit.javascript.host.event; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_EVENT_DISTINGUISH_PRINTABLE_KEY; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_EVENT_KEYBOARD_CTOR_WHICH; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; @@ -31,6 +32,10 @@ import com.gargoylesoftware.htmlunit.javascript.configuration.JsxFunction; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter; +import net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime; +import net.sourceforge.htmlunit.corejs.javascript.ScriptableObject; +import net.sourceforge.htmlunit.corejs.javascript.Undefined; + /** * JavaScript object representing a Keyboard Event. * For general information on which properties and functions should be supported, see @@ -40,6 +45,7 @@ * @author Ahmed Ashour * @author Frank Danek * @author Ronald Brill + * @author Joerg Werner */ @JsxClass public class KeyboardEvent extends UIEvent { @@ -854,16 +860,41 @@ public class KeyboardEvent extends UIEvent { keyCodeMap.put('|', DOM_VK_BACK_SLASH); } - private int charCode_; - private int which_; + /* + * Standard properties + */ + + /** The key value of the key represented by the event. */ + private String key_ = ""; + + /** The code value of the physical key represented by the event. */ + private String code_ = ""; + + /** The location of the key on the keyboard or other input device. See DOM_KEY_LOCATION_* constants. */ + private int location_; /** Whether or not the "meta" key was pressed during the firing of the event. */ private boolean metaKey_; + /** Whether the key is being held down such that it is automatically repeating. */ + private boolean repeat_; + + /** Whether the event is fired after the compositionstart and before the compositionend events. */ + private boolean isComposing_; + + /* + * Deprecated properties + */ + + /** The Unicode reference number of the key. */ + private int charCode_; + + /** The unmodified value of the pressed key. This is usually the same as keyCode. */ + private int which_; + /** * Creates a new keyboard event instance. */ - @JsxConstructor({CHROME, EDGE, FF, FF78}) public KeyboardEvent() { } @@ -914,6 +945,9 @@ public KeyboardEvent(final DomNode domNode, final String type, final char charac charCode_ = character; } which_ = charCode_ == 0 ? keyCode : Integer.valueOf(charCode_); + + key_ = determineKey(); + code_ = determineCode(); } /** @@ -943,6 +977,9 @@ public KeyboardEvent(final DomNode domNode, final String type, final int keyCode setShiftKey(shiftKey); setCtrlKey(ctrlKey); setAltKey(altKey); + + key_ = determineKey(); + code_ = determineCode(); } /** @@ -961,6 +998,146 @@ private static boolean isAmbiguousKeyCode(final int keyCode) { return (keyCode >= DOM_VK_0 && keyCode <= DOM_VK_9) || (keyCode >= DOM_VK_A && keyCode <= DOM_VK_Z); } + /** + * Converts a Java character to a keyCode. + * @see DOM 3 Events + * @param c the character + * @return the corresponding keycode + */ + private static int charToKeyCode(final char c) { + if (c >= 'a' && c <= 'z') { + return 'A' + c - 'a'; + } + + final Integer i = keyCodeMap.get(c); + if (i != null) { + return i; + } + return c; + } + + /** + * Determines the value of the 'key' property from the current value of 'keyCode', 'charCode', or 'which'. + * @return the key value + */ + private String determineKey() { + int code = getKeyCode(); + if (code == 0) { + code = getCharCode(); + } + switch (code) { + case DOM_VK_SHIFT: + return "Shift"; + case DOM_VK_PERIOD: + return "."; + case DOM_VK_RETURN: + return "Enter"; + + default: + return String.valueOf(isShiftKey() ? (char) which_ : Character.toLowerCase((char) which_)); + } + } + + /** + * Determines the value of the 'code' property from the current value of 'keyCode', 'charCode', or 'which'. + * @return the code value + */ + private String determineCode() { + int code = getKeyCode(); + if (code == 0) { + code = getCharCode(); + } + switch (code) { + case DOM_VK_SHIFT: + return "ShiftLeft"; + case DOM_VK_PERIOD: + case '.': + return "Period"; + case DOM_VK_RETURN: + return "Enter"; + + default: + return "Key" + Character.toUpperCase((char) which_); + } + } + + /** + * JavaScript constructor. + * + * @param type the event type + * @param details the event details (optional) + */ + @JsxConstructor({CHROME, EDGE, FF, FF78}) + @Override + public void jsConstructor(final String type, final ScriptableObject details) { + super.jsConstructor(type, details); + + if (details != null && !Undefined.isUndefined(details)) { + + final Object key = details.get("key", details); + if (!isMissingOrUndefined(key)) { + setKey(ScriptRuntime.toString(key)); + } + + final Object code = details.get("code", details); + if (!isMissingOrUndefined(code)) { + setCode(ScriptRuntime.toString(code)); + } + + final Object location = details.get("location", details); + if (!isMissingOrUndefined(location)) { + setLocation(ScriptRuntime.toInt32(location)); + } + + final Object ctrlKey = details.get("ctrlKey", details); + if (!isMissingOrUndefined(ctrlKey)) { + setCtrlKey(ScriptRuntime.toBoolean(ctrlKey)); + } + + final Object shiftKey = details.get("shiftKey", details); + if (!isMissingOrUndefined(shiftKey)) { + setShiftKey(ScriptRuntime.toBoolean(shiftKey)); + } + + final Object altKey = details.get("altKey", details); + if (!isMissingOrUndefined(altKey)) { + setAltKey(ScriptRuntime.toBoolean(altKey)); + } + + final Object metaKey = details.get("metaKey", details); + if (!isMissingOrUndefined(metaKey)) { + setMetaKey(ScriptRuntime.toBoolean(metaKey)); + } + + final Object repeat = details.get("repeat", details); + if (!isMissingOrUndefined(repeat)) { + setRepeat(ScriptRuntime.toBoolean(repeat)); + } + + final Object isComposing = details.get("isComposing", details); + if (!isMissingOrUndefined(isComposing)) { + setIsComposing(ScriptRuntime.toBoolean(isComposing)); + } + + final Object charCode = details.get("charCode", details); + if (!isMissingOrUndefined(charCode)) { + setCharCode(ScriptRuntime.toInt32(charCode)); + } + + final Object keyCode = details.get("keyCode", details); + if (!isMissingOrUndefined(keyCode)) { + setKeyCode(ScriptRuntime.toInt32(keyCode)); + } + + if (getBrowserVersion().hasFeature(JS_EVENT_KEYBOARD_CTOR_WHICH)) { + final Object which = details.get("which", details); + if (!isMissingOrUndefined(which)) { + setWhich(ScriptRuntime.toInt32(which)); + } + } + } + } + /** * Implementation of the DOM Level 3 Event method for initializing the key event. * @@ -1006,31 +1183,29 @@ public int getCharCode() { return charCode_; } + /** + * Sets the char code associated with the event. + * @param charCode the char code associated with the event + */ + protected void setCharCode(final int charCode) { + charCode_ = charCode; + } + /** * Returns the numeric keyCode of the key pressed, or the charCode for an alphanumeric key pressed. * @return the numeric keyCode of the key pressed, or the charCode for an alphanumeric key pressed */ @JsxGetter - public Object getWhich() { + public int getWhich() { return which_; } /** - * Converts a Java character to a keyCode. - * @see DOM 3 Events - * @param c the character - * @return the corresponding keycode + * Sets the numeric keyCode of the key pressed, or the charCode for an alphanumeric key pressed. + * @param which the numeric keyCode of the key pressed, or the charCode for an alphanumeric key pressed */ - private static int charToKeyCode(final char c) { - if (c >= 'a' && c <= 'z') { - return 'A' + c - 'a'; - } - - final Integer i = keyCodeMap.get(c); - if (i != null) { - return i; - } - return c; + protected void setWhich(final int which) { + which_ = which; } /** @@ -1075,21 +1250,15 @@ public boolean isAltKey() { */ @JsxGetter public String getKey() { - int code = getKeyCode(); - if (code == 0) { - code = getCharCode(); - } - switch (code) { - case DOM_VK_SHIFT: - return "Shift"; - case DOM_VK_PERIOD: - return "."; - case DOM_VK_RETURN: - return "Enter"; + return key_; + } - default: - return String.valueOf(isShiftKey() ? (char) which_ : Character.toLowerCase((char) which_)); - } + /** + * Sets the value of a key or keys pressed by the user. + * @param key the value of a key or keys pressed by the user + */ + protected void setKey(final String key) { + key_ = key; } /** @@ -1121,22 +1290,15 @@ public String getChar() { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public String getCode() { - int code = getKeyCode(); - if (code == 0) { - code = getCharCode(); - } - switch (code) { - case DOM_VK_SHIFT: - return "ShiftLeft"; - case DOM_VK_PERIOD: - case '.': - return "Period"; - case DOM_VK_RETURN: - return "Enter"; + return code_; + } - default: - return "Key" + Character.toUpperCase((char) which_); - } + /** + * Sets a physical key on the keyboard. + * @param code a physical key on the keyboard + */ + protected void setCode(final String code) { + code_ = code; } /** @@ -1149,9 +1311,61 @@ public boolean getMetaKey() { } /** - * @param metaKey whether Meta has been pressed during this event or not + * Sets whether or not the "meta" key was pressed during the event firing. + * @param metaKey whether or not the "meta" was pressed during the event firing */ protected void setMetaKey(final boolean metaKey) { metaKey_ = metaKey; } + + /** + * Returns the location of the key on the keyboard. + * @return the location of the key on the keyboard + */ + @JsxGetter + public int getLocation() { + return location_; + } + + /** + * Sets the location of the key on the keyboard. + * @param location the location of the key on the keyboard + */ + protected void setLocation(final int location) { + location_ = location; + } + + /** + * Returns whether or not the key is being held down such that it is automatically repeating. + * @return whether or not the key is being held down + */ + @JsxGetter + public boolean isRepeat() { + return repeat_; + } + + /** + * Sets whether or not the key is being held down such that it is automatically repeating. + * @param repeat whether or not the key is being held down + */ + protected void setRepeat(final boolean repeat) { + repeat_ = repeat; + } + + /** + * Returns whether or not the event is fired after the compositionstart and before the compositionend events. + * @return whether or not the event is fired while composing + */ + @JsxGetter({CHROME, EDGE, FF, FF78}) + public boolean getIsComposing() { + return isComposing_; + } + + /** + * Sets whether or not this event is fired after the compositionstart and before the compositionend events. + * @param isComposing whether or not this event is fired while composing + */ + protected void setIsComposing(final boolean isComposing) { + isComposing_ = isComposing; + } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MIDIConnectionEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MIDIConnectionEvent.java index 8c5ce284c..023e507ce 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MIDIConnectionEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MIDIConnectionEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MIDIMessageEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MIDIMessageEvent.java index 2643cab18..eb4b180ce 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MIDIMessageEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MIDIMessageEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MSGestureEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MSGestureEvent.java index 83f2ea251..c2e91cc1d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MSGestureEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MSGestureEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaEncryptedEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaEncryptedEvent.java index 577ac4502..4eb9fe2a9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaEncryptedEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaEncryptedEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaKeyMessageEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaKeyMessageEvent.java index b314c49ad..fc6da831c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaKeyMessageEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaKeyMessageEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaQueryListEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaQueryListEvent.java index 6cfaa6e29..c5aba6c1f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaQueryListEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaQueryListEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaStreamEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaStreamEvent.java index 5be0c5d89..896d8d9d8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaStreamEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaStreamEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaStreamTrackEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaStreamTrackEvent.java index 7f7ddc959..1affe14ef 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaStreamTrackEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MediaStreamTrackEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MessageEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MessageEvent.java index 78ee6e1ca..a094229b9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MessageEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MessageEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseEvent.java index f9cbdbc16..ee24e8668 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseScrollEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseScrollEvent.java index e32308f9d..68d337a2b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseScrollEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseScrollEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseWheelEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseWheelEvent.java index 8830f7a68..3fa9baec8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseWheelEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseWheelEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MutationEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MutationEvent.java index ed88f928c..3bb0ea155 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MutationEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MutationEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/OfflineAudioCompletionEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/OfflineAudioCompletionEvent.java index 124e0e119..7c35ceb56 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/OfflineAudioCompletionEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/OfflineAudioCompletionEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PageTransitionEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PageTransitionEvent.java index e2ec7535b..9ab21ac45 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PageTransitionEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PageTransitionEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PointerEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PointerEvent.java index a73fa1ee7..9fa667860 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PointerEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PointerEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PopStateEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PopStateEvent.java index ba26437cd..8cfa74ed6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PopStateEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PopStateEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PresentationConnectionAvailableEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PresentationConnectionAvailableEvent.java index 5b470bf7c..aee39d740 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PresentationConnectionAvailableEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PresentationConnectionAvailableEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PresentationConnectionCloseEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PresentationConnectionCloseEvent.java index dd90e06f3..fb37a8d8e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PresentationConnectionCloseEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PresentationConnectionCloseEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/ProgressEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/ProgressEvent.java index 9dae387ff..b8ca8f7ba 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/ProgressEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/ProgressEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PromiseRejectionEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PromiseRejectionEvent.java index 2155aec0a..43992a67b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PromiseRejectionEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PromiseRejectionEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/RTCDataChannelEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/RTCDataChannelEvent.java index 8f74ae9c1..58dfb3ce0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/RTCDataChannelEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/RTCDataChannelEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/RTCPeerConnectionIceEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/RTCPeerConnectionIceEvent.java index c4ab52051..2980a7b42 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/RTCPeerConnectionIceEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/RTCPeerConnectionIceEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/SVGZoomEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/SVGZoomEvent.java index 67ab3dd55..efa441764 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/SVGZoomEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/SVGZoomEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/SecurityPolicyViolationEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/SecurityPolicyViolationEvent.java index 4dee83481..4a647e79f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/SecurityPolicyViolationEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/SecurityPolicyViolationEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/SpeechSynthesisEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/SpeechSynthesisEvent.java index 474bc0bea..e7b6d699d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/SpeechSynthesisEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/SpeechSynthesisEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/StorageEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/StorageEvent.java index 2c4fd3978..f326ed0f2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/StorageEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/StorageEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TextEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TextEvent.java index 401bd2650..4731d8a09 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TextEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TextEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TimeEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TimeEvent.java index c1ddcaf12..92fb32678 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TimeEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TimeEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TouchEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TouchEvent.java index 406dfea65..17f10aafa 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TouchEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TouchEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TrackEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TrackEvent.java index 91ef0d9fe..ba6a57a33 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TrackEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TrackEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TransitionEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TransitionEvent.java index e7f545707..a8bb70386 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TransitionEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/TransitionEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEvent.java index 745cf7a4b..da404ebad 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebGLContextEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebGLContextEvent.java index 9bc717d00..4d236b2fe 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebGLContextEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebGLContextEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebkitSpeechRecognitionError.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebkitSpeechRecognitionError.java index 1b857c34c..2ea965ba6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebkitSpeechRecognitionError.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebkitSpeechRecognitionError.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebkitSpeechRecognitionEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebkitSpeechRecognitionEvent.java index 69a583707..66b427242 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebkitSpeechRecognitionEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebkitSpeechRecognitionEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WheelEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WheelEvent.java index f1083762f..7b696ad3b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WheelEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/WheelEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/package-info.java index 1d5ed9cd3..c5dd0b3de 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/Headers.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/Headers.java index 8353d1fcd..518a370da 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/Headers.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/Headers.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/Request.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/Request.java index 06ca8a3e0..e94a0033f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/Request.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/Request.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/Response.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/Response.java index 44052842d..5c264dd73 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/Response.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/Response.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/package-info.java index ad2dcf299..7cf1dffad 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/fetch/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/Blob.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/Blob.java index 4020beb95..3120deece 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/Blob.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/Blob.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/DataTransferItem.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/DataTransferItem.java index 9661c012d..9299f5a96 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/DataTransferItem.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/DataTransferItem.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/DataTransferItemList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/DataTransferItemList.java index 71abbf6d1..2b779ab27 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/DataTransferItemList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/DataTransferItemList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/File.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/File.java index bf6639c72..c5a6af85a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/File.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/File.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileList.java index 806616017..97058e47b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileReader.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileReader.java index 0936757c7..6f50d4fca 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileReader.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileReader.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystem.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystem.java index 9e4eb62be..4eb214cf4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystem.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystem.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemDirectoryEntry.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemDirectoryEntry.java index f55ffb434..cf77eb5d5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemDirectoryEntry.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemDirectoryEntry.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemDirectoryReader.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemDirectoryReader.java index d5811fbf1..0b0cf260a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemDirectoryReader.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemDirectoryReader.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemEntry.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemEntry.java index ccb0cc7cd..fbdd16a53 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemEntry.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemEntry.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemFileEntry.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemFileEntry.java index 4c32bd21b..fffc7ca78 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemFileEntry.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileSystemFileEntry.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/package-info.java index 1abd84c08..261376f66 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/file/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/Coordinates.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/Coordinates.java index c74f7296e..fd54645db 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/Coordinates.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/Coordinates.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/Geolocation.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/Geolocation.java index df108a52a..901a104d2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/Geolocation.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/Geolocation.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/Position.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/Position.java index 0b85089db..c4834be30 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/Position.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/Position.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/PositionError.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/PositionError.java index d2ee32737..6d826735e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/PositionError.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/PositionError.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/package-info.java index 43d1e16bb..8d19c40a4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/geo/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Audio.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Audio.java index 2819741c5..3f9ba66fb 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Audio.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Audio.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/DataTransfer.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/DataTransfer.java index c2a9cc937..0f106225f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/DataTransfer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/DataTransfer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/DocumentProxy.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/DocumentProxy.java index 9d746fd53..f023b5fc7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/DocumentProxy.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/DocumentProxy.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Enumerator.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Enumerator.java index dac4341a3..940739714 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Enumerator.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Enumerator.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAllCollection.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAllCollection.java index 0c74fb686..3cd64bc8a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAllCollection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAllCollection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElement.java index 4e20a5268..bfd60359d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,6 +14,7 @@ */ package com.gargoylesoftware.htmlunit.javascript.host.html; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_ANCHOR_HOSTNAME_IGNORE_BLANK; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_ANCHOR_PATHNAME_DETECT_WIN_DRIVES_URL; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_ANCHOR_PATHNAME_NONE_FOR_BROKEN_URL; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_ANCHOR_PATHNAME_NONE_FOR_NONE_HTTP_URL; @@ -21,6 +22,7 @@ import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_ANCHOR_PROTOCOL_COLON_FOR_BROKEN_URL; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_ANCHOR_PROTOCOL_COLON_UPPER_CASE_DRIVE_LETTERS; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_ANCHOR_PROTOCOL_HTTP_FOR_BROKEN_URL; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_ANCHOR_PROTOCOL_INVALID_THROWS; import static com.gargoylesoftware.htmlunit.html.DomElement.ATTRIBUTE_NOT_DEFINED; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE; @@ -52,6 +54,7 @@ import com.gargoylesoftware.htmlunit.util.UrlUtils; import net.sourceforge.htmlunit.corejs.javascript.Context; +import net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime; /** * The JavaScript object that represents an anchor. @@ -365,7 +368,8 @@ public void setHost(final String host) throws Exception { @JsxGetter public String getHostname() { try { - return getUrl().getHost(); + final String host = getUrl().getHost(); + return UrlUtils.encodeAnchor(host); } catch (final MalformedURLException e) { return ""; @@ -380,7 +384,14 @@ public String getHostname() { */ @JsxSetter public void setHostname(final String hostname) throws Exception { - setUrl(UrlUtils.getUrlWithNewHost(getUrl(), hostname)); + if (getBrowserVersion().hasFeature(JS_ANCHOR_HOSTNAME_IGNORE_BLANK)) { + if (!StringUtils.isBlank(hostname)) { + setUrl(UrlUtils.getUrlWithNewHost(getUrl(), hostname)); + } + } + else if (!StringUtils.isEmpty(hostname)) { + setUrl(UrlUtils.getUrlWithNewHost(getUrl(), hostname)); + } } /** @@ -504,7 +515,12 @@ public String getProtocol() { @JsxSetter public void setProtocol(final String protocol) throws Exception { final String bareProtocol = StringUtils.substringBefore(protocol, ":"); - setUrl(UrlUtils.getUrlWithNewProtocol(getUrl(), bareProtocol)); + if (UrlUtils.isValidScheme(bareProtocol)) { + setUrl(UrlUtils.getUrlWithNewProtocol(getUrl(), bareProtocol)); + } + else if (getBrowserVersion().hasFeature(JS_ANCHOR_PROTOCOL_INVALID_THROWS)) { + throw ScriptRuntime.typeError("Invalid protocol '" + protocol + "'."); + } } /** @@ -551,7 +567,7 @@ static String getDefaultValue(final HtmlElement element) { @JsxGetter public String getText() { final DomNode htmlElement = getDomNodeOrDie(); - return htmlElement.asText(); + return htmlElement.asNormalizedText(); } /** @@ -652,11 +668,11 @@ public void setOrigin(final String origin) { @JsxGetter({CHROME, EDGE, FF, FF78}) public String getUsername() { try { - final String userName = getUrl().getUserInfo(); - if (userName == null) { + final String userInfo = getUrl().getUserInfo(); + if (userInfo == null) { return ""; } - return StringUtils.substringBefore(userName, ":"); + return StringUtils.substringBefore(userInfo, ':'); } catch (final MalformedURLException e) { return ""; @@ -729,7 +745,7 @@ public void setPassword(final String password) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public String getDownload() { - return getDomNodeOrDie().getAttribute("download"); + return ((HtmlAnchor) getDomNodeOrDie()).getDownloadAttribute(); } /** diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAppletElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAppletElement.java index 8b69429c6..36c21e3c6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAppletElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAppletElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAreaElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAreaElement.java index 902fab815..e25020f2b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAreaElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAreaElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAudioElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAudioElement.java index b0a306a6b..eab09e1b6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAudioElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAudioElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBGSoundElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBGSoundElement.java index 3adb4e5dd..88c20a428 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBGSoundElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBGSoundElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBRElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBRElement.java index fe1b41e9a..684c259db 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBRElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBRElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseElement.java index 984f22ca1..a75b60b84 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseFontElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseFontElement.java index 230eae37f..f77669e6c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseFontElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseFontElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBlockElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBlockElement.java index 4b2a204ac..3574d0a60 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBlockElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBlockElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBodyElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBodyElement.java index 891e78ca7..0903ab993 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBodyElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBodyElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -239,6 +239,78 @@ public TextRange createTextRange() { return super.createTextRange(); } + /** + * {@inheritDoc} + */ + @Override + @JsxGetter({CHROME, EDGE}) + public Object getOnload() { + return super.getOnload(); + } + + /** + * {@inheritDoc} + */ + @Override + @JsxSetter({CHROME, EDGE}) + public void setOnload(final Object onload) { + super.setOnload(onload); + } + + /** + * {@inheritDoc} + */ + @Override + @JsxSetter({CHROME, EDGE}) + public void setOnblur(final Object handler) { + super.setOnblur(handler); + } + + /** + * {@inheritDoc} + */ + @Override + @JsxGetter({CHROME, EDGE}) + public Object getOnblur() { + return super.getOnblur(); + } + + /** + * {@inheritDoc} + */ + @Override + @JsxSetter({CHROME, EDGE}) + public void setOnfocus(final Object handler) { + super.setOnfocus(handler); + } + + /** + * {@inheritDoc} + */ + @Override + @JsxGetter({CHROME, EDGE}) + public Object getOnfocus() { + return super.getOnfocus(); + } + + /** + * {@inheritDoc} + */ + @Override + @JsxSetter({CHROME, EDGE}) + public void setOnerror(final Object handler) { + super.setOnerror(handler); + } + + /** + * {@inheritDoc} + */ + @Override + @JsxGetter({CHROME, EDGE}) + public Object getOnerror() { + return super.getOnerror(); + } + /** * Returns the {@code onbeforeunload} event handler for this element. * @return the {@code onbeforeunload} event handler for this element @@ -281,7 +353,7 @@ public void setOnhashchange(final Object onhashchange) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnlanguagechange() { - return getEventHandler("languagechange"); + return getEventHandler(Event.TYPE_LANGUAGECHANGE); } /** @@ -290,7 +362,7 @@ public Function getOnlanguagechange() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnlanguagechange(final Object onlanguagechange) { - setEventHandler("languagechange", onlanguagechange); + setEventHandler(Event.TYPE_LANGUAGECHANGE, onlanguagechange); } /** @@ -317,7 +389,7 @@ public void setOnmessage(final Object onmessage) { */ @JsxGetter public Function getOnoffline() { - return getEventHandler("offline"); + return getEventHandler(Event.TYPE_OFFLINE); } /** @@ -326,7 +398,7 @@ public Function getOnoffline() { */ @JsxSetter public void setOnoffline(final Object onoffline) { - setEventHandler("offline", onoffline); + setEventHandler(Event.TYPE_OFFLINE, onoffline); } /** @@ -335,7 +407,7 @@ public void setOnoffline(final Object onoffline) { */ @JsxGetter public Function getOnonline() { - return getEventHandler("online"); + return getEventHandler(Event.TYPE_ONLINE); } /** @@ -344,7 +416,7 @@ public Function getOnonline() { */ @JsxSetter public void setOnonline(final Object ononline) { - setEventHandler("online", ononline); + setEventHandler(Event.TYPE_ONLINE, ononline); } /** @@ -353,7 +425,7 @@ public void setOnonline(final Object ononline) { */ @JsxGetter public Function getOnpagehide() { - return getEventHandler("pagehide"); + return getEventHandler(Event.TYPE_PAGEHIDE); } /** @@ -362,7 +434,7 @@ public Function getOnpagehide() { */ @JsxSetter public void setOnpagehide(final Object onpagehide) { - setEventHandler("pagehide", onpagehide); + setEventHandler(Event.TYPE_PAGEHIDE, onpagehide); } /** @@ -371,7 +443,7 @@ public void setOnpagehide(final Object onpagehide) { */ @JsxGetter public Function getOnpageshow() { - return getEventHandler("pageshow"); + return getEventHandler(Event.TYPE_PAGESHOW); } /** @@ -380,7 +452,7 @@ public Function getOnpageshow() { */ @JsxSetter public void setOnpageshow(final Object onpageshow) { - setEventHandler("pageshow", onpageshow); + setEventHandler(Event.TYPE_PAGESHOW, onpageshow); } /** @@ -407,7 +479,7 @@ public void setOnpopstate(final Object onpopstate) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnrejectionhandled() { - return getEventHandler("rejectionhandled"); + return getEventHandler(Event.TYPE_REJECTIONHANDLED); } /** @@ -416,7 +488,7 @@ public Function getOnrejectionhandled() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnrejectionhandled(final Object onrejectionhandled) { - setEventHandler("rejectionhandled", onrejectionhandled); + setEventHandler(Event.TYPE_REJECTIONHANDLED, onrejectionhandled); } /** @@ -425,7 +497,7 @@ public void setOnrejectionhandled(final Object onrejectionhandled) { */ @JsxGetter public Function getOnstorage() { - return getEventHandler("storage"); + return getEventHandler(Event.TYPE_STORAGE); } /** @@ -434,7 +506,7 @@ public Function getOnstorage() { */ @JsxSetter public void setOnstorage(final Object onstorage) { - setEventHandler("storage", onstorage); + setEventHandler(Event.TYPE_STORAGE, onstorage); } /** @@ -443,7 +515,7 @@ public void setOnstorage(final Object onstorage) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnunhandledrejection() { - return getEventHandler("unhandledrejection"); + return getEventHandler(Event.TYPE_UNHANDLEDREJECTION); } /** @@ -452,7 +524,7 @@ public Function getOnunhandledrejection() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnunhandledrejection(final Object onunhandledrejection) { - setEventHandler("unhandledrejection", onunhandledrejection); + setEventHandler(Event.TYPE_UNHANDLEDREJECTION, onunhandledrejection); } /** @@ -479,7 +551,7 @@ public void setOnunload(final Object onunload) { */ @JsxGetter public Function getOnafterprint() { - return getEventHandler("afterprint"); + return getEventHandler(Event.TYPE_AFTERPRINT); } /** @@ -488,7 +560,7 @@ public Function getOnafterprint() { */ @JsxSetter public void setOnafterprint(final Object onafterprint) { - setEventHandler("afterprint", onafterprint); + setEventHandler(Event.TYPE_AFTERPRINT, onafterprint); } /** @@ -497,7 +569,7 @@ public void setOnafterprint(final Object onafterprint) { */ @JsxGetter public Function getOnbeforeprint() { - return getEventHandler("beforeprint"); + return getEventHandler(Event.TYPE_BEFOREPRINT); } /** @@ -506,7 +578,7 @@ public Function getOnbeforeprint() { */ @JsxSetter public void setOnbeforeprint(final Object onbeforeprint) { - setEventHandler("beforeprint", onbeforeprint); + setEventHandler(Event.TYPE_BEFOREPRINT, onbeforeprint); } /** @@ -515,7 +587,7 @@ public void setOnbeforeprint(final Object onbeforeprint) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnmessageerror() { - return getEventHandler("onmessageerror"); + return getEventHandler(Event.TYPE_ONMESSAGEERROR); } /** @@ -524,14 +596,14 @@ public Function getOnmessageerror() { */ @JsxSetter({CHROME, EDGE}) public void setOnmessageerror(final Object onmessageerror) { - setEventHandler("onmessageerror", onmessageerror); + setEventHandler(Event.TYPE_ONMESSAGEERROR, onmessageerror); } /** * {@inheritDoc} */ @Override - @JsxGetter(IE) + @JsxGetter({CHROME, EDGE, IE}) public Function getOnresize() { return super.getOnresize(); } @@ -540,9 +612,26 @@ public Function getOnresize() { * {@inheritDoc} */ @Override - @JsxSetter(IE) + @JsxSetter({CHROME, EDGE, IE}) public void setOnresize(final Object onresize) { super.setOnresize(onresize); } + /** + * {@inheritDoc} + */ + @Override + @JsxGetter({CHROME, EDGE}) + public Function getOnscroll() { + return super.getOnscroll(); + } + + /** + * {@inheritDoc} + */ + @Override + @JsxSetter({CHROME, EDGE}) + public void setOnscroll(final Object onresize) { + super.setOnscroll(onresize); + } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLButtonElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLButtonElement.java index 07f564c17..42f4ec351 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLButtonElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLButtonElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCanvasElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCanvasElement.java index 30d9cc24b..258e9eba0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCanvasElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCanvasElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection.java index 5f640be08..97fa50455 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLContentElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLContentElement.java deleted file mode 100644 index e0c1af974..000000000 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLContentElement.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2002-2021 Gargoyle Software Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.gargoylesoftware.htmlunit.javascript.host.html; - -import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; -import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE; - -import com.gargoylesoftware.htmlunit.html.HtmlContent; -import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; -import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor; - -/** - * The JavaScript object {@code HTMLContentElement}. - * - * @author Ahmed Ashour - * @author Ronald Brill - */ -@JsxClass(domClass = HtmlContent.class, value = {CHROME, EDGE}) -public class HTMLContentElement extends HTMLElement { - - /** - * Creates an instance. - */ - @JsxConstructor - public HTMLContentElement() { - } -} diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDDElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDDElement.java index 88bbb2ae0..f756baa3c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDDElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDDElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDListElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDListElement.java index b06a04cde..d07da7592 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDListElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDListElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDTElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDTElement.java index d295cc2df..e820f3e80 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDTElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDTElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDataElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDataElement.java index bc0904201..1fff355ea 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDataElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDataElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDataListElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDataListElement.java index 1c56591d2..de9c5c15a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDataListElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDataListElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDetailsElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDetailsElement.java index f871c30d3..f8f032e36 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDetailsElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDetailsElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,9 @@ import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxSetter; + +import net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime; /** * The JavaScript object {@code HTMLDetailsElement}. @@ -46,6 +49,21 @@ public HTMLDetailsElement() { */ @JsxGetter public boolean isOpen() { - return getDomNodeOrDie().hasAttribute("open"); + return ((HtmlDetails) getDomNodeOrDie()).isOpen(); + } + + /** + * Sets the open attribute. + * @param newValue the new value to set + */ + @JsxSetter + public void setOpen(final Object newValue) { + final boolean bool = ScriptRuntime.toBoolean(newValue); + if (bool) { + getDomNodeOrDie().setAttribute("open", ""); + } + else { + getDomNodeOrDie().removeAttribute("open"); + } } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDialogElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDialogElement.java index 87d36a5d5..f29edfb50 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDialogElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDialogElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDirectoryElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDirectoryElement.java index 3b055ed90..fc083a22d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDirectoryElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDirectoryElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDivElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDivElement.java index ef3789251..d81251e92 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDivElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDivElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument.java index b89774842..b99b2092e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -70,6 +70,7 @@ import com.gargoylesoftware.htmlunit.javascript.host.dom.Selection; import com.gargoylesoftware.htmlunit.javascript.host.event.Event; import com.gargoylesoftware.htmlunit.util.Cookie; +import com.gargoylesoftware.htmlunit.util.UrlUtils; import net.sourceforge.htmlunit.corejs.javascript.Context; import net.sourceforge.htmlunit.corejs.javascript.Function; @@ -275,20 +276,21 @@ private void scheduleImplicitClose() { closePostponedAction_ = true; final HtmlPage page = (HtmlPage) getDomNodeOrDie(); final WebWindow enclosingWindow = page.getEnclosingWindow(); - page.getWebClient().getJavaScriptEngine().addPostponedAction(new PostponedAction(page) { - @Override - public void execute() throws Exception { - if (writeBuilder_.length() != 0) { - close(); - } - closePostponedAction_ = false; - } + page.getWebClient().getJavaScriptEngine().addPostponedAction( + new PostponedAction(page, "HTMLDocument.scheduleImplicitClose") { + @Override + public void execute() throws Exception { + if (writeBuilder_.length() != 0) { + close(); + } + closePostponedAction_ = false; + } - @Override - public boolean isStillAlive() { - return !enclosingWindow.isClosed(); - } - }); + @Override + public boolean isStillAlive() { + return !enclosingWindow.isClosed(); + } + }); } } @@ -500,7 +502,7 @@ public Object open(final Object url, final Object name, final Object features, if (ww instanceof FrameWindow && (!Undefined.isUndefined(url) || getBrowserVersion().hasFeature(JS_DOCUMENT_OPEN_OVERWRITES_ABOUT_BLANK_LOCATION)) - && WebClient.ABOUT_BLANK.equals(getPage().getUrl().toExternalForm())) { + && UrlUtils.ABOUT_BLANK.equals(getPage().getUrl().toExternalForm())) { final URL enclosingUrl = ((FrameWindow) ww).getEnclosingPage().getUrl(); getPage().getWebResponse().getWebRequest().setUrl(enclosingUrl); } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement.java index 3e35bda79..78e7a3164 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -43,6 +43,7 @@ import java.util.regex.Pattern; import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.xml.sax.helpers.AttributesImpl; @@ -65,6 +66,7 @@ import com.gargoylesoftware.htmlunit.html.HtmlBig; import com.gargoylesoftware.htmlunit.html.HtmlBody; import com.gargoylesoftware.htmlunit.html.HtmlBold; +import com.gargoylesoftware.htmlunit.html.HtmlBreak; import com.gargoylesoftware.htmlunit.html.HtmlCenter; import com.gargoylesoftware.htmlunit.html.HtmlCitation; import com.gargoylesoftware.htmlunit.html.HtmlCode; @@ -110,6 +112,7 @@ import com.gargoylesoftware.htmlunit.html.HtmlUnderlined; import com.gargoylesoftware.htmlunit.html.HtmlVariable; import com.gargoylesoftware.htmlunit.html.HtmlWordBreak; +import com.gargoylesoftware.htmlunit.html.serializer.HtmlSerializerInnerOuterText; import com.gargoylesoftware.htmlunit.javascript.background.BackgroundJavaScriptFactory; import com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJob; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; @@ -715,18 +718,18 @@ public Object insertAdjacentElement(final String where, final Object insertedEle /** * Gets the innerText attribute. + * (see https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute) * @return the contents of this node as text */ @JsxGetter public String getInnerText() { - final StringBuilder buf = new StringBuilder(); - // we can't rely on DomNode.asXml because it adds indentation and new lines - printChildren(buf, getDomNodeOrDie(), false, false); - return buf.toString(); + final HtmlSerializerInnerOuterText ser = new HtmlSerializerInnerOuterText(); + return ser.asText(this.getDomNodeOrDie()); } /** * Replaces all child elements of this element with the supplied text value. + * (see https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute) * @param value the new value for the contents of this element */ @JsxSetter @@ -738,20 +741,19 @@ public void setInnerText(final Object value) { else { valueString = Context.toString(value); } - setInnerTextImpl(valueString); - } - /** - * The worker for setInnerText. - * @param value the new value for the contents of this node - */ - protected void setInnerTextImpl(final String value) { final DomNode domNode = getDomNodeOrDie(); - + final SgmlPage page = domNode.getPage(); domNode.removeAllChildren(); - if (value != null && !value.isEmpty()) { - domNode.appendChild(new DomText(domNode.getPage(), value)); + if (StringUtils.isNotEmpty(valueString)) { + final String[] parts = valueString.split("\\r?\\n"); + for (int i = 0; i < parts.length; i++) { + if (i != 0) { + domNode.appendChild(page.createElement(HtmlBreak.TAG_NAME)); + } + domNode.appendChild(new DomText(page, parts[i])); + } } } @@ -761,7 +763,15 @@ protected void setInnerTextImpl(final String value) { */ @Override public void setTextContent(final Object value) { - setInnerTextImpl(value == null ? null : Context.toString(value)); + final DomNode domNode = getDomNodeOrDie(); + domNode.removeAllChildren(); + + if (value != null) { + final String textValue = Context.toString(value); + if (StringUtils.isNotEmpty(textValue)) { + domNode.appendChild(new DomText(domNode.getPage(), textValue)); + } + } } /** @@ -1979,18 +1989,9 @@ public ClientRect getBoundingClientRect() { * @return the token list of class attribute */ @Override - @JsxGetter + @JsxGetter(IE) public DOMTokenList getClassList() { - return new DOMTokenList(this, "class"); - } - - /** - * {@inheritDoc} Overridden to modify browser configurations. - */ - @Override - @JsxFunction - public boolean hasAttribute(final String name) { - return super.hasAttribute(name); + return super.getClassList(); } /** @@ -2477,7 +2478,7 @@ public Object getOncontextmenu() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnresize(final Object handler) { - setEventHandler("resize", handler); + setEventHandler(Event.TYPE_RESIZE, handler); } /** @@ -2486,7 +2487,7 @@ public void setOnresize(final Object handler) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnresize() { - return getEventHandler("resize"); + return getEventHandler(Event.TYPE_RESIZE); } /** @@ -2581,7 +2582,7 @@ public void setId(final String newId) { */ @JsxGetter public Function getOnabort() { - return getEventHandler("abort"); + return getEventHandler(Event.TYPE_ABORT); } /** @@ -2590,7 +2591,7 @@ public Function getOnabort() { */ @JsxSetter public void setOnabort(final Object onabort) { - setEventHandler("abort", onabort); + setEventHandler(Event.TYPE_ABORT, onabort); } /** @@ -2599,7 +2600,7 @@ public void setOnabort(final Object onabort) { */ @JsxGetter({CHROME, EDGE}) public Function getOnauxclick() { - return getEventHandler("auxclick"); + return getEventHandler(Event.TYPE_AUXCLICK); } /** @@ -2608,7 +2609,7 @@ public Function getOnauxclick() { */ @JsxSetter({CHROME, EDGE}) public void setOnauxclick(final Object onauxclick) { - setEventHandler("auxclick", onauxclick); + setEventHandler(Event.TYPE_AUXCLICK, onauxclick); } /** @@ -2617,7 +2618,7 @@ public void setOnauxclick(final Object onauxclick) { */ @JsxGetter({CHROME, EDGE}) public Function getOncancel() { - return getEventHandler("cancel"); + return getEventHandler(Event.TYPE_CANCEL); } /** @@ -2626,7 +2627,7 @@ public Function getOncancel() { */ @JsxSetter({CHROME, EDGE}) public void setOncancel(final Object oncancel) { - setEventHandler("cancel", oncancel); + setEventHandler(Event.TYPE_CANCEL, oncancel); } /** @@ -2635,7 +2636,7 @@ public void setOncancel(final Object oncancel) { */ @JsxGetter public Function getOncanplay() { - return getEventHandler("canplay"); + return getEventHandler(Event.TYPE_CANPLAY); } /** @@ -2644,7 +2645,7 @@ public Function getOncanplay() { */ @JsxSetter public void setOncanplay(final Object oncanplay) { - setEventHandler("canplay", oncanplay); + setEventHandler(Event.TYPE_CANPLAY, oncanplay); } /** @@ -2653,7 +2654,7 @@ public void setOncanplay(final Object oncanplay) { */ @JsxGetter public Function getOncanplaythrough() { - return getEventHandler("canplaythrough"); + return getEventHandler(Event.TYPE_CANPLAYTHROUGH); } /** @@ -2662,7 +2663,7 @@ public Function getOncanplaythrough() { */ @JsxSetter public void setOncanplaythrough(final Object oncanplaythrough) { - setEventHandler("canplaythrough", oncanplaythrough); + setEventHandler(Event.TYPE_CANPLAYTHROUGH, oncanplaythrough); } /** @@ -2687,18 +2688,18 @@ public void setOnclose(final Object onclose) { * Returns the {@code oncuechange} event handler for this element. * @return the {@code oncuechange} event handler for this element */ - @JsxGetter({CHROME, EDGE, IE}) + @JsxGetter public Function getOncuechange() { - return getEventHandler("cuechange"); + return getEventHandler(Event.TYPE_CUECHANGE); } /** * Sets the {@code oncuechange} event handler for this element. * @param oncuechange the {@code oncuechange} event handler for this element */ - @JsxSetter({CHROME, EDGE, IE}) + @JsxSetter public void setOncuechange(final Object oncuechange) { - setEventHandler("cuechange", oncuechange); + setEventHandler(Event.TYPE_CUECHANGE, oncuechange); } /** @@ -2707,7 +2708,7 @@ public void setOncuechange(final Object oncuechange) { */ @JsxGetter public Function getOndrag() { - return getEventHandler("drag"); + return getEventHandler(Event.TYPE_DRAG); } /** @@ -2716,7 +2717,7 @@ public Function getOndrag() { */ @JsxSetter public void setOndrag(final Object ondrag) { - setEventHandler("drag", ondrag); + setEventHandler(Event.TYPE_DRAG, ondrag); } /** @@ -2725,7 +2726,7 @@ public void setOndrag(final Object ondrag) { */ @JsxGetter public Function getOndragend() { - return getEventHandler("dragend"); + return getEventHandler(Event.TYPE_DRAGEND); } /** @@ -2734,7 +2735,7 @@ public Function getOndragend() { */ @JsxSetter public void setOndragend(final Object ondragend) { - setEventHandler("dragend", ondragend); + setEventHandler(Event.TYPE_DRAGEND, ondragend); } /** @@ -2743,7 +2744,7 @@ public void setOndragend(final Object ondragend) { */ @JsxGetter public Function getOndragenter() { - return getEventHandler("dragenter"); + return getEventHandler(Event.TYPE_DRAGENTER); } /** @@ -2752,7 +2753,7 @@ public Function getOndragenter() { */ @JsxSetter public void setOndragenter(final Object ondragenter) { - setEventHandler("dragenter", ondragenter); + setEventHandler(Event.TYPE_DRAGENTER, ondragenter); } /** @@ -2761,7 +2762,7 @@ public void setOndragenter(final Object ondragenter) { */ @JsxGetter public Function getOndragleave() { - return getEventHandler("dragleave"); + return getEventHandler(Event.TYPE_DRAGLEAVE); } /** @@ -2770,7 +2771,7 @@ public Function getOndragleave() { */ @JsxSetter public void setOndragleave(final Object ondragleave) { - setEventHandler("dragleave", ondragleave); + setEventHandler(Event.TYPE_DRAGLEAVE, ondragleave); } /** @@ -2779,7 +2780,7 @@ public void setOndragleave(final Object ondragleave) { */ @JsxGetter public Function getOndragover() { - return getEventHandler("dragover"); + return getEventHandler(Event.TYPE_DRAGOVER); } /** @@ -2788,7 +2789,7 @@ public Function getOndragover() { */ @JsxSetter public void setOndragover(final Object ondragover) { - setEventHandler("dragover", ondragover); + setEventHandler(Event.TYPE_DRAGOVER, ondragover); } /** @@ -2797,7 +2798,7 @@ public void setOndragover(final Object ondragover) { */ @JsxGetter public Function getOndragstart() { - return getEventHandler("dragstart"); + return getEventHandler(Event.TYPE_DRAGSTART); } /** @@ -2806,7 +2807,7 @@ public Function getOndragstart() { */ @JsxSetter public void setOndragstart(final Object ondragstart) { - setEventHandler("dragstart", ondragstart); + setEventHandler(Event.TYPE_DRAGSTART, ondragstart); } /** @@ -2815,7 +2816,7 @@ public void setOndragstart(final Object ondragstart) { */ @JsxGetter public Function getOndrop() { - return getEventHandler("drop"); + return getEventHandler(Event.TYPE_DROP); } /** @@ -2824,7 +2825,7 @@ public Function getOndrop() { */ @JsxSetter public void setOndrop(final Object ondrop) { - setEventHandler("drop", ondrop); + setEventHandler(Event.TYPE_DROP, ondrop); } /** @@ -2833,7 +2834,7 @@ public void setOndrop(final Object ondrop) { */ @JsxGetter public Function getOndurationchange() { - return getEventHandler("durationchange"); + return getEventHandler(Event.TYPE_DURATIONCHANGE); } /** @@ -2842,7 +2843,7 @@ public Function getOndurationchange() { */ @JsxSetter public void setOndurationchange(final Object ondurationchange) { - setEventHandler("durationchange", ondurationchange); + setEventHandler(Event.TYPE_DURATIONCHANGE, ondurationchange); } /** @@ -2851,7 +2852,7 @@ public void setOndurationchange(final Object ondurationchange) { */ @JsxGetter public Function getOnemptied() { - return getEventHandler("emptied"); + return getEventHandler(Event.TYPE_EMPTIED); } /** @@ -2860,7 +2861,7 @@ public Function getOnemptied() { */ @JsxSetter public void setOnemptied(final Object onemptied) { - setEventHandler("emptied", onemptied); + setEventHandler(Event.TYPE_EMPTIED, onemptied); } /** @@ -2869,7 +2870,7 @@ public void setOnemptied(final Object onemptied) { */ @JsxGetter public Function getOnended() { - return getEventHandler("ended"); + return getEventHandler(Event.TYPE_ENDED); } /** @@ -2878,7 +2879,7 @@ public Function getOnended() { */ @JsxSetter public void setOnended(final Object onended) { - setEventHandler("ended", onended); + setEventHandler(Event.TYPE_ENDED, onended); } /** @@ -2886,9 +2887,9 @@ public void setOnended(final Object onended) { * @return the {@code ongotpointercapture} event handler for this element */ @Override - @JsxGetter({CHROME, EDGE}) + @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOngotpointercapture() { - return getEventHandler("gotpointercapture"); + return getEventHandler(Event.TYPE_GOTPOINTERCAPTURE); } /** @@ -2896,9 +2897,9 @@ public Function getOngotpointercapture() { * @param ongotpointercapture the {@code ongotpointercapture} event handler for this element */ @Override - @JsxSetter({CHROME, EDGE}) + @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOngotpointercapture(final Object ongotpointercapture) { - setEventHandler("gotpointercapture", ongotpointercapture); + setEventHandler(Event.TYPE_GOTPOINTERCAPTURE, ongotpointercapture); } /** @@ -2907,7 +2908,7 @@ public void setOngotpointercapture(final Object ongotpointercapture) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOninvalid() { - return getEventHandler("invalid"); + return getEventHandler(Event.TYPE_INVALID); } /** @@ -2916,7 +2917,7 @@ public Function getOninvalid() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOninvalid(final Object oninvalid) { - setEventHandler("invalid", oninvalid); + setEventHandler(Event.TYPE_INVALID, oninvalid); } /** @@ -2924,7 +2925,11 @@ public void setOninvalid(final Object oninvalid) { * @return the {@code onload} event handler for this element */ @JsxGetter - public Function getOnload() { + public Object getOnload() { + if (this instanceof HTMLBodyElement) { + return getWindow().getEventHandler(Event.TYPE_LOAD); + } + return getEventHandler(Event.TYPE_LOAD); } @@ -2934,6 +2939,11 @@ public Function getOnload() { */ @JsxSetter public void setOnload(final Object onload) { + if (this instanceof HTMLBodyElement) { + getWindow().setEventHandler(Event.TYPE_LOAD, onload); + return; + } + setEventHandler(Event.TYPE_LOAD, onload); } @@ -2943,7 +2953,7 @@ public void setOnload(final Object onload) { */ @JsxGetter public Function getOnloadeddata() { - return getEventHandler("loadeddata"); + return getEventHandler(Event.TYPE_LOADEDDATA); } /** @@ -2952,7 +2962,7 @@ public Function getOnloadeddata() { */ @JsxSetter public void setOnloadeddata(final Object onloadeddata) { - setEventHandler("loadeddata", onloadeddata); + setEventHandler(Event.TYPE_LOADEDDATA, onloadeddata); } /** @@ -2961,7 +2971,7 @@ public void setOnloadeddata(final Object onloadeddata) { */ @JsxGetter public Function getOnloadedmetadata() { - return getEventHandler("loadedmetadata"); + return getEventHandler(Event.TYPE_LOADEDMETADATA); } /** @@ -2970,7 +2980,7 @@ public Function getOnloadedmetadata() { */ @JsxSetter public void setOnloadedmetadata(final Object onloadedmetadata) { - setEventHandler("loadedmetadata", onloadedmetadata); + setEventHandler(Event.TYPE_LOADEDMETADATA, onloadedmetadata); } /** @@ -2979,7 +2989,7 @@ public void setOnloadedmetadata(final Object onloadedmetadata) { */ @JsxGetter public Function getOnloadstart() { - return getEventHandler("loadstart"); + return getEventHandler(Event.TYPE_LOAD_START); } /** @@ -2988,7 +2998,7 @@ public Function getOnloadstart() { */ @JsxSetter public void setOnloadstart(final Object onloadstart) { - setEventHandler("loadstart", onloadstart); + setEventHandler(Event.TYPE_LOAD_START, onloadstart); } /** @@ -2998,7 +3008,7 @@ public void setOnloadstart(final Object onloadstart) { @Override @JsxGetter({CHROME, EDGE}) public Function getOnlostpointercapture() { - return getEventHandler("lostpointercapture"); + return getEventHandler(Event.TYPE_LOSTPOINTERCAPTURE); } /** @@ -3008,7 +3018,7 @@ public Function getOnlostpointercapture() { @Override @JsxSetter({CHROME, EDGE}) public void setOnlostpointercapture(final Object onlostpointercapture) { - setEventHandler("lostpointercapture", onlostpointercapture); + setEventHandler(Event.TYPE_LOSTPOINTERCAPTURE, onlostpointercapture); } /** @@ -3017,7 +3027,7 @@ public void setOnlostpointercapture(final Object onlostpointercapture) { */ @JsxGetter public Function getOnmouseenter() { - return getEventHandler("mouseenter"); + return getEventHandler(Event.TYPE_MOUDEENTER); } /** @@ -3026,7 +3036,7 @@ public Function getOnmouseenter() { */ @JsxSetter public void setOnmouseenter(final Object onmouseenter) { - setEventHandler("mouseenter", onmouseenter); + setEventHandler(Event.TYPE_MOUDEENTER, onmouseenter); } /** @@ -3035,7 +3045,7 @@ public void setOnmouseenter(final Object onmouseenter) { */ @JsxGetter public Function getOnmouseleave() { - return getEventHandler("mouseleave"); + return getEventHandler(Event.TYPE_MOUSELEAVE); } /** @@ -3044,7 +3054,7 @@ public Function getOnmouseleave() { */ @JsxSetter public void setOnmouseleave(final Object onmouseleave) { - setEventHandler("mouseleave", onmouseleave); + setEventHandler(Event.TYPE_MOUSELEAVE, onmouseleave); } /** @@ -3053,7 +3063,7 @@ public void setOnmouseleave(final Object onmouseleave) { */ @JsxGetter({CHROME, EDGE, IE}) public Function getOnmousewheel() { - return getEventHandler("mousewheel"); + return getEventHandler(Event.TYPE_MOUSEWHEEL); } /** @@ -3062,7 +3072,7 @@ public Function getOnmousewheel() { */ @JsxSetter({CHROME, EDGE, IE}) public void setOnmousewheel(final Object onmousewheel) { - setEventHandler("mousewheel", onmousewheel); + setEventHandler(Event.TYPE_MOUSEWHEEL, onmousewheel); } /** @@ -3071,7 +3081,7 @@ public void setOnmousewheel(final Object onmousewheel) { */ @JsxGetter public Function getOnpause() { - return getEventHandler("pause"); + return getEventHandler(Event.TYPE_PAUSE); } /** @@ -3080,7 +3090,7 @@ public Function getOnpause() { */ @JsxSetter public void setOnpause(final Object onpause) { - setEventHandler("pause", onpause); + setEventHandler(Event.TYPE_PAUSE, onpause); } /** @@ -3089,7 +3099,7 @@ public void setOnpause(final Object onpause) { */ @JsxGetter public Function getOnplay() { - return getEventHandler("play"); + return getEventHandler(Event.TYPE_PLAY); } /** @@ -3098,7 +3108,7 @@ public Function getOnplay() { */ @JsxSetter public void setOnplay(final Object onplay) { - setEventHandler("play", onplay); + setEventHandler(Event.TYPE_PLAY, onplay); } /** @@ -3107,7 +3117,7 @@ public void setOnplay(final Object onplay) { */ @JsxGetter public Function getOnplaying() { - return getEventHandler("playing"); + return getEventHandler(Event.TYPE_PLAYNG); } /** @@ -3116,7 +3126,7 @@ public Function getOnplaying() { */ @JsxSetter public void setOnplaying(final Object onplaying) { - setEventHandler("playing", onplaying); + setEventHandler(Event.TYPE_PLAYNG, onplaying); } /** @@ -3124,9 +3134,9 @@ public void setOnplaying(final Object onplaying) { * @return the {@code onpointercancel} event handler for this element */ @Override - @JsxGetter({CHROME, EDGE}) + @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnpointercancel() { - return getEventHandler("pointercancel"); + return getEventHandler(Event.TYPE_POINTERCANCEL); } /** @@ -3134,9 +3144,9 @@ public Function getOnpointercancel() { * @param onpointercancel the {@code onpointercancel} event handler for this element */ @Override - @JsxSetter({CHROME, EDGE}) + @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnpointercancel(final Object onpointercancel) { - setEventHandler("pointercancel", onpointercancel); + setEventHandler(Event.TYPE_POINTERCANCEL, onpointercancel); } /** @@ -3144,9 +3154,9 @@ public void setOnpointercancel(final Object onpointercancel) { * @return the {@code onpointerdown} event handler for this element */ @Override - @JsxGetter({CHROME, EDGE}) + @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnpointerdown() { - return getEventHandler("pointerdown"); + return getEventHandler(Event.TYPE_POINTERDOWN); } /** @@ -3154,9 +3164,9 @@ public Function getOnpointerdown() { * @param onpointerdown the {@code onpointerdown} event handler for this element */ @Override - @JsxSetter({CHROME, EDGE}) + @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnpointerdown(final Object onpointerdown) { - setEventHandler("pointerdown", onpointerdown); + setEventHandler(Event.TYPE_POINTERDOWN, onpointerdown); } /** @@ -3164,9 +3174,9 @@ public void setOnpointerdown(final Object onpointerdown) { * @return the {@code onpointerenter} event handler for this element */ @Override - @JsxGetter({CHROME, EDGE}) + @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnpointerenter() { - return getEventHandler("pointerenter"); + return getEventHandler(Event.TYPE_POINTERENTER); } /** @@ -3174,9 +3184,9 @@ public Function getOnpointerenter() { * @param onpointerenter the {@code onpointerenter} event handler for this element */ @Override - @JsxSetter({CHROME, EDGE}) + @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnpointerenter(final Object onpointerenter) { - setEventHandler("pointerenter", onpointerenter); + setEventHandler(Event.TYPE_POINTERENTER, onpointerenter); } /** @@ -3184,9 +3194,9 @@ public void setOnpointerenter(final Object onpointerenter) { * @return the {@code onpointerleave} event handler for this element */ @Override - @JsxGetter({CHROME, EDGE}) + @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnpointerleave() { - return getEventHandler("pointerleave"); + return getEventHandler(Event.TYPE_POINTERLEAVE); } /** @@ -3194,9 +3204,9 @@ public Function getOnpointerleave() { * @param onpointerleave the {@code onpointerleave} event handler for this element */ @Override - @JsxSetter({CHROME, EDGE}) + @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnpointerleave(final Object onpointerleave) { - setEventHandler("pointerleave", onpointerleave); + setEventHandler(Event.TYPE_POINTERLEAVE, onpointerleave); } /** @@ -3204,9 +3214,9 @@ public void setOnpointerleave(final Object onpointerleave) { * @return the {@code onpointermove} event handler for this element */ @Override - @JsxGetter({CHROME, EDGE}) + @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnpointermove() { - return getEventHandler("pointermove"); + return getEventHandler(Event.TYPE_POINTERMOVE); } /** @@ -3214,9 +3224,9 @@ public Function getOnpointermove() { * @param onpointermove the {@code onpointermove} event handler for this element */ @Override - @JsxSetter({CHROME, EDGE}) + @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnpointermove(final Object onpointermove) { - setEventHandler("pointermove", onpointermove); + setEventHandler(Event.TYPE_POINTERMOVE, onpointermove); } /** @@ -3224,9 +3234,9 @@ public void setOnpointermove(final Object onpointermove) { * @return the {@code onpointerout} event handler for this element */ @Override - @JsxGetter({CHROME, EDGE}) + @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnpointerout() { - return getEventHandler("pointerout"); + return getEventHandler(Event.TYPE_POINTEROUT); } /** @@ -3234,9 +3244,9 @@ public Function getOnpointerout() { * @param onpointerout the {@code onpointerout} event handler for this element */ @Override - @JsxSetter({CHROME, EDGE}) + @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnpointerout(final Object onpointerout) { - setEventHandler("pointerout", onpointerout); + setEventHandler(Event.TYPE_POINTEROUT, onpointerout); } /** @@ -3244,9 +3254,9 @@ public void setOnpointerout(final Object onpointerout) { * @return the {@code onpointerover} event handler for this element */ @Override - @JsxGetter({CHROME, EDGE}) + @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnpointerover() { - return getEventHandler("pointerover"); + return getEventHandler(Event.TYPE_POINTEROVER); } /** @@ -3254,9 +3264,9 @@ public Function getOnpointerover() { * @param onpointerover the {@code onpointerover} event handler for this element */ @Override - @JsxSetter({CHROME, EDGE}) + @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnpointerover(final Object onpointerover) { - setEventHandler("pointerover", onpointerover); + setEventHandler(Event.TYPE_POINTEROVER, onpointerover); } /** @@ -3264,9 +3274,9 @@ public void setOnpointerover(final Object onpointerover) { * @return the {@code onpointerup} event handler for this element */ @Override - @JsxGetter({CHROME, EDGE}) + @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnpointerup() { - return getEventHandler("pointerup"); + return getEventHandler(Event.TYPE_POINTERUP); } /** @@ -3274,9 +3284,9 @@ public Function getOnpointerup() { * @param onpointerup the {@code onpointerup} event handler for this element */ @Override - @JsxSetter({CHROME, EDGE}) + @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnpointerup(final Object onpointerup) { - setEventHandler("pointerup", onpointerup); + setEventHandler(Event.TYPE_POINTERUP, onpointerup); } /** @@ -3285,7 +3295,7 @@ public void setOnpointerup(final Object onpointerup) { */ @JsxGetter public Function getOnprogress() { - return getEventHandler("progress"); + return getEventHandler(Event.TYPE_PROGRESS); } /** @@ -3294,7 +3304,7 @@ public Function getOnprogress() { */ @JsxSetter public void setOnprogress(final Object onprogress) { - setEventHandler("progress", onprogress); + setEventHandler(Event.TYPE_PROGRESS, onprogress); } /** @@ -3303,7 +3313,7 @@ public void setOnprogress(final Object onprogress) { */ @JsxGetter public Function getOnratechange() { - return getEventHandler("ratechange"); + return getEventHandler(Event.TYPE_RATECHANGE); } /** @@ -3312,7 +3322,7 @@ public Function getOnratechange() { */ @JsxSetter public void setOnratechange(final Object onratechange) { - setEventHandler("ratechange", onratechange); + setEventHandler(Event.TYPE_RATECHANGE, onratechange); } /** @@ -3339,7 +3349,7 @@ public void setOnreset(final Object onreset) { */ @JsxGetter public Function getOnscroll() { - return getEventHandler("scroll"); + return getEventHandler(Event.TYPE_SCROLL); } /** @@ -3348,7 +3358,7 @@ public Function getOnscroll() { */ @JsxSetter public void setOnscroll(final Object onscroll) { - setEventHandler("scroll", onscroll); + setEventHandler(Event.TYPE_SCROLL, onscroll); } /** @@ -3357,7 +3367,7 @@ public void setOnscroll(final Object onscroll) { */ @JsxGetter public Function getOnseeked() { - return getEventHandler("seeked"); + return getEventHandler(Event.TYPE_SEEKED); } /** @@ -3366,7 +3376,7 @@ public Function getOnseeked() { */ @JsxSetter public void setOnseeked(final Object onseeked) { - setEventHandler("seeked", onseeked); + setEventHandler(Event.TYPE_SEEKED, onseeked); } /** @@ -3375,7 +3385,7 @@ public void setOnseeked(final Object onseeked) { */ @JsxGetter public Function getOnseeking() { - return getEventHandler("seeking"); + return getEventHandler(Event.TYPE_SEEKING); } /** @@ -3384,7 +3394,7 @@ public Function getOnseeking() { */ @JsxSetter public void setOnseeking(final Object onseeking) { - setEventHandler("seeking", onseeking); + setEventHandler(Event.TYPE_SEEKING, onseeking); } /** @@ -3393,7 +3403,7 @@ public void setOnseeking(final Object onseeking) { */ @JsxGetter public Function getOnselect() { - return getEventHandler("select"); + return getEventHandler(Event.TYPE_SELECT); } /** @@ -3402,25 +3412,25 @@ public Function getOnselect() { */ @JsxSetter public void setOnselect(final Object onselect) { - setEventHandler("select", onselect); + setEventHandler(Event.TYPE_SELECT, onselect); } /** * Returns the {@code onshow} event handler for this element. * @return the {@code onshow} event handler for this element */ - @JsxGetter({FF, FF78}) + @JsxGetter(FF78) public Function getOnshow() { - return getEventHandler("show"); + return getEventHandler(Event.TYPE_SHOW); } /** * Sets the {@code onshow} event handler for this element. * @param onshow the {@code onshow} event handler for this element */ - @JsxSetter({FF, FF78}) + @JsxSetter(FF78) public void setOnshow(final Object onshow) { - setEventHandler("show", onshow); + setEventHandler(Event.TYPE_SHOW, onshow); } /** @@ -3429,7 +3439,7 @@ public void setOnshow(final Object onshow) { */ @JsxGetter public Function getOnstalled() { - return getEventHandler("stalled"); + return getEventHandler(Event.TYPE_STALLED); } /** @@ -3438,7 +3448,7 @@ public Function getOnstalled() { */ @JsxSetter public void setOnstalled(final Object onstalled) { - setEventHandler("stalled", onstalled); + setEventHandler(Event.TYPE_STALLED, onstalled); } /** @@ -3447,7 +3457,7 @@ public void setOnstalled(final Object onstalled) { */ @JsxGetter public Function getOnsuspend() { - return getEventHandler("suspend"); + return getEventHandler(Event.TYPE_SUSPEND); } /** @@ -3456,7 +3466,7 @@ public Function getOnsuspend() { */ @JsxSetter public void setOnsuspend(final Object onsuspend) { - setEventHandler("suspend", onsuspend); + setEventHandler(Event.TYPE_SUSPEND, onsuspend); } /** @@ -3465,7 +3475,7 @@ public void setOnsuspend(final Object onsuspend) { */ @JsxGetter public Function getOntimeupdate() { - return getEventHandler("timeupdate"); + return getEventHandler(Event.TYPE_TIMEUPDATE); } /** @@ -3474,25 +3484,25 @@ public Function getOntimeupdate() { */ @JsxSetter public void setOntimeupdate(final Object ontimeupdate) { - setEventHandler("timeupdate", ontimeupdate); + setEventHandler(Event.TYPE_TIMEUPDATE, ontimeupdate); } /** * Returns the {@code ontoggle} event handler for this element. * @return the {@code ontoggle} event handler for this element */ - @JsxGetter({CHROME, EDGE}) + @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOntoggle() { - return getEventHandler("toggle"); + return getEventHandler(Event.TYPE_TOGGLE); } /** * Sets the {@code ontoggle} event handler for this element. * @param ontoggle the {@code ontoggle} event handler for this element */ - @JsxSetter({CHROME, EDGE}) + @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOntoggle(final Object ontoggle) { - setEventHandler("toggle", ontoggle); + setEventHandler(Event.TYPE_TOGGLE, ontoggle); } /** @@ -3501,7 +3511,7 @@ public void setOntoggle(final Object ontoggle) { */ @JsxGetter public Function getOnvolumechange() { - return getEventHandler("volumechange"); + return getEventHandler(Event.TYPE_VOLUMECHANGE); } /** @@ -3510,7 +3520,7 @@ public Function getOnvolumechange() { */ @JsxSetter public void setOnvolumechange(final Object onvolumechange) { - setEventHandler("volumechange", onvolumechange); + setEventHandler(Event.TYPE_VOLUMECHANGE, onvolumechange); } /** @@ -3519,7 +3529,7 @@ public void setOnvolumechange(final Object onvolumechange) { */ @JsxGetter public Function getOnwaiting() { - return getEventHandler("waiting"); + return getEventHandler(Event.TYPE_WAITING); } /** @@ -3528,67 +3538,61 @@ public Function getOnwaiting() { */ @JsxSetter public void setOnwaiting(final Object onwaiting) { - setEventHandler("waiting", onwaiting); + setEventHandler(Event.TYPE_WAITING, onwaiting); } /** * Returns the {@code oncopy} event handler for this element. * @return the {@code oncopy} event handler for this element */ - @Override - @JsxGetter({FF, FF78, IE}) + @JsxGetter public Function getOncopy() { - return getEventHandler("copy"); + return getEventHandler(Event.TYPE_COPY); } /** * Sets the {@code oncopy} event handler for this element. * @param oncopy the {@code oncopy} event handler for this element */ - @Override - @JsxSetter({FF, FF78, IE}) + @JsxSetter public void setOncopy(final Object oncopy) { - setEventHandler("copy", oncopy); + setEventHandler(Event.TYPE_COPY, oncopy); } /** * Returns the {@code oncut} event handler for this element. * @return the {@code oncut} event handler for this element */ - @Override - @JsxGetter({FF, FF78, IE}) + @JsxGetter public Function getOncut() { - return getEventHandler("cut"); + return getEventHandler(Event.TYPE_CUT); } /** * Sets the {@code oncut} event handler for this element. * @param oncut the {@code oncut} event handler for this element */ - @Override - @JsxSetter({FF, FF78, IE}) + @JsxSetter public void setOncut(final Object oncut) { - setEventHandler("cut", oncut); + setEventHandler(Event.TYPE_CUT, oncut); } /** * Returns the {@code onpaste} event handler for this element. * @return the {@code onpaste} event handler for this element */ - @Override - @JsxGetter({FF, FF78, IE}) + @JsxGetter public Function getOnpaste() { - return getEventHandler("paste"); + return getEventHandler(Event.TYPE_PASTE); } /** * Sets the {@code onpaste} event handler for this element. * @param onpaste the {@code onpaste} event handler for this element */ - @Override - @JsxSetter({FF, FF78, IE}) + @JsxSetter public void setOnpaste(final Object onpaste) { - setEventHandler("paste", onpaste); + setEventHandler(Event.TYPE_PASTE, onpaste); } /** @@ -3597,7 +3601,7 @@ public void setOnpaste(final Object onpaste) { */ @JsxGetter({FF, FF78}) public Function getOnmozfullscreenchange() { - return getEventHandler("mozfullscreenchange"); + return getEventHandler(Event.TYPE_MOZFULLSCREENCHANGE); } /** @@ -3606,7 +3610,7 @@ public Function getOnmozfullscreenchange() { */ @JsxSetter({FF, FF78}) public void setOnmozfullscreenchange(final Object onmozfullscreenchange) { - setEventHandler("mozfullscreenchange", onmozfullscreenchange); + setEventHandler(Event.TYPE_MOZFULLSCREENCHANGE, onmozfullscreenchange); } /** @@ -3615,7 +3619,7 @@ public void setOnmozfullscreenchange(final Object onmozfullscreenchange) { */ @JsxGetter({FF, FF78}) public Function getOnmozfullscreenerror() { - return getEventHandler("mozfullscreenerror"); + return getEventHandler(Event.TYPE_MOZFULLSCREENERROR); } /** @@ -3624,7 +3628,7 @@ public Function getOnmozfullscreenerror() { */ @JsxSetter({FF, FF78}) public void setOnmozfullscreenerror(final Object onmozfullscreenerror) { - setEventHandler("mozfullscreenerror", onmozfullscreenerror); + setEventHandler(Event.TYPE_MOZFULLSCREENERROR, onmozfullscreenerror); } /** @@ -3633,7 +3637,7 @@ public void setOnmozfullscreenerror(final Object onmozfullscreenerror) { */ @JsxGetter(IE) public Function getOnactivate() { - return getEventHandler("activate"); + return getEventHandler(Event.TYPE_ACTIVATE); } /** @@ -3642,7 +3646,7 @@ public Function getOnactivate() { */ @JsxSetter(IE) public void setOnactivate(final Object onactivate) { - setEventHandler("activate", onactivate); + setEventHandler(Event.TYPE_ACTIVATE, onactivate); } /** @@ -3651,7 +3655,7 @@ public void setOnactivate(final Object onactivate) { */ @JsxGetter(IE) public Function getOnbeforeactivate() { - return getEventHandler("beforeactivate"); + return getEventHandler(Event.TYPE_BEFOREACTIVATE); } /** @@ -3660,7 +3664,7 @@ public Function getOnbeforeactivate() { */ @JsxSetter(IE) public void setOnbeforeactivate(final Object onbeforeactivate) { - setEventHandler("beforeactivate", onbeforeactivate); + setEventHandler(Event.TYPE_BEFOREACTIVATE, onbeforeactivate); } /** @@ -3670,7 +3674,7 @@ public void setOnbeforeactivate(final Object onbeforeactivate) { @Override @JsxGetter(IE) public Function getOnbeforecopy() { - return getEventHandler("beforecopy"); + return getEventHandler(Event.TYPE_BEFORECOPY); } /** @@ -3680,7 +3684,7 @@ public Function getOnbeforecopy() { @Override @JsxSetter(IE) public void setOnbeforecopy(final Object onbeforecopy) { - setEventHandler("beforecopy", onbeforecopy); + setEventHandler(Event.TYPE_BEFORECOPY, onbeforecopy); } /** @@ -3690,7 +3694,7 @@ public void setOnbeforecopy(final Object onbeforecopy) { @Override @JsxGetter(IE) public Function getOnbeforecut() { - return getEventHandler("beforecut"); + return getEventHandler(Event.TYPE_BEFORECUT); } /** @@ -3700,7 +3704,7 @@ public Function getOnbeforecut() { @Override @JsxSetter(IE) public void setOnbeforecut(final Object onbeforecut) { - setEventHandler("beforecut", onbeforecut); + setEventHandler(Event.TYPE_BEFORECUT, onbeforecut); } /** @@ -3709,7 +3713,7 @@ public void setOnbeforecut(final Object onbeforecut) { */ @JsxGetter(IE) public Function getOnbeforedeactivate() { - return getEventHandler("beforedeactivate"); + return getEventHandler(Event.TYPE_BEFOREDEACTIVATE); } /** @@ -3718,7 +3722,7 @@ public Function getOnbeforedeactivate() { */ @JsxSetter(IE) public void setOnbeforedeactivate(final Object onbeforedeactivate) { - setEventHandler("beforedeactivate", onbeforedeactivate); + setEventHandler(Event.TYPE_BEFOREDEACTIVATE, onbeforedeactivate); } /** @@ -3728,7 +3732,7 @@ public void setOnbeforedeactivate(final Object onbeforedeactivate) { @Override @JsxGetter(IE) public Function getOnbeforepaste() { - return getEventHandler("beforepaste"); + return getEventHandler(Event.TYPE_BEFOREPASTE); } /** @@ -3738,7 +3742,7 @@ public Function getOnbeforepaste() { @Override @JsxSetter(IE) public void setOnbeforepaste(final Object onbeforepaste) { - setEventHandler("beforepaste", onbeforepaste); + setEventHandler(Event.TYPE_BEFOREPASTE, onbeforepaste); } /** @@ -3747,7 +3751,7 @@ public void setOnbeforepaste(final Object onbeforepaste) { */ @JsxGetter(IE) public Function getOndeactivate() { - return getEventHandler("deactivate"); + return getEventHandler(Event.TYPE_DEACTIVATE); } /** @@ -3756,7 +3760,7 @@ public Function getOndeactivate() { */ @JsxSetter(IE) public void setOndeactivate(final Object ondeactivate) { - setEventHandler("deactivate", ondeactivate); + setEventHandler(Event.TYPE_DEACTIVATE, ondeactivate); } /** @@ -3765,7 +3769,7 @@ public void setOndeactivate(final Object ondeactivate) { */ @JsxGetter(IE) public Function getOnhelp() { - return getEventHandler("help"); + return getEventHandler(Event.TYPE_HELP); } /** @@ -3774,7 +3778,7 @@ public Function getOnhelp() { */ @JsxSetter(IE) public void setOnhelp(final Object onhelp) { - setEventHandler("help", onhelp); + setEventHandler(Event.TYPE_HELP, onhelp); } /** @@ -3783,7 +3787,7 @@ public void setOnhelp(final Object onhelp) { */ @JsxGetter(IE) public Function getOnmscontentzoom() { - return getEventHandler("mscontentzoom"); + return getEventHandler(Event.TYPE_MSCONTENTZOOM); } /** @@ -3792,7 +3796,7 @@ public Function getOnmscontentzoom() { */ @JsxSetter(IE) public void setOnmscontentzoom(final Object onmscontentzoom) { - setEventHandler("mscontentzoom", onmscontentzoom); + setEventHandler(Event.TYPE_MSCONTENTZOOM, onmscontentzoom); } /** @@ -3801,7 +3805,7 @@ public void setOnmscontentzoom(final Object onmscontentzoom) { */ @JsxGetter(IE) public Function getOnmsmanipulationstatechanged() { - return getEventHandler("msmanipulationstatechanged"); + return getEventHandler(Event.TYPE_MSMANIPULATIONSTATECHANGED); } /** @@ -3810,27 +3814,25 @@ public Function getOnmsmanipulationstatechanged() { */ @JsxSetter(IE) public void setOnmsmanipulationstatechanged(final Object onmsmanipulationstatechanged) { - setEventHandler("msmanipulationstatechanged", onmsmanipulationstatechanged); + setEventHandler(Event.TYPE_MSMANIPULATIONSTATECHANGED, onmsmanipulationstatechanged); } /** * Returns the {@code onselectstart} event handler for this element. * @return the {@code onselectstart} event handler for this element */ - @Override - @JsxGetter(IE) + @JsxGetter({CHROME, EDGE, IE}) public Function getOnselectstart() { - return getEventHandler("selectstart"); + return getEventHandler(Event.TYPE_SELECTSTART); } /** * Sets the {@code onselectstart} event handler for this element. * @param onselectstart the {@code onselectstart} event handler for this element */ - @Override - @JsxSetter(IE) + @JsxSetter({CHROME, EDGE, IE}) public void setOnselectstart(final Object onselectstart) { - setEventHandler("selectstart", onselectstart); + setEventHandler(Event.TYPE_SELECTSTART, onselectstart); } /** @@ -3868,4 +3870,166 @@ public Object getValue() { public void setValue(final Object newValue) { getDomNodeOrDie().setAttribute("value", Context.toString(newValue)); } + + /** + * Returns the {@code onanimationcancel} event handler. + * @return the {@code onanimationcancel} event handler + */ + @JsxGetter({FF, FF78}) + public Function getOnanimationcancel() { + return getEventHandler(Event.TYPE_ANIMATIONCANCEL); + } + + /** + * Sets the {@code onanimationcancel} event handler. + * @param onanimationcancel the {@code onanimationcancel} event handler + */ + @JsxSetter({FF, FF78}) + public void setOnanimationcancel(final Object onanimationcancel) { + setEventHandler(Event.TYPE_ANIMATIONCANCEL, onanimationcancel); + } + + /** + * Returns the {@code onanimationend} event handler. + * @return the {@code onanimationend} event handler + */ + @JsxGetter({CHROME, EDGE, FF, FF78}) + public Function getOnanimationend() { + return getEventHandler(Event.TYPE_ANIMATIONEND); + } + + /** + * Sets the {@code onanimationend} event handler. + * @param onanimationend the {@code onanimationend} event handler + */ + @JsxSetter({CHROME, EDGE, FF, FF78}) + public void setOnanimationend(final Object onanimationend) { + setEventHandler(Event.TYPE_ANIMATIONEND, onanimationend); + } + + /** + * Returns the {@code onanimationiteration} event handler. + * @return the {@code onanimationiteration} event handler + */ + @JsxGetter({CHROME, EDGE, FF, FF78}) + public Function getOnanimationiteration() { + return getEventHandler(Event.TYPE_ANIMATIONITERATION); + } + + /** + * Sets the {@code onanimationiteration} event handler. + * @param onanimationiteration the {@code onanimationiteration} event handler + */ + @JsxSetter({CHROME, EDGE, FF, FF78}) + public void setOnanimationiteration(final Object onanimationiteration) { + setEventHandler(Event.TYPE_ANIMATIONITERATION, onanimationiteration); + } + + /** + * Returns the {@code onanimationstart} event handler. + * @return the {@code onanimationstart} event handler + */ + @JsxGetter({CHROME, EDGE, FF, FF78}) + public Function getOnanimationstart() { + return getEventHandler(Event.TYPE_ANIMATIONSTART); + } + + /** + * Sets the {@code onanimationstart} event handler. + * @param onanimationstart the {@code onanimationstart} event handler + */ + @JsxSetter({CHROME, EDGE, FF, FF78}) + public void setOnanimationstart(final Object onanimationstart) { + setEventHandler(Event.TYPE_ANIMATIONSTART, onanimationstart); + } + + /** + * Returns the {@code onselectionchange} event handler for this element. + * @return the {@code onselectionchange} event handler for this element + */ + @JsxGetter({CHROME, EDGE}) + public Function getOnselectionchange() { + return getEventHandler(Event.TYPE_SELECTIONCHANGE); + } + + /** + * Sets the {@code onselectionchange} event handler for this element. + * @param onselectionchange the {@code onselectionchange} event handler for this element + */ + @JsxSetter({CHROME, EDGE}) + public void setOnselectionchange(final Object onselectionchange) { + setEventHandler(Event.TYPE_SELECTIONCHANGE, onselectionchange); + } + + /** + * Returns the {@code ontransitioncancel} event handler for this element. + * @return the {@code ontransitioncancel} event handler for this element + */ + @JsxGetter({CHROME, EDGE, FF, FF78}) + public Function getOntransitioncancel() { + return getEventHandler(Event.TYPE_ONTRANSITIONCANCEL); + } + + /** + * Sets the {@code ontransitioncancel} event handler for this element. + * @param ontransitioncancel the {@code ontransitioncancel} event handler for this element + */ + @JsxSetter({CHROME, EDGE, FF, FF78}) + public void setOntransitioncancel(final Object ontransitioncancel) { + setEventHandler(Event.TYPE_ONTRANSITIONCANCEL, ontransitioncancel); + } + + /** + * Returns the {@code ontransitionend} event handler for this element. + * @return the {@code ontransitionend} event handler for this element + */ + @JsxGetter({CHROME, EDGE, FF, FF78}) + public Function getOntransitionend() { + return getEventHandler(Event.TYPE_ONTRANSITIONEND); + } + + /** + * Sets the {@code ontransitionend} event handler for this element. + * @param ontransitionend the {@code ontransitionend} event handler for this element + */ + @JsxSetter({CHROME, EDGE, FF, FF78}) + public void setOntransitionend(final Object ontransitionend) { + setEventHandler(Event.TYPE_ONTRANSITIONEND, ontransitionend); + } + + /** + * Returns the {@code ontransitionrun} event handler for this element. + * @return the {@code ontransitionrun} event handler for this element + */ + @JsxGetter({CHROME, EDGE, FF, FF78}) + public Function getOntransitionrun() { + return getEventHandler(Event.TYPE_ONTRANSITIONRUN); + } + + /** + * Sets the {@code ontransitionrun} event handler for this element. + * @param ontransitionrun the {@code ontransitionrun} event handler for this element + */ + @JsxSetter({CHROME, EDGE, FF, FF78}) + public void setOntransitionrun(final Object ontransitionrun) { + setEventHandler(Event.TYPE_ONTRANSITIONRUN, ontransitionrun); + } + + /** + * Returns the {@code ontransitionstart} event handler for this element. + * @return the {@code ontransitionstart} event handler for this element + */ + @JsxGetter({CHROME, EDGE, FF, FF78}) + public Function getOntransitionstart() { + return getEventHandler(Event.TYPE_ONTRANSITIONSTART); + } + + /** + * Sets the {@code ontransitionstart} event handler for this element. + * @param ontransitionstart the {@code ontransitionstart} event handler for this element + */ + @JsxSetter({CHROME, EDGE, FF, FF78}) + public void setOntransitionstart(final Object ontransitionstart) { + setEventHandler(Event.TYPE_ONTRANSITIONSTART, ontransitionstart); + } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLEmbedElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLEmbedElement.java index f19d14cf2..c61b8466e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLEmbedElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLEmbedElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFieldSetElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFieldSetElement.java index 12d83775b..0a97cf7a5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFieldSetElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFieldSetElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFontElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFontElement.java index 6e4c90dc0..6cb5a054b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFontElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFontElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFormControlsCollection.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFormControlsCollection.java index ee8c88b9b..6eea2c9de 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFormControlsCollection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFormControlsCollection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFormElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFormElement.java index b6e94e7af..88b4d9f59 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFormElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFormElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -338,7 +338,7 @@ public void submit() { final boolean checkHash = !webClient.getBrowserVersion().hasFeature(FORM_SUBMISSION_DOWNLOWDS_ALSO_IF_ONLY_HASH_CHANGED); webClient.download(page.getEnclosingWindow(), - target, request, checkHash, forceDownload, "JS form.submit()"); + target, request, checkHash, forceDownload, false, "JS form.submit()"); } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFrameElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFrameElement.java index 1b0c16a07..96ed27b0f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFrameElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFrameElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFrameSetElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFrameSetElement.java index 520b4b50a..ec27ca709 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFrameSetElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFrameSetElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -175,7 +175,7 @@ public void setOnhashchange(final Object hashchange) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnlanguagechange() { - return getEventHandler("languagechange"); + return getEventHandler(Event.TYPE_LANGUAGECHANGE); } /** @@ -184,7 +184,7 @@ public Function getOnlanguagechange() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnlanguagechange(final Object languagechange) { - setEventHandler("languagechange", languagechange); + setEventHandler(Event.TYPE_LANGUAGECHANGE, languagechange); } /** @@ -211,7 +211,7 @@ public void setOnmessage(final Object message) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnmessageerror() { - return getEventHandler("onmessageerror"); + return getEventHandler(Event.TYPE_ONMESSAGEERROR); } /** @@ -220,7 +220,7 @@ public Function getOnmessageerror() { */ @JsxSetter({CHROME, EDGE}) public void setOnmessageerror(final Object onmessageerror) { - setEventHandler("onmessageerror", onmessageerror); + setEventHandler(Event.TYPE_ONMESSAGEERROR, onmessageerror); } /** @@ -229,7 +229,7 @@ public void setOnmessageerror(final Object onmessageerror) { */ @JsxGetter public Function getOnoffline() { - return getEventHandler("offline"); + return getEventHandler(Event.TYPE_OFFLINE); } /** @@ -238,7 +238,7 @@ public Function getOnoffline() { */ @JsxSetter public void setOnoffline(final Object offline) { - setEventHandler("offline", offline); + setEventHandler(Event.TYPE_OFFLINE, offline); } /** @@ -247,7 +247,7 @@ public void setOnoffline(final Object offline) { */ @JsxGetter public Function getOnonline() { - return getEventHandler("online"); + return getEventHandler(Event.TYPE_ONLINE); } /** @@ -256,7 +256,7 @@ public Function getOnonline() { */ @JsxSetter public void setOnonline(final Object online) { - setEventHandler("online", online); + setEventHandler(Event.TYPE_ONLINE, online); } /** @@ -265,7 +265,7 @@ public void setOnonline(final Object online) { */ @JsxGetter public Function getOnpagehide() { - return getEventHandler("pagehide"); + return getEventHandler(Event.TYPE_PAGEHIDE); } /** @@ -274,7 +274,7 @@ public Function getOnpagehide() { */ @JsxSetter public void setOnpagehide(final Object pagehide) { - setEventHandler("pagehide", pagehide); + setEventHandler(Event.TYPE_PAGEHIDE, pagehide); } /** @@ -283,7 +283,7 @@ public void setOnpagehide(final Object pagehide) { */ @JsxGetter public Function getOnpageshow() { - return getEventHandler("pageshow"); + return getEventHandler(Event.TYPE_PAGESHOW); } /** @@ -292,7 +292,7 @@ public Function getOnpageshow() { */ @JsxSetter public void setOnpageshow(final Object pageshow) { - setEventHandler("pageshow", pageshow); + setEventHandler(Event.TYPE_PAGESHOW, pageshow); } /** @@ -319,7 +319,7 @@ public void setOnpopstate(final Object popstate) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnrejectionhandled() { - return getEventHandler("rejectionhandled"); + return getEventHandler(Event.TYPE_REJECTIONHANDLED); } /** @@ -328,7 +328,7 @@ public Function getOnrejectionhandled() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnrejectionhandled(final Object rejectionhandled) { - setEventHandler("rejectionhandled", rejectionhandled); + setEventHandler(Event.TYPE_REJECTIONHANDLED, rejectionhandled); } /** @@ -337,7 +337,7 @@ public void setOnrejectionhandled(final Object rejectionhandled) { */ @JsxGetter public Function getOnstorage() { - return getEventHandler("storage"); + return getEventHandler(Event.TYPE_STORAGE); } /** @@ -346,7 +346,7 @@ public Function getOnstorage() { */ @JsxSetter public void setOnstorage(final Object storage) { - setEventHandler("storage", storage); + setEventHandler(Event.TYPE_STORAGE, storage); } /** @@ -355,7 +355,7 @@ public void setOnstorage(final Object storage) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnunhandledrejection() { - return getEventHandler("unhandledrejection"); + return getEventHandler(Event.TYPE_UNHANDLEDREJECTION); } /** @@ -364,7 +364,7 @@ public Function getOnunhandledrejection() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnunhandledrejection(final Object unhandledrejection) { - setEventHandler("unhandledrejection", unhandledrejection); + setEventHandler(Event.TYPE_UNHANDLEDREJECTION, unhandledrejection); } /** @@ -391,7 +391,7 @@ public void setOnunload(final Object unload) { */ @JsxGetter public Function getOnafterprint() { - return getEventHandler("afterprint"); + return getEventHandler(Event.TYPE_AFTERPRINT); } /** @@ -400,7 +400,7 @@ public Function getOnafterprint() { */ @JsxSetter public void setOnafterprint(final Object afterprint) { - setEventHandler("afterprint", afterprint); + setEventHandler(Event.TYPE_AFTERPRINT, afterprint); } /** @@ -409,7 +409,7 @@ public void setOnafterprint(final Object afterprint) { */ @JsxGetter public Function getOnbeforeprint() { - return getEventHandler("beforeprint"); + return getEventHandler(Event.TYPE_BEFOREPRINT); } /** @@ -418,7 +418,7 @@ public Function getOnbeforeprint() { */ @JsxSetter public void setOnbeforeprint(final Object beforeprint) { - setEventHandler("beforeprint", beforeprint); + setEventHandler(Event.TYPE_BEFOREPRINT, beforeprint); } /** diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHRElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHRElement.java index c9ba587d5..6b8b300f2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHRElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHRElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHeadElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHeadElement.java index 93f9d924b..80be8f677 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHeadElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHeadElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHeadingElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHeadingElement.java index 8596bebf5..ce2514e4c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHeadingElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHeadingElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHtmlElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHtmlElement.java index 7659d14b0..895a2604c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHtmlElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLHtmlElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -71,15 +71,6 @@ public void setOuterHTML(final Object value) { throw Context.reportRuntimeError("outerHTML is read-only for tag 'html'"); } - /** - * Overwritten to throw an exception because this is readonly. - * @param value the new value for the contents of this node - */ - @Override - protected void setInnerTextImpl(final String value) { - throw Context.reportRuntimeError("innerText is read-only for tag 'html'"); - } - /** * Returns {@code version} property. * @return the {@code version} property diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLIFrameElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLIFrameElement.java index 1f671520f..ede4a1d24 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLIFrameElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLIFrameElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -101,7 +101,11 @@ public DocumentProxy getContentDocument() { */ @JsxGetter public WindowProxy getContentWindow() { - return Window.getProxy(getFrame().getEnclosedWindow()); + final FrameWindow frameWin = getFrame().getEnclosedWindow(); + if (frameWin.isClosed()) { + return null; + } + return Window.getProxy(frameWin); } /** diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLImageElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLImageElement.java index 3a6928a55..2e15a60d7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLImageElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLImageElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInlineQuotationElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInlineQuotationElement.java index b2f368cde..e4c076347 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInlineQuotationElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInlineQuotationElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInputElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInputElement.java index c6460e364..36053bb57 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInputElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLInputElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,7 @@ import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLINPUT_TYPE_MONTH_SUPPORTED; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLINPUT_TYPE_WEEK_SUPPORTED; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_ALIGN_FOR_INPUT_IGNORES_VALUES; +import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_INPUT_NUMBER_DOT_AT_END_IS_DOUBLE; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_INPUT_NUMBER_SELECTION_START_END_NULL; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_INPUT_SET_TYPE_LOWERCASE; import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.JS_INPUT_SET_UNSUPORTED_TYPE_EXCEPTION; @@ -48,6 +49,7 @@ import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput; import com.gargoylesoftware.htmlunit.html.HtmlFileInput; import com.gargoylesoftware.htmlunit.html.HtmlInput; +import com.gargoylesoftware.htmlunit.html.HtmlNumberInput; import com.gargoylesoftware.htmlunit.html.HtmlRadioButtonInput; import com.gargoylesoftware.htmlunit.html.HtmlTextInput; import com.gargoylesoftware.htmlunit.html.impl.SelectableTextInput; @@ -653,6 +655,15 @@ public String getSrc() { return getDomNodeOrDie().getSrcAttribute(); } + /** + * Sets the value of the {@code src} attribute. + * @param src the new value + */ + @JsxSetter + public void setSrc(final String src) { + getDomNodeOrDie().setSrcAttribute(src); + } + /** * Returns the value of the JavaScript attribute {@code value}. * @@ -674,6 +685,32 @@ public String getValue() { } return "C:\\fakepath\\" + name; } + + if (htmlInput instanceof HtmlNumberInput) { + final HtmlNumberInput htmlNumberInput = (HtmlNumberInput) htmlInput; + final String valueAttr = htmlInput.getAttributeDirect("value"); + if (!valueAttr.isEmpty()) { + if ("-".equals(valueAttr) || "+".equals(valueAttr)) { + return ""; + } + + String val = valueAttr; + final int lastPos = val.length() - 1; + if (lastPos >= 0 && val.charAt(lastPos) == '.') { + if (htmlNumberInput.hasFeature(JS_INPUT_NUMBER_DOT_AT_END_IS_DOUBLE)) { + return ""; + } + val = val.substring(0, lastPos); + } + try { + Double.parseDouble(valueAttr); + } + catch (final NumberFormatException e) { + return ""; + } + } + } + return htmlInput.getAttributeDirect("value"); } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLIsIndexElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLIsIndexElement.java index d976b3552..56a179684 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLIsIndexElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLIsIndexElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLIElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLIElement.java index 0e3e01e75..d32f4a683 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLIElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLIElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLabelElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLabelElement.java index f07578d1c..ef5068f8c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLabelElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLabelElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLegendElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLegendElement.java index 0ab02f09c..fac2821ce 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLegendElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLegendElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLinkElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLinkElement.java index e34ecaf74..12a337555 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLinkElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLLinkElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLListElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLListElement.java index cba913542..8bf1a1513 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLListElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLListElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMapElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMapElement.java index d3dcdd086..311cdd8fe 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMapElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMapElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMarqueeElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMarqueeElement.java index 125fb0a0d..837c9f148 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMarqueeElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMarqueeElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMediaElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMediaElement.java index 2a3e10a86..56b782d67 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMediaElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMediaElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMenuElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMenuElement.java index e81678c31..d04df11b0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMenuElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMenuElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -57,7 +57,7 @@ public HTMLMenuElement() { * @return the value of the {@code type} property */ @Override - @JsxGetter({FF, FF78, IE}) + @JsxGetter({FF78, IE}) public String getType() { if (getBrowserVersion().hasFeature(JS_MENU_TYPE_EMPTY)) { return ""; @@ -83,7 +83,7 @@ public String getType() { * @param type the value of the {@code type} property */ @Override - @JsxSetter({FF, FF78, IE}) + @JsxSetter({FF78, IE}) public void setType(final String type) { if (getBrowserVersion().hasFeature(JS_MENU_TYPE_EMPTY)) { if (StringUtils.isEmpty(type)) { @@ -113,7 +113,7 @@ public void setType(final String type) { * Returns the value of the {@code label} property. * @return the value of the {@code label} property */ - @JsxGetter({FF, FF78}) + @JsxGetter(FF78) public String getLabel() { return label_; } @@ -122,7 +122,7 @@ public String getLabel() { * Sets the value of the {@code label} property. * @param label the value of the {@code label} property */ - @JsxSetter({FF, FF78}) + @JsxSetter(FF78) public void setLabel(final String label) { label_ = label; } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMenuItemElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMenuItemElement.java index f7fb0355a..fa326ca5a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMenuItemElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMenuItemElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,7 +14,6 @@ */ package com.gargoylesoftware.htmlunit.javascript.host.html; -import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF78; import com.gargoylesoftware.htmlunit.html.HtmlMenuItem; @@ -27,7 +26,7 @@ * @author Ahmed Ashour * @author Ronald Brill */ -@JsxClass(domClass = HtmlMenuItem.class, value = {FF, FF78}) +@JsxClass(domClass = HtmlMenuItem.class, value = FF78) public class HTMLMenuItemElement extends HTMLElement { /** diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMetaElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMetaElement.java index ba0fc3c27..32278d3b9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMetaElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMetaElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMeterElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMeterElement.java index 96228f90c..d135fe51f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMeterElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLMeterElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLModElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLModElement.java index 4d321a91a..e5d30e57d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLModElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLModElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLNextIdElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLNextIdElement.java index d8c2e9055..527cd33c3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLNextIdElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLNextIdElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOListElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOListElement.java index 79a3f1c11..c46877b4d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOListElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOListElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLObjectElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLObjectElement.java index 41fa43b3f..4c2c4a4ed 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLObjectElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLObjectElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOptGroupElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOptGroupElement.java index 7fa9db773..24b8071ef 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOptGroupElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOptGroupElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOptionElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOptionElement.java index 8ebbd4717..b15b87870 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOptionElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOptionElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOptionsCollection.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOptionsCollection.java index 7bcec19b7..524092bf8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOptionsCollection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOptionsCollection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOutputElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOutputElement.java index 36861968d..65ffa45b9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOutputElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLOutputElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLParagraphElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLParagraphElement.java index ae047c8c3..d058bf4d9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLParagraphElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLParagraphElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLParamElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLParamElement.java index 1955123d3..47575e9cb 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLParamElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLParamElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPhraseElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPhraseElement.java index e396a6775..df894980d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPhraseElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPhraseElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPictureElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPictureElement.java index 0bf86a1f2..836cf6b06 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPictureElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPictureElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPreElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPreElement.java index 38afce389..09bc189e3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPreElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLPreElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLProgressElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLProgressElement.java index 751c3457b..4f89c0b14 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLProgressElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLProgressElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLQuoteElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLQuoteElement.java index 4c2a41bfd..716e1497f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLQuoteElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLQuoteElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLScriptElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLScriptElement.java index d1a61e3ea..b78b259b0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLScriptElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLScriptElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -111,7 +111,7 @@ public void setText(final String text) { final DomNode textChild = new DomText(htmlElement.getPage(), text); htmlElement.appendChild(textChild); - ScriptElementSupport.executeScriptIfNeeded(htmlElement); + ScriptElementSupport.executeScriptIfNeeded(htmlElement, false, false); } /** @@ -145,7 +145,7 @@ public Object appendChild(final Object childObject) { final Object result = super.appendChild(childObject); if (wasEmpty) { - ScriptElementSupport.executeScriptIfNeeded(tmpScript); + ScriptElementSupport.executeScriptIfNeeded(tmpScript, false, false); } return result; } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSelectElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSelectElement.java index 10c4a1381..feba55552 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSelectElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSelectElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLShadowElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLShadowElement.java deleted file mode 100644 index b48da5970..000000000 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLShadowElement.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2002-2021 Gargoyle Software Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.gargoylesoftware.htmlunit.javascript.host.html; - -import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.CHROME; -import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.EDGE; - -import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; -import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor; - -/** - * A JavaScript object for {@code HTMLShadowElement}. - * - * @author Ahmed Ashour - * @author Ronald Brill - */ -@JsxClass({CHROME, EDGE}) -public class HTMLShadowElement extends HTMLElement { - - /** - * Creates a new instance. - */ - @JsxConstructor - public HTMLShadowElement() { - } -} diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSlotElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSlotElement.java index f65785844..2971996ba 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSlotElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSlotElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSourceElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSourceElement.java index b164c1d56..9d1c612a4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSourceElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSourceElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSpanElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSpanElement.java index 0f05787a7..3eb73746d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSpanElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLSpanElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLStyleElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLStyleElement.java index b3ed879c3..29a3d1adf 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLStyleElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLStyleElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableCaptionElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableCaptionElement.java index 693e8f05e..ba4363b5f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableCaptionElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableCaptionElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableCellElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableCellElement.java index c021e4659..b0f40b36c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableCellElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableCellElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableColElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableColElement.java index 908ac1ea2..312d06649 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableColElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableColElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableComponent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableComponent.java index 9ce1af4b3..547d50fa0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableComponent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableComponent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableDataCellElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableDataCellElement.java index 4ba9ef822..e9a413b3f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableDataCellElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableDataCellElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableElement.java index 799aef673..d272e7789 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -261,7 +261,8 @@ public void deleteTHead() { @Override protected boolean isContainedRow(final HtmlTableRow row) { final DomNode parent = row.getParentNode(); // the tbody, thead or tfoo - return (parent != null) && parent.getParentNode() == getDomNodeOrDie(); + return parent != null + && parent.getParentNode() == getDomNodeOrDie(); } /** @@ -427,14 +428,6 @@ public void setBorderColorLight(final String borderColor) { setColorAttribute("borderColorLight", borderColor); } - /** - * {@inheritDoc} - */ - @Override - public String getInnerText() { - return getDomNodeOrDie().asText(); - } - /** * {@inheritDoc} */ diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableHeaderCellElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableHeaderCellElement.java index a42e0182e..eac099977 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableHeaderCellElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableHeaderCellElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableRowElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableRowElement.java index 91cfb1881..00339035e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableRowElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableRowElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableSectionElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableSectionElement.java index b3c4916da..9ca743f56 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableSectionElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableSectionElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTemplateElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTemplateElement.java index ad84919ea..2d76c87ff 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTemplateElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTemplateElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,15 +19,12 @@ import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF78; -import com.gargoylesoftware.htmlunit.html.DomDocumentFragment; import com.gargoylesoftware.htmlunit.html.HtmlTemplate; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter; import com.gargoylesoftware.htmlunit.javascript.host.dom.DocumentFragment; -import net.sourceforge.htmlunit.corejs.javascript.Context; - /** * The JavaScript object {@code HTMLTemplateElement}. * @@ -56,21 +53,4 @@ public DocumentFragment getContent() { return result; } - - /** - * Gets the innerHTML attribute. - * @return the contents of this node as HTML - */ - @JsxGetter - @Override - public String getInnerHTML() { - try { - final DomDocumentFragment fragment = ((HtmlTemplate) getDomNodeOrDie()).getContent(); - return getInnerHTML(fragment); - } - catch (final IllegalStateException e) { - Context.throwAsScriptRuntimeEx(e); - return ""; - } - } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTextAreaElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTextAreaElement.java index 404cbcc95..cf3eeb844 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTextAreaElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTextAreaElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTimeElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTimeElement.java index fd1009be8..9dc29f8a3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTimeElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTimeElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTitleElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTitleElement.java index b33cc79e5..2a8baeca0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTitleElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTitleElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTrackElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTrackElement.java index 8ea127e81..b6b4cc267 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTrackElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTrackElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLUListElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLUListElement.java index 681639c65..be3d3f5c6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLUListElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLUListElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLUnknownElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLUnknownElement.java index 145c471da..0ba733912 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLUnknownElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLUnknownElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLVideoElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLVideoElement.java index d997b605f..596b5439d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLVideoElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLVideoElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Image.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Image.java index 256897ca0..c75aad3e3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Image.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Image.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/LabelsHelper.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/LabelsHelper.java index 6763b82c1..a40cb8c35 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/LabelsHelper.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/LabelsHelper.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Option.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Option.java index 7a5f5dc21..d73df5654 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Option.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/Option.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/RowContainer.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/RowContainer.java index c1b79b9ac..2848d9d97 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/RowContainer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/RowContainer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/ValidityState.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/ValidityState.java index c9675b7b5..d75f76c37 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/ValidityState.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/ValidityState.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/package-info.java index c75739ecc..f9445132f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBCursor.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBCursor.java index 778e8b385..7e249d866 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBCursor.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBCursor.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBCursorWithValue.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBCursorWithValue.java index 1a595ee60..9ff96e39d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBCursorWithValue.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBCursorWithValue.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBDatabase.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBDatabase.java index 3c557002a..27fe0bb67 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBDatabase.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBDatabase.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBFactory.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBFactory.java index e5905c09e..519d76109 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBFactory.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBFactory.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBIndex.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBIndex.java index c6b505115..5891bb1e2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBIndex.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBIndex.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBKeyRange.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBKeyRange.java index f75c9f306..25f80f124 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBKeyRange.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBKeyRange.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBMutableFile.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBMutableFile.java index 7dbf34182..ce2925ae8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBMutableFile.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBMutableFile.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBObjectStore.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBObjectStore.java index 1b7a38cc4..4d0aaed67 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBObjectStore.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBObjectStore.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBOpenDBRequest.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBOpenDBRequest.java index f1c84d890..cb19ad8c7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBOpenDBRequest.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBOpenDBRequest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBRequest.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBRequest.java index 211964db3..b55116761 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBRequest.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBRequest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBTransaction.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBTransaction.java index dab1034f8..f3bc2955c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBTransaction.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/IDBTransaction.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/package-info.java index 969e60209..434f00d01 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/idb/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/Collator.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/Collator.java index 3434c4f88..27ac73a0f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/Collator.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/Collator.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/DateTimeFormat.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/DateTimeFormat.java index 9646c0d2f..24ceb5883 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/DateTimeFormat.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/DateTimeFormat.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -106,7 +106,7 @@ public class DateTimeFormat extends SimpleScriptable { commonFormats.put("fi", ddDot); commonFormats.put("fr", ddSlash); commonFormats.put("fr-CA", yyyyDash); - commonFormats.put("ga", yyyyDash); + commonFormats.put("ga", ddSlash); commonFormats.put("hi", ddSlash); commonFormats.put("hr", ddDotBlankDot); commonFormats.put("hu", yyyyDotBlankDot); @@ -128,10 +128,10 @@ public class DateTimeFormat extends SimpleScriptable { commonFormats.put("pt", ddSlash); commonFormats.put("ro", ddDot); commonFormats.put("ru", ddDot); - commonFormats.put("sk", ddDot); + commonFormats.put("sk", ddDotBlank); commonFormats.put("sl", ddDotBlank); - commonFormats.put("sq", ddSlash); - commonFormats.put("sr", ddDotBlankDot); + commonFormats.put("sq", ddDot); + commonFormats.put("sr", ddDotDot); commonFormats.put("sv", yyyyDash); commonFormats.put("th", ddSlash); commonFormats.put("tr", ddDot); @@ -149,12 +149,8 @@ public class DateTimeFormat extends SimpleScriptable { commonFormats.put("en-CA", yyyyDash); commonFormats.put("en-PH", ddSlash); commonFormats.put("es-US", ddSlash); - commonFormats.put("ga", ddSlash); commonFormats.put("fr-CH", ddDot); commonFormats.put("nl-BE", ddSlash); - commonFormats.put("sk", ddDotBlank); - commonFormats.put("sr", ddDotDot); - commonFormats.put("sq", ddDot); FF_FORMATS_.putAll(commonFormats); FF_FORMATS_.put("ban", ddDot); @@ -178,11 +174,8 @@ public class DateTimeFormat extends SimpleScriptable { CHROME_FORMATS_.put("iw", ddDot); CHROME_FORMATS_.put("mk", mmSlash); CHROME_FORMATS_.put("nl-BE", ddSlash); - CHROME_FORMATS_.put("sk", ddDotBlank); CHROME_FORMATS_.put("sq", mmSlash); - CHROME_FORMATS_.put("sr", ddDotDot); - EDGE_FORMATS_.put("be", mmSlash); EDGE_FORMATS_.put("da", ddDot); EDGE_FORMATS_.put("en-CA", yyyyDash); EDGE_FORMATS_.put("en-IE", ddSlash); @@ -190,16 +183,10 @@ public class DateTimeFormat extends SimpleScriptable { EDGE_FORMATS_.put("en-PH", ddSlash); EDGE_FORMATS_.put("es-US", ddSlash); EDGE_FORMATS_.put("fr-CH", ddDot); - EDGE_FORMATS_.put("ga", mmSlash); EDGE_FORMATS_.put("hr", ddDotBlankDot); EDGE_FORMATS_.put("in-ID", ddSlash); - EDGE_FORMATS_.put("is", mmSlash); EDGE_FORMATS_.put("iw", ddDot); - EDGE_FORMATS_.put("mk", mmSlash); EDGE_FORMATS_.put("nl-BE", ddSlash); - EDGE_FORMATS_.put("sk", ddDotBlank); - EDGE_FORMATS_.put("sq", mmSlash); - EDGE_FORMATS_.put("sr", ddDotDot); IE_FORMATS_.put("ar", rightToLeft); IE_FORMATS_.put("ar-AE", rightToLeft); @@ -247,10 +234,8 @@ public class DateTimeFormat extends SimpleScriptable { IE_FORMATS_.put("no", ddDot); IE_FORMATS_.put("pl", ddDot); IE_FORMATS_.put("pt-PT", ddSlash); - IE_FORMATS_.put("sk", ddDotBlank); IE_FORMATS_.put("sl", ddDotBlank); IE_FORMATS_.put("sq", ddDot); - IE_FORMATS_.put("sr", ddDotDot); IE_FORMATS_.put("sr-BA", ddDot); IE_FORMATS_.put("sr-CS", ddDot); IE_FORMATS_.put("sr-ME", ddDot); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/Intl.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/Intl.java index 2027723bd..67b1d931d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/Intl.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/Intl.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/NumberFormat.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/NumberFormat.java index 3eca067d1..a0b293f9d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/NumberFormat.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/NumberFormat.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/V8BreakIterator.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/V8BreakIterator.java index f4bb20422..b1c6c7593 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/V8BreakIterator.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/V8BreakIterator.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/package-info.java index 2487f2b01..ca0e6399b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/intl/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AnalyserNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AnalyserNode.java index 7b3d888de..443bb0c33 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AnalyserNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AnalyserNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioBuffer.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioBuffer.java index ad418ea90..16b6bff01 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioBuffer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioBuffer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioBufferSourceNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioBufferSourceNode.java index 9a653fc9a..9acce0d6b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioBufferSourceNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioBufferSourceNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioContext.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioContext.java index 8dac3158c..5bec25974 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioContext.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioContext.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -72,7 +72,7 @@ public Promise decodeAudioData(final NativeArrayBuffer buffer, final Function su (JavaScriptEngine) window.getWebWindow().getWebClient().getJavaScriptEngine(); if (error != null) { - jsEngine.addPostponedAction(new PostponedAction(owningPage) { + jsEngine.addPostponedAction(new PostponedAction(owningPage, "AudioContext.decodeAudioData") { @Override public void execute() throws Exception { jsEngine.callFunction(owningPage, error, getParentScope(), AudioContext.this, new Object[] {}); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioDestinationNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioDestinationNode.java index 0df2ea03e..6f92c894a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioDestinationNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioDestinationNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioListener.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioListener.java index 9be0bf376..532bc755b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioListener.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioListener.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioNode.java index 0238d8b9b..e12798096 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioParam.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioParam.java index 61b3bbb94..8e1e9047a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioParam.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/AudioParam.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/BaseAudioContext.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/BaseAudioContext.java index 11f818d65..37d0d0eb5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/BaseAudioContext.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/BaseAudioContext.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/BiquadFilterNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/BiquadFilterNode.java index 1dff866b7..c6ad0f7c4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/BiquadFilterNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/BiquadFilterNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ChannelMergerNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ChannelMergerNode.java index 8a6c08d4c..07925dc35 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ChannelMergerNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ChannelMergerNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ChannelSplitterNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ChannelSplitterNode.java index 07ce3d001..f1e162df8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ChannelSplitterNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ChannelSplitterNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ConstantSourceNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ConstantSourceNode.java index a2bb05d14..a52ae5b07 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ConstantSourceNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ConstantSourceNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ConvolverNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ConvolverNode.java index a0a78f8ad..0650b1da2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ConvolverNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ConvolverNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/DelayNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/DelayNode.java index 3dfaea5a6..25ccc1fca 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/DelayNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/DelayNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/DynamicsCompressorNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/DynamicsCompressorNode.java index 8d95befba..9cc8b052e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/DynamicsCompressorNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/DynamicsCompressorNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/GainNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/GainNode.java index c84ec7227..4a97b7883 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/GainNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/GainNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/IIRFilterNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/IIRFilterNode.java index a343b907c..ee0ab2edd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/IIRFilterNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/IIRFilterNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/InputDeviceCapabilities.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/InputDeviceCapabilities.java index 133b3966f..6de56b650 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/InputDeviceCapabilities.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/InputDeviceCapabilities.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaDeviceInfo.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaDeviceInfo.java index e7610db42..6de01fbf9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaDeviceInfo.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaDeviceInfo.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaDevices.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaDevices.java index 1d9b698ff..2b27d22ac 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaDevices.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaDevices.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,9 @@ import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxFunction; +import com.gargoylesoftware.htmlunit.javascript.host.Promise; +import com.gargoylesoftware.htmlunit.javascript.host.dom.DOMException; import com.gargoylesoftware.htmlunit.javascript.host.event.EventTarget; /** @@ -38,4 +41,11 @@ public class MediaDevices extends EventTarget { @JsxConstructor public MediaDevices() { } + + @JsxFunction + public Promise getUserMedia() { + return Promise.reject(null, this, + new Object[] {new DOMException("HtmlUnit does not support media streaming.", + DOMException.NOT_FOUND_ERR)}, null); + } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaElementAudioSourceNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaElementAudioSourceNode.java index 549f00856..9d5fa268a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaElementAudioSourceNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaElementAudioSourceNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaError.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaError.java index 29ce76eb2..7fecf85c4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaError.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaError.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeyError.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeyError.java index dac0b4e71..fdb7ee701 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeyError.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeyError.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeySession.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeySession.java index 0b51fa8c6..19621eb87 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeySession.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeySession.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeyStatusMap.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeyStatusMap.java index e3943f97a..7c75bb6a5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeyStatusMap.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeyStatusMap.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeySystemAccess.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeySystemAccess.java index e473d2ba1..6c7a34b7a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeySystemAccess.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeySystemAccess.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeys.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeys.java index 73687ae0c..e1a2fb9bd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeys.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaKeys.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaRecorder.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaRecorder.java index 2bbc63c68..73619decd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaRecorder.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaRecorder.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaSource.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaSource.java index 5b6ff9d8c..19fc725a4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaSource.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaSource.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStream.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStream.java index 94f8d4f83..abb5322c5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStream.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStream.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStreamAudioDestinationNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStreamAudioDestinationNode.java index d3decd957..804b786ca 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStreamAudioDestinationNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStreamAudioDestinationNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStreamAudioSourceNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStreamAudioSourceNode.java index 3c69f7b7e..644da8290 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStreamAudioSourceNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStreamAudioSourceNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStreamTrack.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStreamTrack.java index 3e600d158..47d5bdc57 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStreamTrack.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/MediaStreamTrack.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/OfflineAudioContext.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/OfflineAudioContext.java index 20450fd47..9f8c0c1e8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/OfflineAudioContext.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/OfflineAudioContext.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/OscillatorNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/OscillatorNode.java index 251a2d6da..cace856ad 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/OscillatorNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/OscillatorNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/PannerNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/PannerNode.java index 0e324a84d..1dc6d54e9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/PannerNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/PannerNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/PeriodicSyncManager.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/PeriodicSyncManager.java index 53f3bb29f..829d87113 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/PeriodicSyncManager.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/PeriodicSyncManager.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/PeriodicWave.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/PeriodicWave.java index d9fb4e275..f5a4450d6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/PeriodicWave.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/PeriodicWave.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/RemotePlayback.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/RemotePlayback.java index 84a2d7d21..8d7e740d2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/RemotePlayback.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/RemotePlayback.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ScriptProcessorNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ScriptProcessorNode.java index 9f5ae47c9..3158b8a46 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ScriptProcessorNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/ScriptProcessorNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/SourceBuffer.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/SourceBuffer.java index d8e7f7cd0..c9480881e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/SourceBuffer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/SourceBuffer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/SourceBufferList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/SourceBufferList.java index ff746629b..1e02ba50a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/SourceBufferList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/SourceBufferList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/StereoPannerNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/StereoPannerNode.java index d15e8a5e1..397290c00 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/StereoPannerNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/StereoPannerNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrack.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrack.java index 02afa080c..c1c63c112 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrack.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrack.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrackCue.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrackCue.java index 369b3ecf6..8dc7dcae4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrackCue.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrackCue.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrackCueList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrackCueList.java index 634384e0c..9f9c4ab29 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrackCueList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrackCueList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrackList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrackList.java index a08f17223..bc90dfff1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrackList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TextTrackList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TimeRanges.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TimeRanges.java index 1ae96a5a9..6b2facfed 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TimeRanges.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/TimeRanges.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/VTTCue.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/VTTCue.java index 56444c398..80e72bf88 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/VTTCue.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/VTTCue.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/VideoPlaybackQuality.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/VideoPlaybackQuality.java index 86031bc05..4039ed0ff 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/VideoPlaybackQuality.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/VideoPlaybackQuality.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/WaveShaperNode.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/WaveShaperNode.java index d9a3e509a..99f1e4d58 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/WaveShaperNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/WaveShaperNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/WebkitMediaStream.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/WebkitMediaStream.java index 8fbb18535..9f15eb990 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/WebkitMediaStream.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/WebkitMediaStream.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIAccess.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIAccess.java index 804cd9d03..b3f86b47f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIAccess.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIAccess.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIInput.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIInput.java index a25a7676f..3ef24e519 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIInput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIInput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIInputMap.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIInputMap.java index c44b29a5b..2cf916688 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIInputMap.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIInputMap.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIOutput.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIOutput.java index 8b59c37f5..9f95b0f5d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIOutput.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIOutput.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIOutputMap.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIOutputMap.java index 99222aeda..010546e44 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIOutputMap.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIOutputMap.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIPort.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIPort.java index 50ffc627b..f090a7f9c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIPort.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/MIDIPort.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/package-info.java index 57681a3e5..a38cb449f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/midi/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/package-info.java index a9bb3d235..a4c4e835f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/Presentation.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/Presentation.java index 06637e435..8005d52ba 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/Presentation.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/Presentation.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/PresentationAvailability.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/PresentationAvailability.java index 7509f42c1..1ecbf37c4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/PresentationAvailability.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/PresentationAvailability.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/PresentationConnection.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/PresentationConnection.java index e28a14b49..2af2470d9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/PresentationConnection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/PresentationConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/PresentationRequest.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/PresentationRequest.java index 875ef2087..0d6b55b2c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/PresentationRequest.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/PresentationRequest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/package-info.java index 2308e23e5..c6a0e1fd0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/presentation/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/MozRTCIceCandidate.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/MozRTCIceCandidate.java index 42ee57710..92a692ce2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/MozRTCIceCandidate.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/MozRTCIceCandidate.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/MozRTCPeerConnection.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/MozRTCPeerConnection.java index 5722f56f0..06319f8ba 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/MozRTCPeerConnection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/MozRTCPeerConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/MozRTCSessionDescription.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/MozRTCSessionDescription.java index 5fb3617d5..e637d2724 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/MozRTCSessionDescription.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/MozRTCSessionDescription.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCCertificate.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCCertificate.java index 60f1f041f..0f76644f5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCCertificate.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCCertificate.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCIceCandidate.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCIceCandidate.java index 3346d27b1..961c5d96e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCIceCandidate.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCIceCandidate.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCPeerConnection.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCPeerConnection.java index 250cfa0ab..141cd1a3e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCPeerConnection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCPeerConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCSessionDescription.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCSessionDescription.java index 0b6c4a054..272e9005e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCSessionDescription.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCSessionDescription.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCStatsReport.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCStatsReport.java index 86ec36b0c..4539fb4b3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCStatsReport.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/RTCStatsReport.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/WebkitRTCPeerConnection.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/WebkitRTCPeerConnection.java index 9fe7533fb..becf6fd29 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/WebkitRTCPeerConnection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/WebkitRTCPeerConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/package-info.java index bdf7edff0..3689a0928 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/media/rtc/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/network/NetworkInformation.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/network/NetworkInformation.java index 11f6fa59e..7ae0be19f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/network/NetworkInformation.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/network/NetworkInformation.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/network/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/network/package-info.java index 3c70f55fc..5bfd48af2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/network/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/network/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/package-info.java index 9091c8104..775f6c7b3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/PaymentAddress.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/PaymentAddress.java index 35c00d4e2..6f92215b2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/PaymentAddress.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/PaymentAddress.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/PaymentRequest.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/PaymentRequest.java index 24df4af8e..a96a8ecf7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/PaymentRequest.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/PaymentRequest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/PaymentResponse.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/PaymentResponse.java index ff4454c87..7322e0128 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/PaymentResponse.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/PaymentResponse.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/package-info.java index 9ba53e7a3..6d3b9ca89 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/payment/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/Performance.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/Performance.java index 5979d130b..65272db85 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/Performance.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/Performance.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceEntry.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceEntry.java index 55c0765f9..7970d04a5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceEntry.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceEntry.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceMark.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceMark.java index 0ee48b4ae..3afec5c2f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceMark.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceMark.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceMeasure.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceMeasure.java index 499a64ab5..4422f9683 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceMeasure.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceMeasure.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceNavigation.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceNavigation.java index 1c9a09426..800ece96e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceNavigation.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceNavigation.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceNavigationTiming.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceNavigationTiming.java index ad067e2fe..f46e01441 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceNavigationTiming.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceNavigationTiming.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceResourceTiming.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceResourceTiming.java index ec6fdd8fc..6ef7fcbd4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceResourceTiming.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceResourceTiming.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceTiming.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceTiming.java index f2d43bd64..a1c29e925 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceTiming.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/PerformanceTiming.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/package-info.java index 768d69e3d..6d5bfd6d6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/performance/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/Credential.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/Credential.java index e3f2d0c01..f6a0bead6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/Credential.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/Credential.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/CredentialsContainer.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/CredentialsContainer.java index 3ca586167..1217dfb55 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/CredentialsContainer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/CredentialsContainer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/FederatedCredential.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/FederatedCredential.java index 9d034c4ce..8e5796e24 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/FederatedCredential.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/FederatedCredential.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/PasswordCredential.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/PasswordCredential.java index a7c44bcf3..1536028b0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/PasswordCredential.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/PasswordCredential.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/package-info.java index 68c2e1e21..73ee4cdde 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/security/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesis.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesis.java index 22fcc18a6..816f3ac26 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesis.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesis.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesisErrorEvent.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesisErrorEvent.java index 2ef124985..f6acd3ff2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesisErrorEvent.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesisErrorEvent.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesisUtterance.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesisUtterance.java index f3e13dbd4..187d36970 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesisUtterance.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesisUtterance.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesisVoice.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesisVoice.java index e203ba130..7a3eafe4e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesisVoice.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/SpeechSynthesisVoice.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/WebkitSpeechGrammar.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/WebkitSpeechGrammar.java index 3dba26fe0..ef12ff91c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/WebkitSpeechGrammar.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/WebkitSpeechGrammar.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/WebkitSpeechGrammarList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/WebkitSpeechGrammarList.java index e0b89dc6a..d4c0b3854 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/WebkitSpeechGrammarList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/WebkitSpeechGrammarList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/WebkitSpeechRecognition.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/WebkitSpeechRecognition.java index ae1850fe0..fe88f9e94 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/WebkitSpeechRecognition.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/WebkitSpeechRecognition.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/package-info.java index e4dcc1d1f..ea1f79073 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/speech/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/MatrixTransformer.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/MatrixTransformer.java index 889de35ee..68b2e2ac4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/MatrixTransformer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/MatrixTransformer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAElement.java index 96c3609ee..019ba5634 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAngle.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAngle.java index b459f2c40..4b063f3e1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAngle.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAngle.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimateElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimateElement.java index c48730e0f..7bd45317a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimateElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimateElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimateMotionElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimateMotionElement.java index e5b0255d2..4a12d0809 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimateMotionElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimateMotionElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimateTransformElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimateTransformElement.java index 1687a6bc6..e2dae98fd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimateTransformElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimateTransformElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedAngle.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedAngle.java index c7f8a2216..f3ca4b5a4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedAngle.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedAngle.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedBoolean.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedBoolean.java index bd08d2912..a242a9e98 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedBoolean.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedBoolean.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedEnumeration.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedEnumeration.java index 4719cfb00..b7f6b7c28 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedEnumeration.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedEnumeration.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedInteger.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedInteger.java index 4c89ff5a2..05dbab19b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedInteger.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedInteger.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedLength.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedLength.java index 42cfbb28b..cc6e04d18 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedLength.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedLength.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedLengthList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedLengthList.java index 1d2fdedc4..0e66ef23d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedLengthList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedLengthList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedNumber.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedNumber.java index 43e11bba0..ae8a5772a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedNumber.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedNumber.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedNumberList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedNumberList.java index 372137598..ac9ed84ff 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedNumberList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedNumberList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedPreserveAspectRatio.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedPreserveAspectRatio.java index c83ee767d..ecf911171 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedPreserveAspectRatio.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedPreserveAspectRatio.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedRect.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedRect.java index 1742a4205..1bc37a268 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedRect.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedRect.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedString.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedString.java index d8ec3fcdc..b968c6bc2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedString.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedString.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedTransformList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedTransformList.java index 19a73f93b..1fba32418 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedTransformList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimatedTransformList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimationElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimationElement.java index 0e5e291d4..76f3db785 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimationElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGAnimationElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGCircleElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGCircleElement.java index a329e2c6c..9b9e1d2fa 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGCircleElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGCircleElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGClipPathElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGClipPathElement.java index 79f1b043d..f01732a75 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGClipPathElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGClipPathElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGComponentTransferFunctionElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGComponentTransferFunctionElement.java index 1bed7ab42..abab251d0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGComponentTransferFunctionElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGComponentTransferFunctionElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGDefsElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGDefsElement.java index eb9bdcb39..f0bcb125a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGDefsElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGDefsElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGDescElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGDescElement.java index 99540423c..b5de6cb53 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGDescElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGDescElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGElement.java index b7a25752f..330b38d32 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -119,7 +119,7 @@ public void setOnfocus(final Object focus) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOndragend() { - return getEventHandler("dragend"); + return getEventHandler(Event.TYPE_DRAGEND); } /** @@ -128,7 +128,7 @@ public Function getOndragend() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOndragend(final Object dragend) { - setEventHandler("dragend", dragend); + setEventHandler(Event.TYPE_DRAGEND, dragend); } /** @@ -137,7 +137,7 @@ public void setOndragend(final Object dragend) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOninvalid() { - return getEventHandler("invalid"); + return getEventHandler(Event.TYPE_INVALID); } /** @@ -146,7 +146,7 @@ public Function getOninvalid() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOninvalid(final Object invalid) { - setEventHandler("invalid", invalid); + setEventHandler(Event.TYPE_INVALID, invalid); } /** @@ -155,7 +155,7 @@ public void setOninvalid(final Object invalid) { @Override @JsxGetter({CHROME, EDGE}) public Function getOnpointercancel() { - return getEventHandler("pointercancel"); + return getEventHandler(Event.TYPE_POINTERCANCEL); } /** @@ -164,7 +164,7 @@ public Function getOnpointercancel() { @Override @JsxSetter({CHROME, EDGE}) public void setOnpointercancel(final Object pointercancel) { - setEventHandler("pointercancel", pointercancel); + setEventHandler(Event.TYPE_POINTERCANCEL, pointercancel); } /** @@ -173,7 +173,7 @@ public void setOnpointercancel(final Object pointercancel) { @Override @JsxGetter({CHROME, EDGE}) public Function getOnpointerout() { - return getEventHandler("pointerout"); + return getEventHandler(Event.TYPE_POINTEROUT); } /** @@ -182,7 +182,7 @@ public Function getOnpointerout() { @Override @JsxSetter({CHROME, EDGE}) public void setOnpointerout(final Object pointerout) { - setEventHandler("pointerout", pointerout); + setEventHandler(Event.TYPE_POINTEROUT, pointerout); } /** @@ -191,7 +191,7 @@ public void setOnpointerout(final Object pointerout) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnratechange() { - return getEventHandler("ratechange"); + return getEventHandler(Event.TYPE_RATECHANGE); } /** @@ -200,7 +200,7 @@ public Function getOnratechange() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnratechange(final Object ratechange) { - setEventHandler("ratechange", ratechange); + setEventHandler(Event.TYPE_RATECHANGE, ratechange); } /** @@ -209,7 +209,7 @@ public void setOnratechange(final Object ratechange) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnresize() { - return getEventHandler("resize"); + return getEventHandler(Event.TYPE_RESIZE); } /** @@ -218,7 +218,7 @@ public Function getOnresize() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnresize(final Object resize) { - setEventHandler("resize", resize); + setEventHandler(Event.TYPE_RESIZE, resize); } /** @@ -227,7 +227,7 @@ public void setOnresize(final Object resize) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOncanplaythrough() { - return getEventHandler("canplaythrough"); + return getEventHandler(Event.TYPE_CANPLAYTHROUGH); } /** @@ -236,7 +236,7 @@ public Function getOncanplaythrough() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOncanplaythrough(final Object canplaythrough) { - setEventHandler("canplaythrough", canplaythrough); + setEventHandler(Event.TYPE_CANPLAYTHROUGH, canplaythrough); } /** @@ -245,7 +245,7 @@ public void setOncanplaythrough(final Object canplaythrough) { */ @JsxGetter({CHROME, EDGE}) public Function getOncancel() { - return getEventHandler("cancel"); + return getEventHandler(Event.TYPE_CANCEL); } /** @@ -254,7 +254,7 @@ public Function getOncancel() { */ @JsxSetter({CHROME, EDGE}) public void setOncancel(final Object cancel) { - setEventHandler("cancel", cancel); + setEventHandler(Event.TYPE_CANCEL, cancel); } /** @@ -263,7 +263,7 @@ public void setOncancel(final Object cancel) { @Override @JsxGetter({CHROME, EDGE}) public Function getOnpointerenter() { - return getEventHandler("pointerenter"); + return getEventHandler(Event.TYPE_POINTERENTER); } /** @@ -272,7 +272,7 @@ public Function getOnpointerenter() { @Override @JsxSetter({CHROME, EDGE}) public void setOnpointerenter(final Object pointerenter) { - setEventHandler("pointerenter", pointerenter); + setEventHandler(Event.TYPE_POINTERENTER, pointerenter); } /** @@ -281,7 +281,7 @@ public void setOnpointerenter(final Object pointerenter) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnselect() { - return getEventHandler("select"); + return getEventHandler(Event.TYPE_SELECT); } /** @@ -290,7 +290,7 @@ public Function getOnselect() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnselect(final Object select) { - setEventHandler("select", select); + setEventHandler(Event.TYPE_SELECT, select); } /** @@ -299,7 +299,7 @@ public void setOnselect(final Object select) { */ @JsxGetter({CHROME, EDGE}) public Function getOnauxclick() { - return getEventHandler("auxclick"); + return getEventHandler(Event.TYPE_AUXCLICK); } /** @@ -308,7 +308,7 @@ public Function getOnauxclick() { */ @JsxSetter({CHROME, EDGE}) public void setOnauxclick(final Object auxclick) { - setEventHandler("auxclick", auxclick); + setEventHandler(Event.TYPE_AUXCLICK, auxclick); } /** @@ -317,7 +317,7 @@ public void setOnauxclick(final Object auxclick) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnpause() { - return getEventHandler("pause"); + return getEventHandler(Event.TYPE_PAUSE); } /** @@ -326,7 +326,7 @@ public Function getOnpause() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnpause(final Object pause) { - setEventHandler("pause", pause); + setEventHandler(Event.TYPE_PAUSE, pause); } /** @@ -335,7 +335,7 @@ public void setOnpause(final Object pause) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnloadstart() { - return getEventHandler("loadstart"); + return getEventHandler(Event.TYPE_LOAD_START); } /** @@ -344,7 +344,7 @@ public Function getOnloadstart() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnloadstart(final Object loadstart) { - setEventHandler("loadstart", loadstart); + setEventHandler(Event.TYPE_LOAD_START, loadstart); } /** @@ -353,7 +353,7 @@ public void setOnloadstart(final Object loadstart) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnprogress() { - return getEventHandler("progress"); + return getEventHandler(Event.TYPE_PROGRESS); } /** @@ -362,7 +362,7 @@ public Function getOnprogress() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnprogress(final Object progress) { - setEventHandler("progress", progress); + setEventHandler(Event.TYPE_PROGRESS, progress); } /** @@ -371,7 +371,7 @@ public void setOnprogress(final Object progress) { @Override @JsxGetter({CHROME, EDGE}) public Function getOnpointerup() { - return getEventHandler("pointerup"); + return getEventHandler(Event.TYPE_POINTERUP); } /** @@ -380,7 +380,7 @@ public Function getOnpointerup() { @Override @JsxSetter({CHROME, EDGE}) public void setOnpointerup(final Object pointerup) { - setEventHandler("pointerup", pointerup); + setEventHandler(Event.TYPE_POINTERUP, pointerup); } /** @@ -389,7 +389,7 @@ public void setOnpointerup(final Object pointerup) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnscroll() { - return getEventHandler("scroll"); + return getEventHandler(Event.TYPE_SCROLL); } /** @@ -398,7 +398,7 @@ public Function getOnscroll() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnscroll(final Object scroll) { - setEventHandler("scroll", scroll); + setEventHandler(Event.TYPE_SCROLL, scroll); } /** @@ -425,7 +425,7 @@ public void setOnkeydown(final Object keydown) { @Override @JsxGetter({CHROME, EDGE}) public Function getOnpointerleave() { - return getEventHandler("pointerleave"); + return getEventHandler(Event.TYPE_POINTERLEAVE); } /** @@ -434,7 +434,7 @@ public Function getOnpointerleave() { @Override @JsxSetter({CHROME, EDGE}) public void setOnpointerleave(final Object pointerleave) { - setEventHandler("pointerleave", pointerleave); + setEventHandler(Event.TYPE_POINTERLEAVE, pointerleave); } /** @@ -533,7 +533,7 @@ public void setOnkeypress(final Object keypress) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOntimeupdate() { - return getEventHandler("timeupdate"); + return getEventHandler(Event.TYPE_TIMEUPDATE); } /** @@ -542,7 +542,7 @@ public Function getOntimeupdate() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOntimeupdate(final Object timeupdate) { - setEventHandler("timeupdate", timeupdate); + setEventHandler(Event.TYPE_TIMEUPDATE, timeupdate); } /** @@ -569,7 +569,7 @@ public void setOndblclick(final Object dblclick) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOndrag() { - return getEventHandler("drag"); + return getEventHandler(Event.TYPE_DRAG); } /** @@ -578,7 +578,7 @@ public Function getOndrag() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOndrag(final Object drag) { - setEventHandler("drag", drag); + setEventHandler(Event.TYPE_DRAG, drag); } /** @@ -587,7 +587,7 @@ public void setOndrag(final Object drag) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnseeked() { - return getEventHandler("seeked"); + return getEventHandler(Event.TYPE_SEEKED); } /** @@ -596,7 +596,7 @@ public Function getOnseeked() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnseeked(final Object seeked) { - setEventHandler("seeked", seeked); + setEventHandler(Event.TYPE_SEEKED, seeked); } /** @@ -605,7 +605,7 @@ public void setOnseeked(final Object seeked) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnabort() { - return getEventHandler("abort"); + return getEventHandler(Event.TYPE_ABORT); } /** @@ -614,7 +614,7 @@ public Function getOnabort() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnabort(final Object abort) { - setEventHandler("abort", abort); + setEventHandler(Event.TYPE_ABORT, abort); } /** @@ -623,7 +623,7 @@ public void setOnabort(final Object abort) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnloadedmetadata() { - return getEventHandler("loadedmetadata"); + return getEventHandler(Event.TYPE_LOADEDMETADATA); } /** @@ -632,7 +632,7 @@ public Function getOnloadedmetadata() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnloadedmetadata(final Object loadedmetadata) { - setEventHandler("loadedmetadata", loadedmetadata); + setEventHandler(Event.TYPE_LOADEDMETADATA, loadedmetadata); } /** @@ -641,7 +641,7 @@ public void setOnloadedmetadata(final Object loadedmetadata) { */ @JsxGetter({CHROME, EDGE}) public Function getOntoggle() { - return getEventHandler("toggle"); + return getEventHandler(Event.TYPE_TOGGLE); } /** @@ -650,7 +650,7 @@ public Function getOntoggle() { */ @JsxSetter({CHROME, EDGE}) public void setOntoggle(final Object toggle) { - setEventHandler("toggle", toggle); + setEventHandler(Event.TYPE_TOGGLE, toggle); } /** @@ -659,7 +659,7 @@ public void setOntoggle(final Object toggle) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnplay() { - return getEventHandler("play"); + return getEventHandler(Event.TYPE_PLAY); } /** @@ -668,7 +668,7 @@ public Function getOnplay() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnplay(final Object play) { - setEventHandler("play", play); + setEventHandler(Event.TYPE_PLAY, play); } /** @@ -749,7 +749,7 @@ public void setOnmouseup(final Object mouseup) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOndragover() { - return getEventHandler("dragover"); + return getEventHandler(Event.TYPE_DRAGOVER); } /** @@ -758,7 +758,7 @@ public Function getOndragover() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOndragover(final Object dragover) { - setEventHandler("dragover", dragover); + setEventHandler(Event.TYPE_DRAGOVER, dragover); } /** @@ -767,7 +767,7 @@ public void setOndragover(final Object dragover) { @Override @JsxGetter({CHROME, EDGE}) public Function getOnpointermove() { - return getEventHandler("pointermove"); + return getEventHandler(Event.TYPE_POINTERMOVE); } /** @@ -776,25 +776,25 @@ public Function getOnpointermove() { @Override @JsxSetter({CHROME, EDGE}) public void setOnpointermove(final Object pointermove) { - setEventHandler("pointermove", pointermove); + setEventHandler(Event.TYPE_POINTERMOVE, pointermove); } /** - * {@inheritDoc} + * Returns the {@code oncut} event handler. + * @return the {@code oncut} event handler */ - @Override - @JsxGetter({FF, FF78}) + @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOncut() { - return getEventHandler("cut"); + return getEventHandler(Event.TYPE_CUT); } /** - * {@inheritDoc} + * Sets the {@code oncut} event handler. + * @param cut the {@code oncut} event handler */ - @Override - @JsxSetter({FF, FF78}) + @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOncut(final Object cut) { - setEventHandler("cut", cut); + setEventHandler(Event.TYPE_CUT, cut); } /** @@ -839,7 +839,7 @@ public void setOninput(final Object input) { @Override @JsxGetter({CHROME, EDGE}) public Function getOnlostpointercapture() { - return getEventHandler("lostpointercapture"); + return getEventHandler(Event.TYPE_LOSTPOINTERCAPTURE); } /** @@ -848,7 +848,7 @@ public Function getOnlostpointercapture() { @Override @JsxSetter({CHROME, EDGE}) public void setOnlostpointercapture(final Object lostpointercapture) { - setEventHandler("lostpointercapture", lostpointercapture); + setEventHandler(Event.TYPE_LOSTPOINTERCAPTURE, lostpointercapture); } /** @@ -857,7 +857,7 @@ public void setOnlostpointercapture(final Object lostpointercapture) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnstalled() { - return getEventHandler("stalled"); + return getEventHandler(Event.TYPE_STALLED); } /** @@ -866,7 +866,7 @@ public Function getOnstalled() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnstalled(final Object stalled) { - setEventHandler("stalled", stalled); + setEventHandler(Event.TYPE_STALLED, stalled); } /** @@ -875,7 +875,7 @@ public void setOnstalled(final Object stalled) { @Override @JsxGetter({CHROME, EDGE}) public Function getOnpointerover() { - return getEventHandler("pointerover"); + return getEventHandler(Event.TYPE_POINTEROVER); } /** @@ -884,7 +884,7 @@ public Function getOnpointerover() { @Override @JsxSetter({CHROME, EDGE}) public void setOnpointerover(final Object pointerover) { - setEventHandler("pointerover", pointerover); + setEventHandler(Event.TYPE_POINTEROVER, pointerover); } /** @@ -911,7 +911,7 @@ public void setOnclose(final Object close) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOndragenter() { - return getEventHandler("dragenter"); + return getEventHandler(Event.TYPE_DRAGENTER); } /** @@ -920,7 +920,7 @@ public Function getOndragenter() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOndragenter(final Object dragenter) { - setEventHandler("dragenter", dragenter); + setEventHandler(Event.TYPE_DRAGENTER, dragenter); } /** @@ -929,7 +929,7 @@ public void setOndragenter(final Object dragenter) { */ @JsxGetter({FF, FF78}) public Function getOnmozfullscreenerror() { - return getEventHandler("mozfullscreenerror"); + return getEventHandler(Event.TYPE_MOZFULLSCREENERROR); } /** @@ -938,7 +938,7 @@ public Function getOnmozfullscreenerror() { */ @JsxSetter({FF, FF78}) public void setOnmozfullscreenerror(final Object mozfullscreenerror) { - setEventHandler("mozfullscreenerror", mozfullscreenerror); + setEventHandler(Event.TYPE_MOZFULLSCREENERROR, mozfullscreenerror); } /** @@ -965,7 +965,7 @@ public void setOnsubmit(final Object submit) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnmouseleave() { - return getEventHandler("mouseleave"); + return getEventHandler(Event.TYPE_MOUSELEAVE); } /** @@ -974,7 +974,7 @@ public Function getOnmouseleave() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnmouseleave(final Object mouseleave) { - setEventHandler("mouseleave", mouseleave); + setEventHandler(Event.TYPE_MOUSELEAVE, mouseleave); } /** @@ -983,7 +983,7 @@ public void setOnmouseleave(final Object mouseleave) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnmouseenter() { - return getEventHandler("mouseenter"); + return getEventHandler(Event.TYPE_MOUDEENTER); } /** @@ -992,7 +992,7 @@ public Function getOnmouseenter() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnmouseenter(final Object mouseenter) { - setEventHandler("mouseenter", mouseenter); + setEventHandler(Event.TYPE_MOUDEENTER, mouseenter); } /** @@ -1001,7 +1001,7 @@ public void setOnmouseenter(final Object mouseenter) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOndragleave() { - return getEventHandler("dragleave"); + return getEventHandler(Event.TYPE_DRAGLEAVE); } /** @@ -1010,7 +1010,7 @@ public Function getOndragleave() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOndragleave(final Object dragleave) { - setEventHandler("dragleave", dragleave); + setEventHandler(Event.TYPE_DRAGLEAVE, dragleave); } /** @@ -1019,7 +1019,7 @@ public void setOndragleave(final Object dragleave) { */ @JsxGetter({CHROME, EDGE}) public Function getOnmousewheel() { - return getEventHandler("mousewheel"); + return getEventHandler(Event.TYPE_MOUSEWHEEL); } /** @@ -1028,7 +1028,7 @@ public Function getOnmousewheel() { */ @JsxSetter({CHROME, EDGE}) public void setOnmousewheel(final Object mousewheel) { - setEventHandler("mousewheel", mousewheel); + setEventHandler(Event.TYPE_MOUSEWHEEL, mousewheel); } /** @@ -1037,7 +1037,7 @@ public void setOnmousewheel(final Object mousewheel) { @Override @JsxGetter({CHROME, EDGE}) public Function getOnpointerdown() { - return getEventHandler("pointerdown"); + return getEventHandler(Event.TYPE_POINTERDOWN); } /** @@ -1046,7 +1046,7 @@ public Function getOnpointerdown() { @Override @JsxSetter({CHROME, EDGE}) public void setOnpointerdown(final Object pointerdown) { - setEventHandler("pointerdown", pointerdown); + setEventHandler(Event.TYPE_POINTERDOWN, pointerdown); } /** @@ -1055,7 +1055,7 @@ public void setOnpointerdown(final Object pointerdown) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnseeking() { - return getEventHandler("seeking"); + return getEventHandler(Event.TYPE_SEEKING); } /** @@ -1064,7 +1064,7 @@ public Function getOnseeking() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnseeking(final Object seeking) { - setEventHandler("seeking", seeking); + setEventHandler(Event.TYPE_SEEKING, seeking); } /** @@ -1091,7 +1091,7 @@ public void setOnblur(final Object blur) { */ @JsxGetter({CHROME, EDGE}) public Function getOncuechange() { - return getEventHandler("cuechange"); + return getEventHandler(Event.TYPE_CUECHANGE); } /** @@ -1100,7 +1100,7 @@ public Function getOncuechange() { */ @JsxSetter({CHROME, EDGE}) public void setOncuechange(final Object cuechange) { - setEventHandler("cuechange", cuechange); + setEventHandler(Event.TYPE_CUECHANGE, cuechange); } /** @@ -1109,7 +1109,7 @@ public void setOncuechange(final Object cuechange) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOndrop() { - return getEventHandler("drop"); + return getEventHandler(Event.TYPE_DROP); } /** @@ -1118,7 +1118,7 @@ public Function getOndrop() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOndrop(final Object drop) { - setEventHandler("drop", drop); + setEventHandler(Event.TYPE_DROP, drop); } /** @@ -1127,7 +1127,7 @@ public void setOndrop(final Object drop) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOndragstart() { - return getEventHandler("dragstart"); + return getEventHandler(Event.TYPE_DRAGSTART); } /** @@ -1136,7 +1136,7 @@ public Function getOndragstart() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOndragstart(final Object dragstart) { - setEventHandler("dragstart", dragstart); + setEventHandler(Event.TYPE_DRAGSTART, dragstart); } /** @@ -1145,7 +1145,7 @@ public void setOndragstart(final Object dragstart) { */ @JsxGetter({FF, FF78}) public Function getOnmozfullscreenchange() { - return getEventHandler("mozfullscreenchange"); + return getEventHandler(Event.TYPE_MOZFULLSCREENCHANGE); } /** @@ -1154,7 +1154,7 @@ public Function getOnmozfullscreenchange() { */ @JsxSetter({FF, FF78}) public void setOnmozfullscreenchange(final Object mozfullscreenchange) { - setEventHandler("mozfullscreenchange", mozfullscreenchange); + setEventHandler(Event.TYPE_MOZFULLSCREENCHANGE, mozfullscreenchange); } /** @@ -1163,7 +1163,7 @@ public void setOnmozfullscreenchange(final Object mozfullscreenchange) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOndurationchange() { - return getEventHandler("durationchange"); + return getEventHandler(Event.TYPE_DURATIONCHANGE); } /** @@ -1172,7 +1172,7 @@ public Function getOndurationchange() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOndurationchange(final Object durationchange) { - setEventHandler("durationchange", durationchange); + setEventHandler(Event.TYPE_DURATIONCHANGE, durationchange); } /** @@ -1181,7 +1181,7 @@ public void setOndurationchange(final Object durationchange) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnplaying() { - return getEventHandler("playing"); + return getEventHandler(Event.TYPE_PLAYNG); } /** @@ -1190,7 +1190,7 @@ public Function getOnplaying() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnplaying(final Object playing) { - setEventHandler("playing", playing); + setEventHandler(Event.TYPE_PLAYNG, playing); } /** @@ -1217,7 +1217,7 @@ public void setOnload(final Object load) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnended() { - return getEventHandler("ended"); + return getEventHandler(Event.TYPE_ENDED); } /** @@ -1226,7 +1226,7 @@ public Function getOnended() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnended(final Object ended) { - setEventHandler("ended", ended); + setEventHandler(Event.TYPE_ENDED, ended); } /** @@ -1235,7 +1235,7 @@ public void setOnended(final Object ended) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnloadeddata() { - return getEventHandler("loadeddata"); + return getEventHandler(Event.TYPE_LOADEDDATA); } /** @@ -1244,61 +1244,61 @@ public Function getOnloadeddata() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnloadeddata(final Object loadeddata) { - setEventHandler("loadeddata", loadeddata); + setEventHandler(Event.TYPE_LOADEDDATA, loadeddata); } /** * Returns the {@code onshow} event handler. * @return the {@code onshow} event handler */ - @JsxGetter({FF, FF78}) + @JsxGetter(FF78) public Function getOnshow() { - return getEventHandler("show"); + return getEventHandler(Event.TYPE_SHOW); } /** * Sets the {@code onshow} event handler. * @param show the {@code onshow} event handler */ - @JsxSetter({FF, FF78}) + @JsxSetter(FF78) public void setOnshow(final Object show) { - setEventHandler("show", show); + setEventHandler(Event.TYPE_SHOW, show); } /** - * {@inheritDoc} + * Returns the {@code oncopy} event handler. + * @return the {@code oncopy} event handler */ - @Override - @JsxGetter({FF, FF78}) + @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOncopy() { - return getEventHandler("copy"); + return getEventHandler(Event.TYPE_COPY); } /** - * {@inheritDoc} + * Sets the {@code oncopy} event handler. + * @param copy the {@code oncopy} event handler */ - @Override - @JsxSetter({FF, FF78}) + @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOncopy(final Object copy) { - setEventHandler("copy", copy); + setEventHandler(Event.TYPE_COPY, copy); } /** - * {@inheritDoc} + * Returns the {@code onpaste} event handler. + * @return the {@code onpaste} event handler */ - @Override - @JsxGetter({FF, FF78}) + @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnpaste() { - return getEventHandler("paste"); + return getEventHandler(Event.TYPE_PASTE); } /** - * {@inheritDoc} + * Sets the {@code onpaste} event handler. + * @param paste the {@code onpaste} event handler */ - @Override @JsxSetter({FF, FF78}) public void setOnpaste(final Object paste) { - setEventHandler("paste", paste); + setEventHandler(Event.TYPE_PASTE, paste); } /** @@ -1325,7 +1325,7 @@ public void setOnmouseout(final Object mouseout) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnsuspend() { - return getEventHandler("suspend"); + return getEventHandler(Event.TYPE_SUSPEND); } /** @@ -1334,7 +1334,7 @@ public Function getOnsuspend() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnsuspend(final Object suspend) { - setEventHandler("suspend", suspend); + setEventHandler(Event.TYPE_SUSPEND, suspend); } /** @@ -1343,7 +1343,7 @@ public void setOnsuspend(final Object suspend) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnvolumechange() { - return getEventHandler("volumechange"); + return getEventHandler(Event.TYPE_VOLUMECHANGE); } /** @@ -1352,7 +1352,7 @@ public Function getOnvolumechange() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnvolumechange(final Object volumechange) { - setEventHandler("volumechange", volumechange); + setEventHandler(Event.TYPE_VOLUMECHANGE, volumechange); } /** @@ -1361,7 +1361,7 @@ public void setOnvolumechange(final Object volumechange) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnwaiting() { - return getEventHandler("waiting"); + return getEventHandler(Event.TYPE_WAITING); } /** @@ -1370,7 +1370,7 @@ public Function getOnwaiting() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnwaiting(final Object waiting) { - setEventHandler("waiting", waiting); + setEventHandler(Event.TYPE_WAITING, waiting); } /** @@ -1379,7 +1379,7 @@ public void setOnwaiting(final Object waiting) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOncanplay() { - return getEventHandler("canplay"); + return getEventHandler(Event.TYPE_CANPLAY); } /** @@ -1388,7 +1388,7 @@ public Function getOncanplay() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOncanplay(final Object canplay) { - setEventHandler("canplay", canplay); + setEventHandler(Event.TYPE_CANPLAY, canplay); } /** @@ -1415,7 +1415,7 @@ public void setOnmousedown(final Object mousedown) { */ @JsxGetter({CHROME, EDGE, FF, FF78}) public Function getOnemptied() { - return getEventHandler("emptied"); + return getEventHandler(Event.TYPE_EMPTIED); } /** @@ -1424,7 +1424,7 @@ public Function getOnemptied() { */ @JsxSetter({CHROME, EDGE, FF, FF78}) public void setOnemptied(final Object emptied) { - setEventHandler("emptied", emptied); + setEventHandler(Event.TYPE_EMPTIED, emptied); } /** @@ -1433,7 +1433,7 @@ public void setOnemptied(final Object emptied) { @Override @JsxGetter({CHROME, EDGE}) public Function getOngotpointercapture() { - return getEventHandler("gotpointercapture"); + return getEventHandler(Event.TYPE_GOTPOINTERCAPTURE); } /** @@ -1442,7 +1442,7 @@ public Function getOngotpointercapture() { @Override @JsxSetter({CHROME, EDGE}) public void setOngotpointercapture(final Object gotpointercapture) { - setEventHandler("gotpointercapture", gotpointercapture); + setEventHandler(Event.TYPE_GOTPOINTERCAPTURE, gotpointercapture); } /** @@ -1452,7 +1452,7 @@ public void setOngotpointercapture(final Object gotpointercapture) { @JsxGetter({CHROME, EDGE}) @Override public Function getOnwheel() { - return getEventHandler("wheel"); + return getEventHandler(Event.TYPE_WHEEL); } /** @@ -1462,6 +1462,6 @@ public Function getOnwheel() { @JsxSetter({CHROME, EDGE}) @Override public void setOnwheel(final Object onwheel) { - setEventHandler("wheel", onwheel); + setEventHandler(Event.TYPE_WHEEL, onwheel); } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGEllipseElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGEllipseElement.java index a4708fbd2..0db4dd929 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGEllipseElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGEllipseElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEBlendElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEBlendElement.java index 03890fd8a..9b9c7b28c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEBlendElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEBlendElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEColorMatrixElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEColorMatrixElement.java index ff82ecfe7..8faded502 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEColorMatrixElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEColorMatrixElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEComponentTransferElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEComponentTransferElement.java index fe5737fd7..3c83a1977 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEComponentTransferElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEComponentTransferElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFECompositeElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFECompositeElement.java index 04af8e268..b9a979197 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFECompositeElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFECompositeElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -36,25 +36,35 @@ public class SVGFECompositeElement extends SVGElement { /** The constant {@code SVG_FECOMPOSITE_OPERATOR_UNKNOWN}. */ @JsxConstant public static final int SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0; + /** The constant {@code SVG_FECOMPOSITE_OPERATOR_OVER}. */ @JsxConstant public static final int SVG_FECOMPOSITE_OPERATOR_OVER = 1; + /** The constant {@code SVG_FECOMPOSITE_OPERATOR_IN}. */ @JsxConstant public static final int SVG_FECOMPOSITE_OPERATOR_IN = 2; + /** The constant {@code SVG_FECOMPOSITE_OPERATOR_OUT}. */ @JsxConstant public static final int SVG_FECOMPOSITE_OPERATOR_OUT = 3; + /** The constant {@code SVG_FECOMPOSITE_OPERATOR_ATOP}. */ @JsxConstant public static final int SVG_FECOMPOSITE_OPERATOR_ATOP = 4; + /** The constant {@code SVG_FECOMPOSITE_OPERATOR_XOR}. */ @JsxConstant public static final int SVG_FECOMPOSITE_OPERATOR_XOR = 5; + /** The constant {@code SVG_FECOMPOSITE_OPERATOR_ARITHMETIC}. */ @JsxConstant public static final int SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6; + /** The constant {@code SVG_FECOMPOSITE_OPERATOR_LIGHTER}. */ + @JsxConstant(FF) + public static final int SVG_FECOMPOSITE_OPERATOR_LIGHTER = 7; + /** * Creates an instance. */ diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEConvolveMatrixElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEConvolveMatrixElement.java index baea5dcfa..a5d3862d6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEConvolveMatrixElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEConvolveMatrixElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDiffuseLightingElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDiffuseLightingElement.java index fde5d5477..73981cd0f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDiffuseLightingElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDiffuseLightingElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDisplacementMapElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDisplacementMapElement.java index 694c721f3..ae70fe261 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDisplacementMapElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDisplacementMapElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDistantLightElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDistantLightElement.java index 2cea1b386..c9ba80a92 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDistantLightElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDistantLightElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDropShadowElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDropShadowElement.java index da7155a7e..359484d5c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDropShadowElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEDropShadowElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFloodElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFloodElement.java index 535a3e3da..8dc31994b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFloodElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFloodElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncAElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncAElement.java index ba67ddf34..d3733f5ef 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncAElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncAElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncBElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncBElement.java index 30dfd6673..5e7dfd7ce 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncBElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncBElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncGElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncGElement.java index 4a43be543..862f4e5fe 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncGElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncGElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncRElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncRElement.java index 3ac293bc8..0e058b943 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncRElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEFuncRElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEGaussianBlurElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEGaussianBlurElement.java index 46ce20b45..8dfefee2f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEGaussianBlurElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEGaussianBlurElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEImageElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEImageElement.java index 97e9e7242..195272119 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEImageElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEImageElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEMergeElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEMergeElement.java index 4f3288fed..24f01bc2a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEMergeElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEMergeElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEMergeNodeElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEMergeNodeElement.java index 5edf930aa..9eb322336 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEMergeNodeElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEMergeNodeElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEMorphologyElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEMorphologyElement.java index 5336f6045..705e3f136 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEMorphologyElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEMorphologyElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEOffsetElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEOffsetElement.java index ba515049f..0d02fe1d0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEOffsetElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEOffsetElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEPointLightElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEPointLightElement.java index c5925e273..7b99e1d80 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEPointLightElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFEPointLightElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFESpecularLightingElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFESpecularLightingElement.java index 7e8aa68d7..b4effeabd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFESpecularLightingElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFESpecularLightingElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFESpotLightElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFESpotLightElement.java index 5f12759fb..e4d81586b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFESpotLightElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFESpotLightElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFETileElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFETileElement.java index db06f8dff..1fbc4a87f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFETileElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFETileElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFETurbulenceElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFETurbulenceElement.java index 3769f9b9d..abc0d3785 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFETurbulenceElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFETurbulenceElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFilterElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFilterElement.java index 86a8b8549..8c7e5a234 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFilterElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGFilterElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGForeignObjectElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGForeignObjectElement.java index 1f4271772..78a3c4b81 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGForeignObjectElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGForeignObjectElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGElement.java index 79f807227..99abe6062 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGeometryElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGeometryElement.java index 978de8dbe..e55ca47be 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGeometryElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGeometryElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGradientElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGradientElement.java index b8987bbb5..eb7df182e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGradientElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGradientElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGraphicsElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGraphicsElement.java index ef1c8d6f1..baada740c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGraphicsElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGGraphicsElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGImageElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGImageElement.java index 8506e9fb3..c6ef194ca 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGImageElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGImageElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLength.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLength.java index 49a9100c1..194ece03d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLength.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLength.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLengthList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLengthList.java index 20702d3d7..e3ab56434 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLengthList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLengthList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLineElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLineElement.java index 16807d054..9d1abe422 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLineElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLineElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLinearGradientElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLinearGradientElement.java index bb388b317..d93afa2a0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLinearGradientElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGLinearGradientElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMPathElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMPathElement.java index d0fb2a837..d5bb50758 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMPathElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMPathElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMarkerElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMarkerElement.java index 0686272f1..55de15612 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMarkerElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMarkerElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -36,22 +36,31 @@ public class SVGMarkerElement extends SVGElement { /** The constant {@code SVG_MARKER_ORIENT_UNKNOWN}. */ @JsxConstant public static final int SVG_MARKER_ORIENT_UNKNOWN = 0; + /** The constant {@code SVG_MARKERUNITS_UNKNOWN}. */ @JsxConstant public static final int SVG_MARKERUNITS_UNKNOWN = 0; + /** The constant {@code SVG_MARKER_ORIENT_AUTO}. */ @JsxConstant public static final int SVG_MARKER_ORIENT_AUTO = 1; + /** The constant {@code SVG_MARKERUNITS_USERSPACEONUSE}. */ @JsxConstant public static final int SVG_MARKERUNITS_USERSPACEONUSE = 1; + /** The constant {@code SVG_MARKER_ORIENT_ANGLE}. */ @JsxConstant public static final int SVG_MARKER_ORIENT_ANGLE = 2; + /** The constant {@code SVG_MARKERUNITS_STROKEWIDTH}. */ @JsxConstant public static final int SVG_MARKERUNITS_STROKEWIDTH = 2; + /** The constant {@code SVG_MARKER_ORIENT_AUTO_START_REVERSE}. */ + @JsxConstant(FF) + public static final int SVG_MARKER_ORIENT_AUTO_START_REVERSE = 3; + /** * Creates an instance. */ diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMaskElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMaskElement.java index c89724179..f204c5d82 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMaskElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMaskElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMatrix.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMatrix.java index f31372644..6ea1e6b4f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMatrix.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMatrix.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMetadataElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMetadataElement.java index 8018cb189..deabb1391 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMetadataElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGMetadataElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGNumber.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGNumber.java index 9fe5ef42e..00d0dcdb8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGNumber.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGNumber.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGNumberList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGNumberList.java index 73b94e908..8edd3db45 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGNumberList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGNumberList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathElement.java index b8716a64d..99b7a7c9a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSeg.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSeg.java index e732ef1eb..a726a7178 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSeg.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSeg.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegArcAbs.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegArcAbs.java index 62f9a58a1..66169ae14 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegArcAbs.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegArcAbs.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegArcRel.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegArcRel.java index f60b38c8c..a5ae47d39 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegArcRel.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegArcRel.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegClosePath.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegClosePath.java index 5c5479be1..8ea984b9b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegClosePath.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegClosePath.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicAbs.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicAbs.java index 4575a73c5..55fa738a8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicAbs.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicAbs.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicRel.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicRel.java index 5ae28810b..3ed41c3e1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicRel.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicRel.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicSmoothAbs.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicSmoothAbs.java index 9d2ff0f8c..93c3f2212 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicSmoothAbs.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicSmoothAbs.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicSmoothRel.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicSmoothRel.java index 7fcda472f..e5fdde595 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicSmoothRel.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoCubicSmoothRel.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticAbs.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticAbs.java index e022c852f..bf3e96932 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticAbs.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticAbs.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticRel.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticRel.java index 1c318b5d0..a69366728 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticRel.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticRel.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticSmoothAbs.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticSmoothAbs.java index 6d5036003..0378f3228 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticSmoothAbs.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticSmoothAbs.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticSmoothRel.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticSmoothRel.java index 97c3e40b4..ac71a778e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticSmoothRel.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegCurvetoQuadraticSmoothRel.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoAbs.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoAbs.java index 2aa046d0b..9995a9a81 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoAbs.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoAbs.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoHorizontalAbs.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoHorizontalAbs.java index 0e089ca20..f3a8618c2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoHorizontalAbs.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoHorizontalAbs.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoHorizontalRel.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoHorizontalRel.java index 51ce2d25b..a084a6596 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoHorizontalRel.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoHorizontalRel.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoRel.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoRel.java index c0ac5c56a..a14563aa7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoRel.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoRel.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoVerticalAbs.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoVerticalAbs.java index 170af6966..cb23ce2ae 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoVerticalAbs.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoVerticalAbs.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoVerticalRel.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoVerticalRel.java index 2d4b1b1c5..188a45953 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoVerticalRel.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegLinetoVerticalRel.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegList.java index a20d3f246..0d8d13d39 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegMovetoAbs.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegMovetoAbs.java index cc327b1d1..a0c57848a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegMovetoAbs.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegMovetoAbs.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegMovetoRel.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegMovetoRel.java index 67f0ec1ee..24d403d5b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegMovetoRel.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPathSegMovetoRel.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPatternElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPatternElement.java index 40f6506d4..99db72355 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPatternElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPatternElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPoint.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPoint.java index 4d07ad3fc..17a540576 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPoint.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPoint.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPointList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPointList.java index 854dda1a1..331cc3da0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPointList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPointList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPolygonElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPolygonElement.java index bcb35147c..3fcdfd4f6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPolygonElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPolygonElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPolylineElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPolylineElement.java index fea01aaed..d2bc1a06b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPolylineElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPolylineElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPreserveAspectRatio.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPreserveAspectRatio.java index 6148dce9a..5398bd475 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPreserveAspectRatio.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGPreserveAspectRatio.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGRadialGradientElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGRadialGradientElement.java index e8ef13720..70ac4548f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGRadialGradientElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGRadialGradientElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGRect.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGRect.java index 5a1f91807..59edeeb85 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGRect.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGRect.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGRectElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGRectElement.java index 60ea4065e..88d2b1eb6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGRectElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGRectElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSVGElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSVGElement.java index 016d09a28..ce9928828 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSVGElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSVGElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGScriptElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGScriptElement.java index f63666774..2d7944b90 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGScriptElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGScriptElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSetElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSetElement.java index 2dd7f48d6..33cfbad0b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSetElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSetElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGStopElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGStopElement.java index f63805ac7..1ee2007e7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGStopElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGStopElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGStringList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGStringList.java index de8397dc6..96f229c8f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGStringList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGStringList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGStyleElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGStyleElement.java index 989bcf71e..cbdab8218 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGStyleElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGStyleElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSwitchElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSwitchElement.java index 8fe447f75..e2a9ff22c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSwitchElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSwitchElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSymbolElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSymbolElement.java index a440bd37e..876f868d7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSymbolElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGSymbolElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTSpanElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTSpanElement.java index 63fa560c9..48a1a17d8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTSpanElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTSpanElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextContentElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextContentElement.java index e7cd5c492..5b5944e67 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextContentElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextContentElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextElement.java index b99d2ccd8..51993d2c7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextPathElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextPathElement.java index 66327b813..db7a64bfd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextPathElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextPathElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextPositioningElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextPositioningElement.java index 5ec3db6b8..a48e6e4be 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextPositioningElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTextPositioningElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTitleElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTitleElement.java index 5684b99a4..0c2e628be 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTitleElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTitleElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTransform.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTransform.java index adfea0e97..3e8286c0a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTransform.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTransform.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTransformList.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTransformList.java index 14f53ca14..7e3e3779a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTransformList.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGTransformList.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGUnitTypes.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGUnitTypes.java index 8a8d88f81..c19ff19cc 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGUnitTypes.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGUnitTypes.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGUseElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGUseElement.java index c05de1b1a..14d59134d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGUseElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGUseElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGViewElement.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGViewElement.java index 4e270d393..139b9cf46 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGViewElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/SVGViewElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/package-info.java index cbb6ff4dc..6531d8049 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/svg/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/webkitURL.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/webkitURL.java index 6408cd16c..1ac7bfc3a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/webkitURL.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/webkitURL.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/DedicatedWorkerGlobalScope.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/DedicatedWorkerGlobalScope.java index 089578921..0179fd5ac 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/DedicatedWorkerGlobalScope.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/DedicatedWorkerGlobalScope.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/ServiceWorker.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/ServiceWorker.java index 303bdbce3..65934426c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/ServiceWorker.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/ServiceWorker.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/ServiceWorkerContainer.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/ServiceWorkerContainer.java index 6b3660365..4e4caaeb4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/ServiceWorkerContainer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/ServiceWorkerContainer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/ServiceWorkerRegistration.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/ServiceWorkerRegistration.java index 4a0973831..ec541c2f0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/ServiceWorkerRegistration.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/ServiceWorkerRegistration.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/SyncManager.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/SyncManager.java index 7f75e7d79..0b072235e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/SyncManager.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/SyncManager.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/Worker.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/Worker.java index 7dc94cda8..0b39fadf2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/Worker.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/Worker.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/package-info.java index af7e725f9..11c08d69a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/worker/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/FormData.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/FormData.java index 2a7389cdb..00a2514df 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/FormData.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/FormData.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLDocument.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLDocument.java index 2a19f6b2a..eb35e8a83 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLDocument.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLDocument.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java index 265fdf346..481dedb5c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -79,6 +79,7 @@ import com.gargoylesoftware.htmlunit.javascript.host.file.Blob; import com.gargoylesoftware.htmlunit.util.EncodingSniffer; import com.gargoylesoftware.htmlunit.util.NameValuePair; +import com.gargoylesoftware.htmlunit.util.UrlUtils; import com.gargoylesoftware.htmlunit.util.WebResponseWrapper; import com.gargoylesoftware.htmlunit.xml.XmlPage; @@ -155,6 +156,7 @@ public class XMLHttpRequest extends XMLHttpRequestEventTarget { private final boolean caseSensitiveProperties_; private boolean withCredentials_; private int timeout_ = 0; + private boolean aborted_; /** * Creates a new instance. @@ -194,6 +196,14 @@ private void setState(final int state) { } private void fireJavascriptEvent(final String eventName) { + if (aborted_) { + if (LOG.isDebugEnabled()) { + LOG.debug("Firing javascript XHR event: " + eventName + " for an already aborted request - ignored."); + } + + return; + } + if (LOG.isDebugEnabled()) { LOG.debug("Firing javascript XHR event: " + eventName); } @@ -221,28 +231,7 @@ private void fireJavascriptEvent(final String eventName) { event = progressEvent; } - final JavaScriptEngine jsEngine = (JavaScriptEngine) containingPage_.getWebClient().getJavaScriptEngine(); - final Function onFunction = getFunctionForEvent(eventName); - if (onFunction != null) { - jsEngine.callFunction(containingPage_, onFunction, onFunction.getParentScope(), this, - new Object[]{event}); - } - - triggerJavascriptHandlers(jsEngine, getEventListenersContainer().getListeners(eventName, false), event); - triggerJavascriptHandlers(jsEngine, getEventListenersContainer().getListeners(eventName, true), event); - } - - private void triggerJavascriptHandlers(final JavaScriptEngine jsEngine, final List handlers, - final Event event) { - if (handlers != null) { - final Object[] parameter = {event}; - for (final Scriptable scriptable : handlers) { - if (scriptable instanceof Function) { - final Function function = (Function) scriptable; - jsEngine.callFunction(containingPage_, function, function.getParentScope(), this, parameter); - } - } - } + executeEventLocally(event); } /** @@ -386,6 +375,7 @@ public void abort() { fireJavascriptEvent(Event.TYPE_READY_STATE_CHANGE); fireJavascriptEvent(Event.TYPE_ABORT); fireJavascriptEvent(Event.TYPE_LOAD_END); + aborted_ = true; } /** @@ -480,7 +470,7 @@ public void open(final String method, final Object urlParam, final Object asyncP final WebRequest request = new WebRequest(fullUrl, getBrowserVersion().getXmlHttpRequestAcceptHeader(), getBrowserVersion().getAcceptEncodingHeader()); request.setCharset(UTF_8); - request.setAdditionalHeader(HttpHeader.REFERER, containingPage_.getUrl().toExternalForm()); + request.setRefererlHeader(containingPage_.getUrl()); if (!isSameOrigin(pageRequestUrl, fullUrl)) { final StringBuilder origin = new StringBuilder().append(pageRequestUrl.getProtocol()).append("://") @@ -531,7 +521,7 @@ public void open(final String method, final Object urlParam, final Object asyncP private boolean isAllowCrossDomainsFor(final URL newUrl) { return !(getBrowserVersion().hasFeature(XHR_NO_CROSS_ORIGIN_TO_ABOUT) - && "about".equals(newUrl.getProtocol())); + && UrlUtils.ABOUT.equals(newUrl.getProtocol())); } private static boolean isSameOrigin(final URL originUrl, final URL newUrl) { diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequestEventTarget.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequestEventTarget.java index 0fecaa36f..894a7e7ea 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequestEventTarget.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequestEventTarget.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,9 +19,6 @@ import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF; import static com.gargoylesoftware.htmlunit.javascript.configuration.SupportedBrowser.FF78; -import java.util.HashMap; -import java.util.Map; - import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter; @@ -38,12 +35,11 @@ * @author Ahmed Ashour * @author Ronald Brill * @author Thorsten Wendelmuth + * @author Atsushi Nakagawa */ @JsxClass public class XMLHttpRequestEventTarget extends EventTarget { - private final Map eventMapping_ = new HashMap<>(); - /** * Creates an instance. */ @@ -58,17 +54,13 @@ public static XMLHttpRequestEventTarget ctor() { throw ScriptRuntime.typeError("Illegal constructor."); } - public Function getFunctionForEvent(final String event) { - return eventMapping_.get(event); - } - /** * Returns the event handler that fires on load. * @return the event handler that fires on load */ @JsxGetter public Function getOnload() { - return getFunctionForEvent(Event.TYPE_LOAD); + return getEventHandler(Event.TYPE_LOAD); } /** @@ -77,7 +69,7 @@ public Function getOnload() { */ @JsxSetter public void setOnload(final Function loadHandler) { - eventMapping_.put(Event.TYPE_LOAD, loadHandler); + setEventHandler(Event.TYPE_LOAD, loadHandler); } /** @@ -86,7 +78,7 @@ public void setOnload(final Function loadHandler) { */ @JsxGetter public Function getOnerror() { - return getFunctionForEvent(Event.TYPE_ERROR); + return getEventHandler(Event.TYPE_ERROR); } /** @@ -95,7 +87,7 @@ public Function getOnerror() { */ @JsxSetter public void setOnerror(final Function errorHandler) { - eventMapping_.put(Event.TYPE_ERROR, errorHandler); + setEventHandler(Event.TYPE_ERROR, errorHandler); } /** @@ -104,7 +96,7 @@ public void setOnerror(final Function errorHandler) { */ @JsxGetter public Function getOnloadstart() { - return getFunctionForEvent(Event.TYPE_LOAD_START); + return getEventHandler(Event.TYPE_LOAD_START); } /** @@ -113,7 +105,7 @@ public Function getOnloadstart() { */ @JsxSetter public void setOnloadstart(final Function loadstartHandler) { - eventMapping_.put(Event.TYPE_LOAD_START, loadstartHandler); + setEventHandler(Event.TYPE_LOAD_START, loadstartHandler); } /** @@ -122,7 +114,7 @@ public void setOnloadstart(final Function loadstartHandler) { */ @JsxGetter public Function getOnloadend() { - return getFunctionForEvent(Event.TYPE_LOAD_END); + return getEventHandler(Event.TYPE_LOAD_END); } /** @@ -131,7 +123,7 @@ public Function getOnloadend() { */ @JsxSetter public void setOnloadend(final Function loadendHandler) { - eventMapping_.put(Event.TYPE_LOAD_END, loadendHandler); + setEventHandler(Event.TYPE_LOAD_END, loadendHandler); } /** @@ -140,7 +132,7 @@ public void setOnloadend(final Function loadendHandler) { */ @JsxGetter public Function getOnprogress() { - return getFunctionForEvent(Event.TYPE_PROGRESS); + return getEventHandler(Event.TYPE_PROGRESS); } /** @@ -149,7 +141,7 @@ public Function getOnprogress() { */ @JsxSetter public void setOnprogress(final Function progressHandler) { - eventMapping_.put(Event.TYPE_PROGRESS, progressHandler); + setEventHandler(Event.TYPE_PROGRESS, progressHandler); } /** @@ -158,7 +150,7 @@ public void setOnprogress(final Function progressHandler) { */ @JsxGetter public Function getOntimeout() { - return getFunctionForEvent(Event.TYPE_TIMEOUT); + return getEventHandler(Event.TYPE_TIMEOUT); } /** @@ -167,7 +159,7 @@ public Function getOntimeout() { */ @JsxSetter public void setOntimeout(final Function timeoutHandler) { - eventMapping_.put(Event.TYPE_TIMEOUT, timeoutHandler); + setEventHandler(Event.TYPE_TIMEOUT, timeoutHandler); } /** @@ -175,7 +167,7 @@ public void setOntimeout(final Function timeoutHandler) { * @return the event handler that fires on ready state change */ public Function getOnreadystatechange() { - return getFunctionForEvent(Event.TYPE_READY_STATE_CHANGE); + return getEventHandler(Event.TYPE_READY_STATE_CHANGE); } /** @@ -183,7 +175,7 @@ public Function getOnreadystatechange() { * @param readyStateChangeHandler the event handler that fires on ready state change */ public void setOnreadystatechange(final Function readyStateChangeHandler) { - eventMapping_.put(Event.TYPE_READY_STATE_CHANGE, readyStateChangeHandler); + setEventHandler(Event.TYPE_READY_STATE_CHANGE, readyStateChangeHandler); } /** @@ -192,7 +184,7 @@ public void setOnreadystatechange(final Function readyStateChangeHandler) { */ @JsxGetter public Function getOnabort() { - return getFunctionForEvent(Event.TYPE_ABORT); + return getEventHandler(Event.TYPE_ABORT); } /** @@ -201,6 +193,6 @@ public Function getOnabort() { */ @JsxSetter public void setOnabort(final Function abortHandler) { - eventMapping_.put(Event.TYPE_ABORT, abortHandler); + setEventHandler(Event.TYPE_ABORT, abortHandler); } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequestUpload.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequestUpload.java index dc1b421e6..4a0b41836 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequestUpload.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequestUpload.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLSerializer.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLSerializer.java index 9afecfe67..6175b2181 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLSerializer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLSerializer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XSLTProcessor.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XSLTProcessor.java index 196521ac9..119e14ce7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XSLTProcessor.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XSLTProcessor.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/package-info.java index 611cf03bd..1e97be4a5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/package-info.java index 5a8372596..270f1f1a0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/regexp/HtmlUnitRegExpProxy.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/regexp/HtmlUnitRegExpProxy.java index a2cf467ae..7c6586ccb 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/regexp/HtmlUnitRegExpProxy.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/regexp/HtmlUnitRegExpProxy.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/regexp/RegExpJsToJavaConverter.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/regexp/RegExpJsToJavaConverter.java index 206f30f4c..1d64df3af 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/regexp/RegExpJsToJavaConverter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/regexp/RegExpJsToJavaConverter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/regexp/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/regexp/package-info.java index 63ed73514..0c8a38d89 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/regexp/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/regexp/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/package-info.java index 25cea682b..f0b79aed3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/protocol/AnyHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/protocol/AnyHandler.java index 4f5492602..e213d7b7e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/protocol/AnyHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/protocol/AnyHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/protocol/about/AboutURLConnection.java b/src/main/java/com/gargoylesoftware/htmlunit/protocol/about/AboutURLConnection.java index 585b178e9..939ab7c40 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/protocol/about/AboutURLConnection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/protocol/about/AboutURLConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/protocol/about/Handler.java b/src/main/java/com/gargoylesoftware/htmlunit/protocol/about/Handler.java index cd7084bfe..d336047d4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/protocol/about/Handler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/protocol/about/Handler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/protocol/about/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/protocol/about/package-info.java index cea8f60d0..f5e05333f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/protocol/about/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/protocol/about/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/DataURLConnection.java b/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/DataURLConnection.java index ee053435f..d874989a5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/DataURLConnection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/DataURLConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/DataUrlDecoder.java b/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/DataUrlDecoder.java index 452d11417..996d321f4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/DataUrlDecoder.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/DataUrlDecoder.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/Handler.java b/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/Handler.java index 6fc76e8fb..e6df472fd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/Handler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/Handler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/package-info.java index 07d0d04db..41ff27082 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/protocol/data/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/protocol/javascript/Handler.java b/src/main/java/com/gargoylesoftware/htmlunit/protocol/javascript/Handler.java index fce523793..27ddc110a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/protocol/javascript/Handler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/protocol/javascript/Handler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/protocol/javascript/JavaScriptURLConnection.java b/src/main/java/com/gargoylesoftware/htmlunit/protocol/javascript/JavaScriptURLConnection.java index 75ca045f6..e0f6ed5ee 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/protocol/javascript/JavaScriptURLConnection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/protocol/javascript/JavaScriptURLConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/protocol/javascript/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/protocol/javascript/package-info.java index c2096eeea..538b9181a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/protocol/javascript/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/protocol/javascript/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/protocol/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/protocol/package-info.java index 492bf996f..4a8a0f4ba 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/protocol/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/protocol/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAltGlyph.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAltGlyph.java index 840988505..0f3b937f8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAltGlyph.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAltGlyph.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAltGlyphDef.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAltGlyphDef.java index b40e10060..b9e2a53f9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAltGlyphDef.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAltGlyphDef.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAltGlyphItem.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAltGlyphItem.java index 69a745ad8..07bc31b72 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAltGlyphItem.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAltGlyphItem.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnchor.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnchor.java index e89c7ade5..e6f27fca9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnchor.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnchor.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimate.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimate.java index 993ee7239..d3329c576 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimate.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimate.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimateColor.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimateColor.java index ff0fa0a3b..c71c382e1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimateColor.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimateColor.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimateMotion.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimateMotion.java index 3314dea9e..66ded523f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimateMotion.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimateMotion.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimateTransform.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimateTransform.java index 1d8c4a261..4c1f0a30c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimateTransform.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgAnimateTransform.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgCircle.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgCircle.java index 683062fac..73313663d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgCircle.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgCircle.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgClipPath.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgClipPath.java index 2c0b02397..1f4727d8a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgClipPath.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgClipPath.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgColorProfile.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgColorProfile.java index cdd7b7717..20fff87fc 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgColorProfile.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgColorProfile.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgCursor.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgCursor.java index f6f6c3f1b..5d9babf09 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgCursor.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgCursor.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgDefs.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgDefs.java index 1e7ddaa84..3cdbe5844 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgDefs.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgDefs.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgDesc.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgDesc.java index e7ce134ab..f22744175 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgDesc.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgDesc.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgElement.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgElement.java index 35949ba36..13a0e418b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgElement.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgElement.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgElementFactory.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgElementFactory.java index 2ac2e1f6d..3c46772b0 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgElementFactory.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgElementFactory.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgEllipse.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgEllipse.java index 219412e03..e7d7ecb25 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgEllipse.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgEllipse.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeBlend.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeBlend.java index ee5363c34..cdf8a6b85 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeBlend.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeBlend.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeColorMatrix.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeColorMatrix.java index 713a2008d..68cc5598b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeColorMatrix.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeColorMatrix.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeComponentTransfer.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeComponentTransfer.java index a75baa43f..06a0d9787 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeComponentTransfer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeComponentTransfer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeComposite.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeComposite.java index b98ba8589..05d5a0b5f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeComposite.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeComposite.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeConvolveMatrix.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeConvolveMatrix.java index 107507164..a91a5cfd1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeConvolveMatrix.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeConvolveMatrix.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeDiffuseLighting.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeDiffuseLighting.java index 515973bfa..52fb076be 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeDiffuseLighting.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeDiffuseLighting.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeDisplacementMap.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeDisplacementMap.java index 664925dcb..589655d92 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeDisplacementMap.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeDisplacementMap.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeDistantLight.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeDistantLight.java index cb3a3c12d..80522a8e5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeDistantLight.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeDistantLight.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFlood.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFlood.java index d977e9986..69e62b2ec 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFlood.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFlood.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncA.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncA.java index cb5cb3e32..742b2ca35 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncA.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncA.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncB.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncB.java index f8662c8cc..1bd1d5f44 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncB.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncB.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncG.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncG.java index 9ad489668..6b08113c7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncG.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncG.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncR.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncR.java index 0ac07e13f..4ab3c601e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncR.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeFuncR.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeGaussianBlur.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeGaussianBlur.java index b12d79d38..77a710893 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeGaussianBlur.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeGaussianBlur.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeImage.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeImage.java index 13a6bd767..42945962a 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeImage.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeImage.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeMerge.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeMerge.java index 22cf5f25c..4816017c5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeMerge.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeMerge.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeMergeNode.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeMergeNode.java index e7a90d1a4..8e1462e7b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeMergeNode.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeMergeNode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeMorphology.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeMorphology.java index e795ed9e7..4034c30ea 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeMorphology.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeMorphology.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeOffset.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeOffset.java index 5f088998f..70ca5e02e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeOffset.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeOffset.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFePointLight.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFePointLight.java index 78bca8ca7..f75013550 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFePointLight.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFePointLight.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeSpecularLighting.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeSpecularLighting.java index 8f801025a..f295c5c3c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeSpecularLighting.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeSpecularLighting.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeSpotLight.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeSpotLight.java index 3ac6088e4..d8fcbb4e4 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeSpotLight.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeSpotLight.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeTile.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeTile.java index eebefd5ba..a84c45a48 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeTile.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeTile.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeTurbulence.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeTurbulence.java index c628a7cbe..0b00efdae 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeTurbulence.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFeTurbulence.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFilter.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFilter.java index f1a783f71..7081b4b48 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFilter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFilter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFont.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFont.java index 6264f7852..75117245f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFont.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFont.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFace.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFace.java index e6c8d6e04..345291860 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFace.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFace.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceFormat.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceFormat.java index 5f3175ca0..deaac237f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceFormat.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceFormat.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceName.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceName.java index 09721baef..fca719a22 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceName.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceName.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceSrc.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceSrc.java index 33740af1e..03b554d7f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceSrc.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceSrc.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceURI.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceURI.java index 6d8fb707b..f0d834965 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceURI.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgFontFaceURI.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgForeignObject.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgForeignObject.java index 7a508ce20..27f81322b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgForeignObject.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgForeignObject.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgGlyph.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgGlyph.java index 7b904a0f2..40082bd2d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgGlyph.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgGlyph.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgGlyphRef.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgGlyphRef.java index 036382cea..4dbf202cf 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgGlyphRef.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgGlyphRef.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgGroup.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgGroup.java index 4720a3e9c..7d6f24fab 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgGroup.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgGroup.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgHKern.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgHKern.java index 43db34e8a..734cd2ca2 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgHKern.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgHKern.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgImage.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgImage.java index fa3c7dda1..2cb4040be 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgImage.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgImage.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgLine.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgLine.java index 539f042ba..c6700b976 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgLine.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgLine.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgLinearGradient.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgLinearGradient.java index 09c6cc67d..6d0dd00e3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgLinearGradient.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgLinearGradient.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMPath.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMPath.java index b5fc0b36e..eeb7aae5d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMPath.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMPath.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMarker.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMarker.java index 201c041fa..56b59a545 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMarker.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMarker.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMask.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMask.java index 8e0d64a91..8899c11c7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMask.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMask.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMetadata.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMetadata.java index 0711d3aeb..3780bb448 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMetadata.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMetadata.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMissingGlyph.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMissingGlyph.java index 08b4cf237..a157e81f1 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMissingGlyph.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgMissingGlyph.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPath.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPath.java index 3687830d4..4862a9a4d 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPath.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPath.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPattern.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPattern.java index 67ca7f1b3..8827aae24 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPattern.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPattern.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPolygon.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPolygon.java index c9fb00bc9..157b80843 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPolygon.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPolygon.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPolyline.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPolyline.java index ebcd45174..4b899d1b8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPolyline.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgPolyline.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgRadialGradient.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgRadialGradient.java index 848cb0dc7..203fecc38 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgRadialGradient.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgRadialGradient.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgRect.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgRect.java index cb494c966..b6943d1dd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgRect.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgRect.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgScript.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgScript.java index 36bc6e0a3..c988e03a3 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgScript.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgScript.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -97,6 +97,26 @@ public final String getCharsetAttribute() { return getAttributeDirect("charset"); } + /** + * Returns the value of the attribute {@code defer}. Refer to the + * HTML 4.01 + * documentation for details on the use of this attribute. + * + * @return the value of the attribute {@code defer} + * or an empty string if that attribute isn't defined. + */ + public final String getDeferAttribute() { + return getAttributeDirect("defer"); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isDeferred() { + return getDeferAttribute() != ATTRIBUTE_NOT_DEFINED; + } + /** * Executes the onreadystatechange handler when simulating IE, as well as executing * the script itself, if necessary. {@inheritDoc} diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgSet.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgSet.java index 493733413..ef1ba5cde 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgSet.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgSet.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgStop.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgStop.java index 949a2add1..f5cfe7008 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgStop.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgStop.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgStyle.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgStyle.java index 290f441f3..8059f8874 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgStyle.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgStyle.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgSwitch.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgSwitch.java index 1cbf0dfce..5d5984d89 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgSwitch.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgSwitch.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgSymbol.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgSymbol.java index 70addac2a..c961a32ff 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgSymbol.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgSymbol.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTRef.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTRef.java index f659d4716..fb763199c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTRef.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTRef.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTSpan.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTSpan.java index ed7325d5e..1d42945ef 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTSpan.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTSpan.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgText.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgText.java index c4372c790..b33afae0e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgText.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgText.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTextPath.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTextPath.java index 3b039b257..5553ecaee 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTextPath.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTextPath.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTitle.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTitle.java index 90089c0e7..594092448 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTitle.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgTitle.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgUse.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgUse.java index 8ca029f02..4babc83da 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgUse.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgUse.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgVKern.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgVKern.java index 0dd4438cf..f6ca613bd 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgVKern.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgVKern.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgView.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgView.java index f0b14d219..7d373d2b8 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgView.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgView.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/svg/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/svg/package-info.java index 42e1a6a28..7986b6234 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/svg/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/svg/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/Cookie.java b/src/main/java/com/gargoylesoftware/htmlunit/util/Cookie.java index 4701a3075..c9969705b 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/Cookie.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/Cookie.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -82,13 +82,18 @@ public Cookie(final String domain, final String name, final String value, final } final BasicClientCookie cookie = new BasicClientCookie(name, value == null ? "" : value); + cookie.setDomain(domain); + // BasicDomainHandler.match(Cookie, CookieOrigin) checks the attib also (see #333) + cookie.setAttribute(ClientCookie.DOMAIN_ATTR, domain); + cookie.setPath(path); cookie.setExpiryDate(expires); cookie.setSecure(secure); if (httpOnly) { cookie.setAttribute("httponly", "true"); } + httpClientCookie_ = cookie; } @@ -186,6 +191,13 @@ public boolean isHttpOnly() { return httpClientCookie_.getAttribute("httponly") != null; } + /** + * @return the SameSite value or {@code null} if not set. + */ + public String getSameSite() { + return httpClientCookie_.getAttribute("samesite"); + } + /** * {@inheritDoc} */ @@ -210,8 +222,11 @@ public boolean equals(final Object o) { final Cookie other = (Cookie) o; final String path = getPath() == null ? "/" : getPath(); final String otherPath = other.getPath() == null ? "/" : other.getPath(); - return new EqualsBuilder().append(getName(), other.getName()).append(getDomain(), other.getDomain()) - .append(path, otherPath).isEquals(); + return new EqualsBuilder() + .append(getName(), other.getName()) + .append(getDomain(), other.getDomain()) + .append(path, otherPath) + .isEquals(); } /** @@ -220,7 +235,11 @@ public boolean equals(final Object o) { @Override public int hashCode() { final String path = getPath() == null ? "/" : getPath(); - return new HashCodeBuilder().append(getName()).append(getDomain()).append(path).toHashCode(); + return new HashCodeBuilder() + .append(getName()) + .append(getDomain()) + .append(path) + .toHashCode(); } /** diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/DebuggingWebConnection.java b/src/main/java/com/gargoylesoftware/htmlunit/util/DebuggingWebConnection.java index 314daaf7d..eab0bc85c 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/DebuggingWebConnection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/DebuggingWebConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/EncodingSniffer.java b/src/main/java/com/gargoylesoftware/htmlunit/util/EncodingSniffer.java index f41bf50cd..1f589edca 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/EncodingSniffer.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/EncodingSniffer.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/FalsifyingWebConnection.java b/src/main/java/com/gargoylesoftware/htmlunit/util/FalsifyingWebConnection.java index 5adcefd19..91b81e4d9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/FalsifyingWebConnection.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/FalsifyingWebConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/HeaderUtils.java b/src/main/java/com/gargoylesoftware/htmlunit/util/HeaderUtils.java index a3d04a639..64ec124a6 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/HeaderUtils.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/HeaderUtils.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/KeyDataPair.java b/src/main/java/com/gargoylesoftware/htmlunit/util/KeyDataPair.java index 464408ef8..14622149e 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/KeyDataPair.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/KeyDataPair.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/MimeType.java b/src/main/java/com/gargoylesoftware/htmlunit/util/MimeType.java index b9f8f6a9b..939524855 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/MimeType.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/MimeType.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/NameValuePair.java b/src/main/java/com/gargoylesoftware/htmlunit/util/NameValuePair.java index 270ce5b58..5c3b6a150 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/NameValuePair.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/NameValuePair.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/StringUtils.java b/src/main/java/com/gargoylesoftware/htmlunit/util/StringUtils.java index ed7794a9b..58c1c9e23 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/StringUtils.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/StringUtils.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/TextUtils.java b/src/main/java/com/gargoylesoftware/htmlunit/util/TextUtils.java index 0dd2b2c4b..7535183cc 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/TextUtils.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/TextUtils.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/UrlUtils.java b/src/main/java/com/gargoylesoftware/htmlunit/util/UrlUtils.java index af60c7ea7..88ed9e010 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/UrlUtils.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/UrlUtils.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -30,7 +30,6 @@ import org.apache.commons.codec.net.URLCodec; import com.gargoylesoftware.htmlunit.WebAssert; -import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.protocol.AnyHandler; import com.gargoylesoftware.htmlunit.protocol.javascript.JavaScriptURLConnection; @@ -48,9 +47,19 @@ * @author Hartmut Arlt */ public final class UrlUtils { - private static final URLStreamHandler JS_HANDLER = new com.gargoylesoftware.htmlunit.protocol.javascript.Handler(); - private static final URLStreamHandler ABOUT_HANDLER = new com.gargoylesoftware.htmlunit.protocol.about.Handler(); - private static final URLStreamHandler DATA_HANDLER = new com.gargoylesoftware.htmlunit.protocol.data.Handler(); + + /** "about". */ + public static final String ABOUT = "about"; + /** "about:". */ + public static final String ABOUT_SCHEME = ABOUT + ":"; + /** "about:blank". */ + public static final String ABOUT_BLANK = ABOUT_SCHEME + "blank"; + /** URL for "about:blank". */ + public static final URL URL_ABOUT_BLANK; + + private static final URLStreamHandler JS_HANDLER; + private static final URLStreamHandler ABOUT_HANDLER; + private static final URLStreamHandler DATA_HANDLER; private static final BitSet PATH_ALLOWED_CHARS = new BitSet(256); private static final BitSet QUERY_ALLOWED_CHARS = new BitSet(256); @@ -61,6 +70,19 @@ public final class UrlUtils { * URI allowed char initialization; based on HttpClient 3.1's URI bit sets. */ static { + // make sure the handlers are available first (before calling toUrlSafe()) + JS_HANDLER = new com.gargoylesoftware.htmlunit.protocol.javascript.Handler(); + ABOUT_HANDLER = new com.gargoylesoftware.htmlunit.protocol.about.Handler(); + DATA_HANDLER = new com.gargoylesoftware.htmlunit.protocol.data.Handler(); + + try { + URL_ABOUT_BLANK = new URL(null, ABOUT_BLANK, ABOUT_HANDLER); + } + catch (final MalformedURLException e) { + // should never happen + throw new RuntimeException(e); + } + final BitSet reserved = new BitSet(256); reserved.set(';'); reserved.set('/'); @@ -227,11 +249,9 @@ public static URL toUrlUnsafe(final String url) throws MalformedURLException { return new URL(null, url, JS_HANDLER); } - if ("about".equals(protocol)) { - if (WebClient.URL_ABOUT_BLANK != null - && org.apache.commons.lang3.StringUtils. - equalsIgnoreCase(WebClient.URL_ABOUT_BLANK.toExternalForm(), url)) { - return WebClient.URL_ABOUT_BLANK; + if (ABOUT.equals(protocol)) { + if (org.apache.commons.lang3.StringUtils.equalsIgnoreCase(ABOUT_BLANK, url)) { + return URL_ABOUT_BLANK; } return new URL(null, url, ABOUT_HANDLER); } @@ -398,6 +418,17 @@ public static URL getUrlWithoutPathRefQuery(final URL u) throws MalformedURLExce return createNewUrl(u.getProtocol(), u.getAuthority(), null, null, null); } + /** + * Creates and returns a new URL using only the protocol, authority and path + * from the given one. + * @param u the URL on which to base the returned URL + * @return a new URL using only the protocol and authority from the given one + * @throws MalformedURLException if there is a problem creating the new URL + */ + public static URL getUrlWithoutRef(final URL u) throws MalformedURLException { + return createNewUrl(u.getProtocol(), u.getAuthority(), u.getPath(), null, u.getQuery()); + } + /** * Creates and returns a new URL identical to the specified URL, except using the specified protocol. * @param u the URL on which to base the returned URL @@ -438,7 +469,7 @@ public static URL getUrlWithNewHostAndPort(final URL u, final String newHost, fi /** * Creates and returns a new URL identical to the specified URL, except using the specified port. * @param u the URL on which to base the returned URL - * @param newPort the new port to use in the returned URL + * @param newPort the new port to use in the returned URL or -1 to remove it * @return a new URL identical to the specified URL, except using the specified port * @throws MalformedURLException if there is a problem creating the new URL */ @@ -461,7 +492,7 @@ public static URL getUrlWithNewPath(final URL u, final String newPath) throws Ma /** * Creates and returns a new URL identical to the specified URL, except using the specified reference. * @param u the URL on which to base the returned URL - * @param newRef the new reference to use in the returned URL + * @param newRef the new reference to use in the returned URL or null to remove it * @return a new URL identical to the specified URL, except using the specified reference * @throws MalformedURLException if there is a problem creating the new URL */ @@ -493,44 +524,44 @@ public static URL getUrlWithProtocolAndAuthority(final URL u) throws MalformedUR /** * Creates and returns a new URL identical to the specified URL but with a changed user name. * @param u the URL on which to base the returned URL - * @param newUserName the new user name + * @param newUserName the new user name or null to remove it * @return a new URL identical to the specified URL; only user name updated * @throws MalformedURLException if there is a problem creating the new URL */ public static URL getUrlWithNewUserName(final URL u, final String newUserName) throws MalformedURLException { - String newUserInfo = newUserName; + String newUserInfo = newUserName == null ? "" : newUserName; final String userInfo = u.getUserInfo(); if (org.apache.commons.lang3.StringUtils.isNotBlank(userInfo)) { final int colonIdx = userInfo.indexOf(':'); if (colonIdx > -1) { - newUserInfo = newUserName + userInfo.substring(colonIdx); + newUserInfo = newUserInfo + userInfo.substring(colonIdx); } } - return createNewUrl(u.getProtocol(), newUserInfo, + return createNewUrl(u.getProtocol(), newUserInfo.isEmpty() ? null : newUserInfo, u.getHost(), u.getPort(), u.getPath(), u.getRef(), u.getQuery()); } /** * Creates and returns a new URL identical to the specified URL but with a changed user password. * @param u the URL on which to base the returned URL - * @param newUserPassword the new user password + * @param newUserPassword the new user password or null to remove it * @return a new URL identical to the specified URL; only user name updated * @throws MalformedURLException if there is a problem creating the new URL */ public static URL getUrlWithNewUserPassword(final URL u, final String newUserPassword) throws MalformedURLException { - String newUserInfo = ':' + newUserPassword; + String newUserInfo = newUserPassword == null ? "" : (':' + newUserPassword); final String userInfo = u.getUserInfo(); if (org.apache.commons.lang3.StringUtils.isNotBlank(userInfo)) { final int colonIdx = userInfo.indexOf(':'); if (colonIdx > -1) { - newUserInfo = userInfo.substring(0, colonIdx + 1) + newUserPassword; + newUserInfo = userInfo.substring(0, colonIdx) + newUserInfo; } else { newUserInfo = userInfo + newUserInfo; } } - return createNewUrl(u.getProtocol(), newUserInfo, + return createNewUrl(u.getProtocol(), newUserInfo.isEmpty() ? null : newUserInfo, u.getHost(), u.getPort(), u.getPath(), u.getRef(), u.getQuery()); } @@ -624,7 +655,7 @@ private static URL createNewUrl(final String protocol, final String authority, s.append(ref); } - return new URL(s.toString()); + return toUrlSafe(s.toString()); } /** @@ -816,24 +847,45 @@ else if (startIndex < endIndex) { return url; } - /* + /** * Returns true if specified string is a valid scheme name. + * + * https://tools.ietf.org/html/rfc1738 + * + * Scheme names consist of a sequence of characters. The lower case + * letters "a"--"z", digits, and the characters plus ("+"), period + * ("."), and hyphen ("-") are allowed. For resiliency, programs + * interpreting URLs should treat upper case letters as equivalent to + * lower case in scheme names (e.g., allow "HTTP" as well as "http"). + * + * @param scheme the scheme string to check + * @return true if valid */ - private static boolean isValidScheme(final String scheme) { + public static boolean isValidScheme(final String scheme) { final int length = scheme.length(); if (length < 1) { return false; } + char c = scheme.charAt(0); - if (!Character.isLetter(c)) { + boolean isValid = ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'); + if (!isValid) { return false; } + for (int i = 1; i < length; i++) { c = scheme.charAt(i); - if (!Character.isLetterOrDigit(c) && c != '.' && c != '+' && c != '-') { + isValid = + ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') + || ('0' <= c && c <= '9') + || c == '+' + || c == '.' + || c == '-'; + if (!isValid) { return false; } } + return true; } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/WebClientUtils.java b/src/main/java/com/gargoylesoftware/htmlunit/util/WebClientUtils.java index eedbcdb44..246127f05 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/WebClientUtils.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/WebClientUtils.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/WebConnectionWrapper.java b/src/main/java/com/gargoylesoftware/htmlunit/util/WebConnectionWrapper.java index 5e9748b50..fa26199a5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/WebConnectionWrapper.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/WebConnectionWrapper.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/WebResponseWrapper.java b/src/main/java/com/gargoylesoftware/htmlunit/util/WebResponseWrapper.java index 25d259fac..b92e5b66f 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/WebResponseWrapper.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/WebResponseWrapper.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/XmlUtils.java b/src/main/java/com/gargoylesoftware/htmlunit/util/XmlUtils.java index 9d7412cf2..b680a7b47 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/XmlUtils.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/XmlUtils.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/util/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/util/package-info.java index 448ee8696..422701af9 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/util/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/util/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/websocket/JettyWebSocketAdapter.java b/src/main/java/com/gargoylesoftware/htmlunit/websocket/JettyWebSocketAdapter.java index 89074a2e3..57b50e022 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/websocket/JettyWebSocketAdapter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/websocket/JettyWebSocketAdapter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -35,7 +35,9 @@ * @author Ronald Brill */ public abstract class JettyWebSocketAdapter implements WebSocketAdapter { + private Object clientLock_ = new Object(); private WebSocketClient client_; + private volatile Session incomingSession_; private Session outgoingSession_; @@ -78,24 +80,28 @@ public JettyWebSocketAdapter(final WebClient webClient) { @Override public void start() throws Exception { - client_.start(); + synchronized (clientLock_) { + client_.start(); + } } @Override public void connect(final URI url) throws Exception { - final Future connectFuture = client_.connect(new JettyWebSocketAdapterImpl(), url); - client_.getExecutor().execute(new Runnable() { - @Override - public void run() { - try { - onWebSocketConnecting(); - incomingSession_ = connectFuture.get(); + synchronized (clientLock_) { + final Future connectFuture = client_.connect(new JettyWebSocketAdapterImpl(), url); + client_.getExecutor().execute(new Runnable() { + @Override + public void run() { + try { + onWebSocketConnecting(); + incomingSession_ = connectFuture.get(); + } + catch (final Exception e) { + onWebSocketConnectError(e); + } } - catch (final Exception e) { - onWebSocketConnectError(e); - } - } - }); + }); + } } @Override @@ -129,13 +135,15 @@ public void closeOutgoingSession() throws Exception { } @Override - public void closeClinet() throws Exception { - if (client_ != null) { - client_.stop(); - client_.destroy(); - - // TODO finally ? - client_ = null; + public void closeClient() throws Exception { + synchronized (clientLock_) { + if (client_ != null) { + client_.stop(); + client_.destroy(); + + // TODO finally ? + client_ = null; + } } } diff --git a/src/main/java/com/gargoylesoftware/htmlunit/websocket/WebSocketAdapter.java b/src/main/java/com/gargoylesoftware/htmlunit/websocket/WebSocketAdapter.java index c9ec4689a..de2771dcb 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/websocket/WebSocketAdapter.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/websocket/WebSocketAdapter.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -34,7 +34,7 @@ public interface WebSocketAdapter { void closeOutgoingSession() throws Exception; - void closeClinet() throws Exception; + void closeClient() throws Exception; void onWebSocketConnecting(); diff --git a/src/main/java/com/gargoylesoftware/htmlunit/websocket/WebSocketCookieStore.java b/src/main/java/com/gargoylesoftware/htmlunit/websocket/WebSocketCookieStore.java index 1f7b3f154..7e628c0f5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/websocket/WebSocketCookieStore.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/websocket/WebSocketCookieStore.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/websocket/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/websocket/package-info.java index 4f5f54b9a..cd921e752 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/websocket/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/websocket/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/webstart/WebStartHandler.java b/src/main/java/com/gargoylesoftware/htmlunit/webstart/WebStartHandler.java index 735336509..ddd2b68bb 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/webstart/WebStartHandler.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/webstart/WebStartHandler.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/webstart/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/webstart/package-info.java index 7e6ac155e..3ec0d69a5 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/webstart/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/webstart/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/xml/XmlPage.java b/src/main/java/com/gargoylesoftware/htmlunit/xml/XmlPage.java index d0e57fdf0..cc30fc127 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/xml/XmlPage.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/xml/XmlPage.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/com/gargoylesoftware/htmlunit/xml/package-info.java b/src/main/java/com/gargoylesoftware/htmlunit/xml/package-info.java index fe61611d7..86562cdfc 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/xml/package-info.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/xml/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/netscape/javascript/JSException.java b/src/main/java/netscape/javascript/JSException.java index 576ac1404..0926b761e 100644 --- a/src/main/java/netscape/javascript/JSException.java +++ b/src/main/java/netscape/javascript/JSException.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/netscape/javascript/JSObject.java b/src/main/java/netscape/javascript/JSObject.java index a4833f1d0..ae05173bf 100644 --- a/src/main/java/netscape/javascript/JSObject.java +++ b/src/main/java/netscape/javascript/JSObject.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/netscape/javascript/package-info.java b/src/main/java/netscape/javascript/package-info.java index c75b5f1ea..1f4c06777 100644 --- a/src/main/java/netscape/javascript/package-info.java +++ b/src/main/java/netscape/javascript/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main/java/netscape/package-info.java b/src/main/java/netscape/package-info.java index 596504261..d89ae15c9 100644 --- a/src/main/java/netscape/package-info.java +++ b/src/main/java/netscape/package-info.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/AbstractPageTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/AbstractPageTest.java index 5bd7f5a35..9c72d861a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/AbstractPageTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/AbstractPageTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/BinaryPageTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/BinaryPageTest.java index ae88b4916..ccd756a72 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/BinaryPageTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/BinaryPageTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserParameterizedRunner.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserParameterizedRunner.java index 8a6e90a33..1d94bae24 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserParameterizedRunner.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserParameterizedRunner.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserRunner.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserRunner.java index 1c5efe5e3..669c69b5a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserRunner.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserRunner.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -59,6 +59,7 @@ * @author Ahmed Ashour * @author Frank Danek * @author Ronald Brill + * @author cdalexndr */ public class BrowserRunner extends Suite { @@ -283,6 +284,17 @@ public enum TestedBrowser { String[] DEFAULT() default { EMPTY_DEFAULT }; } + /** + * Marks the os. + */ + public enum OS { + /** Linux. */ + Linux, + + /** Windows. */ + Windows + } + /** * Marks a test as not yet working for a particular browser (default value is all). * This will cause a failure to be considered as success and a success as failure forcing @@ -300,6 +312,12 @@ public enum TestedBrowser { TestedBrowser[] value() default { IE, EDGE, FF78, FF, CHROME }; + + /** + * The operating systems with which the case is not yet implemented. + * @return the operating systems + */ + OS[] os() default {}; } /** diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserRunnerTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserRunnerTest.java index 823836aa3..a1523a8a9 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserRunnerTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserRunnerTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserVersion2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserVersion2Test.java index 5a2a18ca6..6b7d67e7c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserVersion2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserVersion2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -156,8 +156,8 @@ public void acceptHeaderAnchorClickWithType() throws Exception { */ @Test @Alerts(DEFAULT = "Accept: image/webp,*/*", - CHROME = "Accept: image/avif,image/webp,image/apng,image/*,*/*;q=0.8", - EDGE = "Accept: image/webp,image/apng,image/*,*/*;q=0.8", + CHROME = "Accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", + EDGE = "Accept: image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", IE = "Accept: image/png, image/svg+xml, image/jxr, image/*;q=0.8, */*;q=0.5") public void acceptHeaderImage() throws Exception { final String html diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserVersionFeaturesTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserVersionFeaturesTest.java index 2bbdef87c..bf9f8563f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserVersionFeaturesTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserVersionFeaturesTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserVersionTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserVersionTest.java index b37fa1c21..dc41bcfee 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserVersionTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/BrowserVersionTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -31,11 +31,11 @@ public class BrowserVersionTest extends WebTestCase { */ @Test public void getBrowserVersionNumeric() { - assertEquals(84, BrowserVersion.FIREFOX.getBrowserVersionNumeric()); + assertEquals(88, BrowserVersion.FIREFOX.getBrowserVersionNumeric()); assertEquals(78, BrowserVersion.FIREFOX_78.getBrowserVersionNumeric()); assertEquals(11, BrowserVersion.INTERNET_EXPLORER.getBrowserVersionNumeric()); - assertEquals(87, BrowserVersion.CHROME.getBrowserVersionNumeric()); - assertEquals(87, BrowserVersion.EDGE.getBrowserVersionNumeric()); + assertEquals(90, BrowserVersion.CHROME.getBrowserVersionNumeric()); + assertEquals(90, BrowserVersion.EDGE.getBrowserVersionNumeric()); } /** diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/CacheTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/CacheTest.java index 446b414a3..a3784c88a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/CacheTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/CacheTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/CodeChecker.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/CodeChecker.java index 793a24b5c..50c058423 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/CodeChecker.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/CodeChecker.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/CodeStyleTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/CodeStyleTest.java index 3bd140481..55ff57f9a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/CodeStyleTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/CodeStyleTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/CookieManager2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/CookieManager2Test.java index de2d673c2..d0bc24a19 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/CookieManager2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/CookieManager2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -33,6 +33,7 @@ * @author Daniel Gredler * @author Ahmed Ashour * @author Marc Guillemot + * @author Ronald Brill */ @RunWith(BrowserRunner.class) public class CookieManager2Test extends SimpleWebTestCase { @@ -43,7 +44,7 @@ public class CookieManager2Test extends SimpleWebTestCase { @Test public void resettingCookie() throws Exception { final String html - = "foo\n" + = "\n" + "\n" + ""; final List responseHeader1 = new ArrayList<>(); - final String expires = DateUtils.formatDate(new Date(System.currentTimeMillis() + 5_000)); + final String expires = DateUtils.formatDate(new Date(System.currentTimeMillis() + 2_000)); responseHeader1.add(new NameValuePair("Set-Cookie", "first=1; expires=" + expires + ";")); getMockWebConnection().setResponse(URL_FIRST, html, 200, "OK", MimeType.TEXT_HTML, responseHeader1); - loadPageWithAlerts2(URL_FIRST, 10_000); + loadPageWithAlerts2(URL_FIRST, 4_000); } /** @@ -352,9 +352,7 @@ public void setCookieExpired_badDateFormat() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "cookie1=1", - FF = "cookie1=1; cookie2=2; cookie3=3", - FF78 = "cookie1=1; cookie2=2; cookie3=3", + @Alerts(DEFAULT = "cookie1=1; cookie2=2; cookie3=3", IE = "cookie1=1; cookie2=2; cookie3=3; cookie4=4; cookie5=5; cookie6=6") public void setCookieExpires_twoDigits() throws Exception { final List responseHeader1 = new ArrayList<>(); @@ -376,9 +374,7 @@ public void setCookieExpires_twoDigits() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "cookie1=1", - FF = "cookie1=1; cookie2=2; cookie3=3", - FF78 = "cookie1=1; cookie2=2; cookie3=3", + @Alerts(DEFAULT = "cookie1=1; cookie2=2; cookie3=3", IE = "cookie1=1; cookie2=2; cookie3=3; cookie4=4; cookie5=5; cookie6=6") public void setCookieExpires_twoDigits2() throws Exception { final List responseHeader1 = new ArrayList<>(); @@ -597,7 +593,7 @@ public void setCookieDuring302() throws Exception { + " function test() {\n" + " alertCookies();\n" - + " window.setTimeout(alertCookies, 5500);\n" + + " window.setTimeout(alertCookies, 2500);\n" + " }\n" + "\n" + ""; @@ -606,12 +602,12 @@ public void setCookieDuring302() throws Exception { final URL firstUrl = new URL(URL_FIRST, "/foo/test.html"); final List responseHeader1 = new ArrayList<>(); - final String expires = DateUtils.formatDate(new Date(System.currentTimeMillis() + 5_000)); + final String expires = DateUtils.formatDate(new Date(System.currentTimeMillis() + 2_000)); responseHeader1.add(new NameValuePair("Set-Cookie", "first=1; expires=" + expires + "; path=/foo")); responseHeader1.add(new NameValuePair("Location", "/foo/content.html")); getMockWebConnection().setResponse(firstUrl, "", 302, "Moved", MimeType.TEXT_HTML, responseHeader1); - loadPageWithAlerts2(firstUrl, 10_000); + loadPageWithAlerts2(firstUrl, 4_000); } /** @@ -704,7 +700,7 @@ public void cookieSetFromJSWithoutPathUsesCurrentLocation2() throws Exception { * @throws Exception in case of error * * This requires an entry in your hosts file - * 127.0.0.1 www.htmlunit-local.com + * 127.0.0.1 host1.htmlunit.org */ @Test @Alerts("JDSessionID=1234567890") @@ -728,14 +724,14 @@ public void issue270() throws Exception { + "var now = new Date();\n" + "now.setTime(now.getTime() + 60 * 60 * 1000);\n" - + "setCookie('JDSessionID', '1234567890', now, '/', 'htmlunit-local.com');\n" + + "setCookie('JDSessionID', '1234567890', now, '/', 'htmlunit.org');\n" // + "alert('cookies: ' + document.cookie);\n" + "\n" + ""; - final URL firstUrl = new URL("http://www.htmlunit-local.com:" + PORT + "/"); + final URL firstUrl = new URL("http://host1.htmlunit.org:" + PORT + "/"); getMockWebConnection().setResponse(firstUrl, html); loadPage2(html, firstUrl); diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProvider2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProvider2Test.java index a0686e65a..524de6952 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProvider2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProvider2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -393,7 +393,7 @@ public void basicAuthenticationXHR() throws Exception { ((DefaultCredentialsProvider) getWebClient().getCredentialsProvider()).addCredentials("jetty", "jetty"); getMockWebConnection().setResponse(URL_FIRST, html); getMockWebConnection().setResponse(URL_SECOND, "Hello World"); - loadPageWithAlerts(html, URL_FIRST, 200); + loadPageWithAlerts(html, URL_FIRST, DEFAULT_WAIT_TIME); } /** @@ -421,7 +421,7 @@ public void basicAuthenticationXHRWithUsername() throws Exception { ((DefaultCredentialsProvider) getWebClient().getCredentialsProvider()).addCredentials("jetty", "jetty"); getMockWebConnection().setResponse(URL_FIRST, html); getMockWebConnection().setResponse(URL_SECOND, "Hello World"); - loadPageWithAlerts(html, URL_FIRST, 100); + loadPageWithAlerts(html, URL_FIRST, DEFAULT_WAIT_TIME); } /** @@ -447,6 +447,6 @@ public void basicAuthenticationXHRWithUser() throws Exception { ((DefaultCredentialsProvider) getWebClient().getCredentialsProvider()).addCredentials("jetty", "jetty"); getMockWebConnection().setResponse(URL_FIRST, html); getMockWebConnection().setResponse(URL_SECOND, "Hello World"); - loadPageWithAlerts(html, URL_FIRST, 100); + loadPageWithAlerts(html, URL_FIRST, DEFAULT_WAIT_TIME); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProvider3Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProvider3Test.java index c01429874..142dd17b0 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProvider3Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProvider3Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProviderTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProviderTest.java index b24e77907..4435e163d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProviderTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultCredentialsProviderTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultPageCreator2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultPageCreator2Test.java index 8018fc072..671e74b9f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultPageCreator2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultPageCreator2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -52,7 +52,7 @@ public void determinePageType() { assertEquals(PageType.TEXT, DefaultPageCreator.determinePageType("text/css")); assertEquals(PageType.TEXT, DefaultPageCreator.determinePageType("text/xhtml")); - assertEquals(PageType.UNKNOWN, DefaultPageCreator.determinePageType(null)); + assertEquals(PageType.UNKNOWN, DefaultPageCreator.determinePageType((String) null)); assertEquals(PageType.UNKNOWN, DefaultPageCreator.determinePageType("")); assertEquals(PageType.UNKNOWN, DefaultPageCreator.determinePageType(" \t")); assertEquals(PageType.UNKNOWN, DefaultPageCreator.determinePageType("application/pdf")); diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultPageCreatorTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultPageCreatorTest.java index 825a96fda..c433ad1dc 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultPageCreatorTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/DefaultPageCreatorTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -108,9 +108,9 @@ protected void doGet(final HttpServletRequest request, final HttpServletResponse * @throws Exception if the test fails */ @Test - public void noContentType() throws Exception { + public void noContentTypeDoctype() throws Exception { final Map> servlets = new HashMap<>(); - servlets.put("/test", NoContentTypeServlet.class); + servlets.put("/test", NoContentTypeDoctypeServlet.class); startWebServer("./", null, servlets); final WebClient client = getWebClient(); @@ -119,16 +119,119 @@ public void noContentType() throws Exception { } /** - * Servlet for {@link #noContentType()}. + * Servlet for {@link #noContentTypeDoctype()}. */ - public static class NoContentTypeServlet extends HttpServlet { + public static class NoContentTypeDoctypeServlet extends HttpServlet { /** {@inheritDoc} */ @Override protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws IOException { final Writer writer = response.getWriter(); - writer.write("\n" + writer.write("Hello World"); + } + } + + /** + * @throws Exception if the test fails + */ + @Test + public void noContentTypeHtml() throws Exception { + final Map> servlets = new HashMap<>(); + servlets.put("/test", NoContentTypeHtmlServlet.class); + startWebServer("./", null, servlets); + + final WebClient client = getWebClient(); + final HtmlPage page = client.getPage(URL_FIRST + "test"); + assertNotNull(page); + } + + /** + * Servlet for {@link #noContentTypeHtml()}. + */ + public static class NoContentTypeHtmlServlet extends HttpServlet { + /** {@inheritDoc} */ + @Override + protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws IOException { + final Writer writer = response.getWriter(); + writer.write(" \n" + "Hello World"); } } + /** + * @throws Exception if the test fails + */ + @Test + public void noContentTypeHtmlStartsNotWith() throws Exception { + final Map> servlets = new HashMap<>(); + servlets.put("/test", NoContentTypeHtmlStartsNotWithServlet.class); + startWebServer("./", null, servlets); + + final WebClient client = getWebClient(); + final TextPage page = client.getPage(URL_FIRST + "test"); + assertNotNull(page); + } + + /** + * Servlet for {@link #noContentTypeHtmlStartsNotWith()}. + */ + public static class NoContentTypeHtmlStartsNotWithServlet extends HttpServlet { + /** {@inheritDoc} */ + @Override + protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws IOException { + final Writer writer = response.getWriter(); + writer.write(" Just to confuse the russians :-) Hello World"); + } + } + + /** + * @throws Exception if the test fails + */ + @Test + public void noContentTypeHead() throws Exception { + final Map> servlets = new HashMap<>(); + servlets.put("/test", NoContentTypeHeadServlet.class); + startWebServer("./", null, servlets); + + final WebClient client = getWebClient(); + final HtmlPage page = client.getPage(URL_FIRST + "test"); + assertNotNull(page); + } + + /** + * Servlet for {@link #noContentTypeHead()}. + */ + public static class NoContentTypeHeadServlet extends HttpServlet { + /** {@inheritDoc} */ + @Override + protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws IOException { + final Writer writer = response.getWriter(); + writer.write(" Hello World"); + } + } + + /** + * @throws Exception if the test fails + */ + @Test + public void noContentTypeScript() throws Exception { + final Map> servlets = new HashMap<>(); + servlets.put("/test", NoContentTypeScriptServlet.class); + startWebServer("./", null, servlets); + + final WebClient client = getWebClient(); + final HtmlPage page = client.getPage(URL_FIRST + "test"); + assertNotNull(page); + } + + /** + * Servlet for {@link #noContentTypeScript()}. + */ + public static class NoContentTypeScriptServlet extends HttpServlet { + /** {@inheritDoc} */ + @Override + protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws IOException { + final Writer writer = response.getWriter(); + writer.write("\n\n" + ""; diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMAttributeTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMAttributeTest.java index aca0cf631..970ab89af 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMAttributeTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMAttributeTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -48,7 +48,7 @@ public class XMLDOMAttributeTest extends WebDriverTestCase { @Alerts(DEFAULT = "no ActiveX", IE = "[object Object]") public void scriptableToString() throws Exception { - tester("alert(Object.prototype.toString.call(att));\n"); + tester("log(Object.prototype.toString.call(att));\n"); } /** @@ -79,11 +79,11 @@ public void baseName() throws Exception { IE = {"1", "#text", "test", "true", "true"}) public void childNodes() throws Exception { final String test = "" - + "alert(att.childNodes.length);\n" - + "alert(att.childNodes.item(0).nodeName);\n" - + "alert(att.childNodes.item(0).text);\n" - + "alert(att.childNodes.item(0).parentNode === att);\n" - + "alert(att.childNodes.item(0).ownerDocument === doc);\n"; + + "log(att.childNodes.length);\n" + + "log(att.childNodes.item(0).nodeName);\n" + + "log(att.childNodes.item(0).text);\n" + + "log(att.childNodes.item(0).parentNode === att);\n" + + "log(att.childNodes.item(0).ownerDocument === doc);\n"; tester(test); } @@ -100,7 +100,7 @@ public void childNodes_empty() throws Exception { + "" + ""; - tester("alert(att.childNodes.length);\n", xml); + tester("log(att.childNodes.length);\n", xml); } /** @@ -131,11 +131,11 @@ public void definition() throws Exception { IE = {"true", "#text", "test", "true", "true"}) public void firstChild() throws Exception { final String test = "" - + "alert(att.firstChild != null);\n" - + "alert(att.firstChild.nodeName);\n" - + "alert(att.firstChild.text);\n" - + "alert(att.firstChild.parentNode === att);\n" - + "alert(att.firstChild.ownerDocument === doc);\n"; + + "log(att.firstChild != null);\n" + + "log(att.firstChild.nodeName);\n" + + "log(att.firstChild.text);\n" + + "log(att.firstChild.parentNode === att);\n" + + "log(att.firstChild.ownerDocument === doc);\n"; tester(test); } @@ -152,7 +152,7 @@ public void firstChild_empty() throws Exception { + "" + ""; - tester("alert(att.firstChild != null);\n", xml); + tester("log(att.firstChild != null);\n", xml); } /** @@ -163,11 +163,11 @@ public void firstChild_empty() throws Exception { IE = {"true", "#text", "test", "true", "true"}) public void lastChild() throws Exception { final String test = "" - + "alert(att.lastChild != null);\n" - + "alert(att.lastChild.nodeName);\n" - + "alert(att.lastChild.text);\n" - + "alert(att.firstChild.parentNode === att);\n" - + "alert(att.firstChild.ownerDocument === doc);\n"; + + "log(att.lastChild != null);\n" + + "log(att.lastChild.nodeName);\n" + + "log(att.lastChild.text);\n" + + "log(att.firstChild.parentNode === att);\n" + + "log(att.firstChild.ownerDocument === doc);\n"; tester(test); } @@ -184,7 +184,7 @@ public void lastChild_empty() throws Exception { + "" + ""; - tester("alert(att.lastChild != null);\n", xml); + tester("log(att.lastChild != null);\n", xml); } /** @@ -196,11 +196,11 @@ public void lastChild_empty() throws Exception { public void name() throws Exception { final String test = "" + "try {\n" - + " alert(att.name);\n" - + "} catch(e) { alert('exception-read'); }\n" + + " log(att.name);\n" + + "} catch(e) { log('exception-read'); }\n" + "try {\n" + " att.name = 'other';\n" - + "} catch(e) { alert('exception-write'); }\n"; + + "} catch(e) { log('exception-write'); }\n"; tester(test); } @@ -244,15 +244,15 @@ public void nodeType() throws Exception { public void nodeValue() throws Exception { final String test = "" + "try {\n" - + " alert(att.nodeValue);\n" - + "} catch(e) { alert('exception-read'); }\n" + + " log(att.nodeValue);\n" + + "} catch(e) { log('exception-read'); }\n" + "try {\n" + " att.nodeValue = 'other';\n" - + " alert(att.nodeValue);\n" - + " alert(att.text);\n" - + " alert(att.value);\n" - + " alert(att.childNodes.length);\n" - + "} catch(e) { alert('exception-write'); }\n"; + + " log(att.nodeValue);\n" + + " log(att.text);\n" + + " log(att.value);\n" + + " log(att.childNodes.length);\n" + + "} catch(e) { log('exception-write'); }\n"; tester(test); } @@ -264,7 +264,7 @@ public void nodeValue() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void ownerDocument() throws Exception { - tester("alert(att.ownerDocument === doc);\n"); + tester("log(att.ownerDocument === doc);\n"); } /** @@ -274,18 +274,18 @@ public void ownerDocument() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void ownerDocument_created() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var att = doc.createAttribute('something');\n" + " try {\n" - + " alert(att.ownerDocument === doc);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(att.ownerDocument === doc);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -295,7 +295,7 @@ public void ownerDocument_created() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void parentNode() throws Exception { - tester("alert(att.parentNode == null);\n"); + tester("log(att.parentNode == null);\n"); } /** @@ -345,15 +345,15 @@ public void specified_inDTD() throws Exception { public void text() throws Exception { final String test = "" + "try {\n" - + " alert(att.text);\n" - + "} catch(e) { alert('exception-read'); }\n" + + " log(att.text);\n" + + "} catch(e) { log('exception-read'); }\n" + "try {\n" + " att.text = 'other';\n" - + " alert(att.text);\n" - + " alert(att.nodeValue);\n" - + " alert(att.value);\n" - + " alert(att.childNodes.length);\n" - + "} catch(e) { alert('exception-write'); }\n"; + + " log(att.text);\n" + + " log(att.nodeValue);\n" + + " log(att.value);\n" + + " log(att.childNodes.length);\n" + + "} catch(e) { log('exception-write'); }\n"; tester(test); } @@ -367,15 +367,15 @@ public void text() throws Exception { public void value() throws Exception { final String test = "" + "try {\n" - + " alert(att.value);\n" - + "} catch(e) { alert('exception-read'); }\n" + + " log(att.value);\n" + + "} catch(e) { log('exception-read'); }\n" + "try {\n" + " att.value = 'other';\n" - + " alert(att.value);\n" - + " alert(att.nodeValue);\n" - + " alert(att.text);\n" - + " alert(att.childNodes.length);\n" - + "} catch(e) { alert('exception-write'); }\n"; + + " log(att.value);\n" + + " log(att.nodeValue);\n" + + " log(att.text);\n" + + " log(att.childNodes.length);\n" + + "} catch(e) { log('exception-write'); }\n"; tester(test); } @@ -446,11 +446,11 @@ public void not_textContent() throws Exception { } private void property(final String property) throws Exception { - tester("alert(att." + property + ");\n"); + tester("log(att." + property + ");\n"); } private void property(final String property, final String xml) throws Exception { - tester("alert(att." + property + ");\n", xml); + tester("log(att." + property + ");\n", xml); } private void tester(final String test) throws Exception { @@ -463,7 +463,7 @@ private void tester(final String test) throws Exception { } private void tester(final String test, final String xml) throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" @@ -471,11 +471,11 @@ private void tester(final String test, final String xml) throws Exception { + " var elem = doc.documentElement.firstChild;\n" + " var att = elem.getAttributeNode('testAttr');\n" + test - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCDATASectionTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCDATASectionTest.java index 900c98bb7..210edb70f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCDATASectionTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCDATASectionTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -49,7 +49,7 @@ public class XMLDOMCDATASectionTest extends WebDriverTestCase { @Alerts(DEFAULT = "no ActiveX", IE = "[object Object]") public void scriptableToString() throws Exception { - tester("alert(Object.prototype.toString.call(cdata));\n"); + tester("log(Object.prototype.toString.call(cdata));\n"); } /** @@ -79,7 +79,7 @@ public void baseName() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "0") public void childNodes() throws Exception { - tester("alert(cdata.childNodes.length);\n"); + tester("log(cdata.childNodes.length);\n"); } /** @@ -87,41 +87,42 @@ public void childNodes() throws Exception { */ @Test @Alerts(DEFAULT = "no ActiveX", - IE = {" ", " ", " ", - "exception-setNull", - "", "", "", - "test", "test", "test", - "test\ntest", "test\ntest", "test\ntest", - "", "", ""}) + IE = {"#", " ", " ", " ", + "exception-setNull", + "", "", "", + "test", "test", "test", + "test\\ntest", "test\\ntest", "test\\ntest", + "", "", ""}) public void data() throws Exception { final String test = "" - + "alert(cdata.data);\n" - + "alert(cdata.nodeValue);\n" - + "alert(cdata.text);\n" + + "log('#');\n" + + "log(cdata.data);\n" + + "log(cdata.nodeValue);\n" + + "log(cdata.text);\n" // null + "try {\n" + " cdata.data = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "cdata.data = '';\n" - + "alert(cdata.data);\n" - + "alert(cdata.nodeValue);\n" - + "alert(cdata.text);\n" + + "log(cdata.data);\n" + + "log(cdata.nodeValue);\n" + + "log(cdata.text);\n" // normal + "cdata.data = 'test';\n" - + "alert(cdata.data);\n" - + "alert(cdata.nodeValue);\n" - + "alert(cdata.text);\n" + + "log(cdata.data);\n" + + "log(cdata.nodeValue);\n" + + "log(cdata.text);\n" // linebreak + "cdata.data = 'test\\ntest';\n" - + "alert(cdata.data);\n" - + "alert(cdata.nodeValue);\n" - + "alert(cdata.text);\n" + + "log(cdata.data);\n" + + "log(cdata.nodeValue);\n" + + "log(cdata.text);\n" // xml + "cdata.data = '';\n" - + "alert(cdata.data);\n" - + "alert(cdata.nodeValue);\n" - + "alert(cdata.text);\n"; + + "log(cdata.data);\n" + + "log(cdata.nodeValue);\n" + + "log(cdata.text);\n"; final String xml = "" + "" @@ -179,19 +180,19 @@ public void lastChild() throws Exception { IE = {"1", "0", "4", "9", "6"}) public void length() throws Exception { final String test = "" - + "alert(cdata.length);\n" + + "log(cdata.length);\n" // empty + "cdata.data = '';\n" - + "alert(cdata.length);\n" + + "log(cdata.length);\n" // normal + "cdata.data = 'test';\n" - + "alert(cdata.length);\n" + + "log(cdata.length);\n" // linebreak + "cdata.data = 'test\\ntest';\n" - + "alert(cdata.length);\n" + + "log(cdata.length);\n" // xml + "cdata.data = '';\n" - + "alert(cdata.length);\n"; + + "log(cdata.length);\n"; final String xml = "" + "" @@ -236,41 +237,42 @@ public void nodeType() throws Exception { */ @Test @Alerts(DEFAULT = "no ActiveX", - IE = {" ", " ", " ", - "exception-setNull", - "", "", "", - "test", "test", "test", - "test\ntest", "test\ntest", "test\ntest", - "", "", ""}) + IE = {"#", " ", " ", " ", + "exception-setNull", + "", "", "", + "test", "test", "test", + "test\\ntest", "test\\ntest", "test\\ntest", + "", "", ""}) public void nodeValue() throws Exception { final String test = "" - + "alert(cdata.nodeValue);\n" - + "alert(cdata.data);\n" - + "alert(cdata.text);\n" + + "log('#');\n" + + "log(cdata.nodeValue);\n" + + "log(cdata.data);\n" + + "log(cdata.text);\n" // null + "try {\n" + " cdata.nodeValue = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "cdata.nodeValue = '';\n" - + "alert(cdata.nodeValue);\n" - + "alert(cdata.data);\n" - + "alert(cdata.text);\n" + + "log(cdata.nodeValue);\n" + + "log(cdata.data);\n" + + "log(cdata.text);\n" // normal + "cdata.nodeValue = 'test';\n" - + "alert(cdata.nodeValue);\n" - + "alert(cdata.data);\n" - + "alert(cdata.text);\n" + + "log(cdata.nodeValue);\n" + + "log(cdata.data);\n" + + "log(cdata.text);\n" // linebreak + "cdata.nodeValue = 'test\\ntest';\n" - + "alert(cdata.nodeValue);\n" - + "alert(cdata.data);\n" - + "alert(cdata.text);\n" + + "log(cdata.nodeValue);\n" + + "log(cdata.data);\n" + + "log(cdata.text);\n" // xml + "cdata.nodeValue = '';\n" - + "alert(cdata.nodeValue);\n" - + "alert(cdata.data);\n" - + "alert(cdata.text);\n"; + + "log(cdata.nodeValue);\n" + + "log(cdata.data);\n" + + "log(cdata.text);\n"; final String xml = "" + "" @@ -295,7 +297,7 @@ public void nodeValue_empty() throws Exception { + "" + ""; - tester("alert(cdata.nodeValue);\n", xml); + tester("log(cdata.nodeValue);\n", xml); } /** @@ -305,7 +307,7 @@ public void nodeValue_empty() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void ownerDocument() throws Exception { - tester("alert(cdata.ownerDocument === doc);\n"); + tester("log(cdata.ownerDocument === doc);\n"); } /** @@ -316,17 +318,18 @@ public void ownerDocument() throws Exception { IE = "true") public void ownerDocument_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var cdata = doc.createCDATASection('something');\n" + " try {\n" - + " alert(cdata.ownerDocument === doc);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(cdata.ownerDocument === doc);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -341,7 +344,7 @@ public void parentNode() throws Exception { + "" + ""; - tester("alert(root === root.childNodes[0].parentNode);\n", xml); + tester("log(root === root.childNodes[0].parentNode);\n", xml); } /** @@ -352,17 +355,18 @@ public void parentNode() throws Exception { IE = "true") public void parentNode_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var cdata = doc.createCDATASection('something');\n" + " try {\n" - + " alert(cdata.parentNode == null);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(cdata.parentNode == null);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -380,41 +384,42 @@ public void prefix() throws Exception { */ @Test @Alerts(DEFAULT = "no ActiveX", - IE = {" ", " ", " ", - "exception-setNull", - "", "", "", - "test", "test", "test", - "test\ntest", "test\ntest", "test\ntest", - "", "", ""}) + IE = {"#", " ", " ", " ", + "exception-setNull", + "", "", "", + "test", "test", "test", + "test\\ntest", "test\\ntest", "test\\ntest", + "", "", ""}) public void text() throws Exception { final String test = "" - + "alert(cdata.text);\n" - + "alert(cdata.data);\n" - + "alert(cdata.nodeValue);\n" + + "log('#');\n" + + "log(cdata.text);\n" + + "log(cdata.data);\n" + + "log(cdata.nodeValue);\n" // null + "try {\n" + " cdata.text = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "cdata.text = '';\n" - + "alert(cdata.text);\n" - + "alert(cdata.data);\n" - + "alert(cdata.nodeValue);\n" + + "log(cdata.text);\n" + + "log(cdata.data);\n" + + "log(cdata.nodeValue);\n" // normal + "cdata.text = 'test';\n" - + "alert(cdata.text);\n" - + "alert(cdata.data);\n" - + "alert(cdata.nodeValue);\n" + + "log(cdata.text);\n" + + "log(cdata.data);\n" + + "log(cdata.nodeValue);\n" // linebreak + "cdata.text = 'test\\ntest';\n" - + "alert(cdata.text);\n" - + "alert(cdata.data);\n" - + "alert(cdata.nodeValue);\n" + + "log(cdata.text);\n" + + "log(cdata.data);\n" + + "log(cdata.nodeValue);\n" // xml + "cdata.text = '';\n" - + "alert(cdata.text);\n" - + "alert(cdata.data);\n" - + "alert(cdata.nodeValue);\n"; + + "log(cdata.text);\n" + + "log(cdata.data);\n" + + "log(cdata.nodeValue);\n"; final String xml = "" + "" @@ -432,25 +437,16 @@ public void text() throws Exception { IE = {"", "", "", "]]>"}) public void xml() throws Exception { final String test = "" - + "alert(cdata.xml);\n" + + "log(cdata.xml);\n" // text + "cdata = root.childNodes[1];\n" - + "var txt = cdata.xml;\n" - + "txt = txt.replace(/\\r/g, '\\\\r');\n" - + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n" + + "log(cdata.xml);\n" // linebreak + "cdata = root.childNodes[2];\n" - + "txt = cdata.xml;\n" - + "txt = txt.replace(/\\r/g, '\\\\r');\n" - + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n" + + "log(cdata.xml);\n" // xml + "cdata = root.childNodes[3];\n" - + "txt = cdata.xml;\n" - + "txt = txt.replace(/\\r/g, '\\\\r');\n" - + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n"; + + "log(cdata.xml);\n"; final String xml = "" + "" @@ -471,17 +467,18 @@ public void xml() throws Exception { IE = "") public void xml_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var cdata = doc.createCDATASection('');\n" + " try {\n" - + " alert(cdata.xml);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(cdata.xml);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -489,24 +486,23 @@ public void xml_created() throws Exception { */ @Test @Alerts(DEFAULT = "no ActiveX", - IE = {"myCDATA", "myCDATA-appended", "exception-appendNull", "myCDATA-appended", "myCDATA-appended\n"}) + IE = {"myCDATA", "myCDATA-appended", "exception-appendNull", "myCDATA-appended", "myCDATA-appended\\n"}) public void appendData() throws Exception { final String test = "" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // normal + "cdata.appendData('-appended');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // null + "try {\n" + " cdata.appendData(null);\n" - + "} catch(e) { alert('exception-appendNull'); }\n" + + "} catch(e) { log('exception-appendNull'); }\n" // empty + "cdata.appendData('');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // linebreak + "cdata.appendData('\\n');\n" - + "alert(cdata.data);\n"; - + + "log(cdata.data);\n"; tester(test); } @@ -516,44 +512,44 @@ public void appendData() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"myCDATA", "myCDAT", "myT", "yT", - "exception-deletePosNegative", "yT", - "exception-deletePosTooHigh", "yT", - "yT", - "exception-deleteCntNegative", "yT", - "y"}) + "exception-deletePosNegative", "yT", + "exception-deletePosTooHigh", "yT", + "yT", + "exception-deleteCntNegative", "yT", + "y"}) public void deleteData() throws Exception { final String test = "" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // back + "cdata.deleteData(6, 1);\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // middle + "cdata.deleteData(2, 3);\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // front + "cdata.deleteData(0, 1);\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // position negative + "try {\n" + " cdata.deleteData(-1, 1);\n" - + "} catch(e) { alert('exception-deletePosNegative'); }\n" - + "alert(cdata.data);\n" + + "} catch(e) { log('exception-deletePosNegative'); }\n" + + "log(cdata.data);\n" // position too high + "try {\n" + " cdata.deleteData(5, 1);\n" - + "} catch(e) { alert('exception-deletePosTooHigh'); }\n" - + "alert(cdata.data);\n" + + "} catch(e) { log('exception-deletePosTooHigh'); }\n" + + "log(cdata.data);\n" // count zero + "cdata.deleteData(1, 0);\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // count negative + "try {\n" + " cdata.deleteData(1, -1);\n" - + "} catch(e) { alert('exception-deleteCntNegative'); }\n" - + "alert(cdata.data);\n" + + "} catch(e) { log('exception-deleteCntNegative'); }\n" + + "log(cdata.data);\n" // count too high + "cdata.deleteData(1, 5);\n" - + "alert(cdata.data);\n"; + + "log(cdata.data);\n"; tester(test); } @@ -564,49 +560,49 @@ public void deleteData() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"myCDATA", "myCDATA-b", "myC-m-DATA-b", "f-myC-m-DATA-b", - "exception-insertNull", "f-myC-m-DATA-b", "\nf-myC-m-DATA-b", - "\nf-myC-m-DATA-b", - "exception-insertPosNegative", "\nf-myC-m-DATA-b", - "\nf-myC-m-DATA-b", - "exception-insertPosTooHigh", "\nf-myC-m-DATA-b"}) + "exception-insertNull", "f-myC-m-DATA-b", "\\nf-myC-m-DATA-b", + "\\nf-myC-m-DATA-b", + "exception-insertPosNegative", "\\nf-myC-m-DATA-b", + "\\nf-myC-m-DATA-b", + "exception-insertPosTooHigh", "\\nf-myC-m-DATA-b"}) public void insertData() throws Exception { final String test = "" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // back + "cdata.insertData(7, '-b');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // middle + "cdata.insertData(3, '-m-');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // front + "cdata.insertData(0, 'f-');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // null + "try {\n" + " cdata.insertData(0, null);\n" - + "} catch(e) { alert('exception-insertNull'); }\n" + + "} catch(e) { log('exception-insertNull'); }\n" // empty + "cdata.insertData(5, '');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // linebreak + "cdata.insertData(0, '\\n');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // empty and position negative + "cdata.insertData(-1, '');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // position negative + "try {\n" + " cdata.insertData(-1, 'X');\n" - + "} catch(e) { alert('exception-insertPosNegative'); }\n" - + "alert(cdata.data);\n" + + "} catch(e) { log('exception-insertPosNegative'); }\n" + + "log(cdata.data);\n" // empty and position too high + "cdata.insertData(25, '');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // position too high + "try {\n" + " cdata.insertData(25, 'Y');\n" - + "} catch(e) { alert('exception-insertPosTooHigh'); }\n" - + "alert(cdata.data);\n"; + + "} catch(e) { log('exception-insertPosTooHigh'); }\n" + + "log(cdata.data);\n"; tester(test); } @@ -617,55 +613,55 @@ public void insertData() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"myCDATA", "myCDAT-b", "my-m-T-b", "f-y-m-T-b", - "exception-replaceNull", "f-y--T-b", "f-y\nT-b", - "exception-replacePosNegative", "f-y\nT-b", - "exception-replacePosTooHigh", "f-y\nT-b", - "f-y\nT-b", - "exception-replaceCntNegative", "f-y\nT-b", - "f"}) + "exception-replaceNull", "f-y--T-b", "f-y\\nT-b", + "exception-replacePosNegative", "f-y\\nT-b", + "exception-replacePosTooHigh", "f-y\\nT-b", + "f-y\\nT-b", + "exception-replaceCntNegative", "f-y\\nT-b", + "f"}) public void replaceData() throws Exception { final String test = "" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // back + "cdata.replaceData(6, 1, '-b');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // middle + "cdata.replaceData(2, 3, '-m-');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // front + "cdata.replaceData(0, 1, 'f-');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // null + "try {\n" + " cdata.replaceData(0, 1, null);\n" - + "} catch(e) { alert('exception-replaceNull'); }\n" + + "} catch(e) { log('exception-replaceNull'); }\n" // empty + "cdata.replaceData(4, 1, '');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // linebreak + "cdata.replaceData(3, 2, '\\n');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // position negative + "try {\n" + " cdata.replaceData(-1, 1, '');\n" - + "} catch(e) { alert('exception-replacePosNegative'); }\n" - + "alert(cdata.data);\n" + + "} catch(e) { log('exception-replacePosNegative'); }\n" + + "log(cdata.data);\n" // position too high + "try {\n" + " cdata.replaceData(25, 1, '');\n" - + "} catch(e) { alert('exception-replacePosTooHigh'); }\n" - + "alert(cdata.data);\n" + + "} catch(e) { log('exception-replacePosTooHigh'); }\n" + + "log(cdata.data);\n" // count zero + "cdata.replaceData(1, 0, '');\n" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // count negative + "try {\n" + " cdata.replaceData(1, -1, '');\n" - + "} catch(e) { alert('exception-replaceCntNegative'); }\n" - + "alert(cdata.data);\n" + + "} catch(e) { log('exception-replaceCntNegative'); }\n" + + "log(cdata.data);\n" // count too high + "cdata.replaceData(1, 25, '');\n" - + "alert(cdata.data);\n"; + + "log(cdata.data);\n"; tester(test); } @@ -676,30 +672,30 @@ public void replaceData() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"1", "2", "#cdata-section", "2", "my", "#cdata-section", "5", "CDATA", "true", - "exception-splitPosNegative", "my", - "exception-splitPosTooHigh", "my"}) + "exception-splitPosNegative", "my", + "exception-splitPosTooHigh", "my"}) public void splitText() throws Exception { final String test = "" - + "alert(root.childNodes.length);\n" + + "log(root.childNodes.length);\n" + "var node = cdata.splitText(2);\n" - + "alert(root.childNodes.length);\n" - + "alert(root.childNodes[0].nodeName);\n" - + "alert(root.childNodes[0].length);\n" - + "alert(root.childNodes[0].text);\n" - + "alert(root.childNodes[1].nodeName);\n" - + "alert(root.childNodes[1].length);\n" - + "alert(root.childNodes[1].text);\n" - + "alert(node === root.childNodes[1]);\n" + + "log(root.childNodes.length);\n" + + "log(root.childNodes[0].nodeName);\n" + + "log(root.childNodes[0].length);\n" + + "log(root.childNodes[0].text);\n" + + "log(root.childNodes[1].nodeName);\n" + + "log(root.childNodes[1].length);\n" + + "log(root.childNodes[1].text);\n" + + "log(node === root.childNodes[1]);\n" // position negative + "try {\n" + " cdata.splitText(-1);\n" - + "} catch(e) { alert('exception-splitPosNegative'); }\n" - + "alert(cdata.data);\n" + + "} catch(e) { log('exception-splitPosNegative'); }\n" + + "log(cdata.data);\n" // position too high + "try {\n" + " cdata.splitText(25);\n" - + "} catch(e) { alert('exception-splitPosTooHigh'); }\n" - + "alert(cdata.data);\n"; + + "} catch(e) { log('exception-splitPosTooHigh'); }\n" + + "log(cdata.data);\n"; tester(test); } @@ -709,50 +705,50 @@ public void splitText() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"myCDATA", "A", "myCDATA", "CDA", "myCDATA", "m", "myCDATA", - "exception-substringPosNegative", "myCDATA", - "exception-substringPosTooHigh", "myCDATA", - "", "myCDATA", - "exception-substringCntNegative", "myCDATA", - "yCDATA", "myCDATA"}) + "exception-substringPosNegative", "myCDATA", + "exception-substringPosTooHigh", "myCDATA", + "", "myCDATA", + "exception-substringCntNegative", "myCDATA", + "yCDATA", "myCDATA"}) public void substringData() throws Exception { final String test = "" - + "alert(cdata.data);\n" + + "log(cdata.data);\n" // back - + "alert(cdata.substringData(6, 1));\n" - + "alert(cdata.data);\n" + + "log(cdata.substringData(6, 1));\n" + + "log(cdata.data);\n" // middle - + "alert(cdata.substringData(2, 3));\n" - + "alert(cdata.data);\n" + + "log(cdata.substringData(2, 3));\n" + + "log(cdata.data);\n" // front - + "alert(cdata.substringData(0, 1));\n" - + "alert(cdata.data);\n" + + "log(cdata.substringData(0, 1));\n" + + "log(cdata.data);\n" // position negative + "try {\n" + " cdata.substringData(-1, 1);\n" - + "} catch(e) { alert('exception-substringPosNegative'); }\n" - + "alert(cdata.data);\n" + + "} catch(e) { log('exception-substringPosNegative'); }\n" + + "log(cdata.data);\n" // position too high + "try {\n" + " cdata.substringData(25, 1);\n" - + "} catch(e) { alert('exception-substringPosTooHigh'); }\n" - + "alert(cdata.data);\n" + + "} catch(e) { log('exception-substringPosTooHigh'); }\n" + + "log(cdata.data);\n" // count zero - + "alert(cdata.substringData(1, 0));\n" - + "alert(cdata.data);\n" + + "log(cdata.substringData(1, 0));\n" + + "log(cdata.data);\n" // count negative + "try {\n" + " cdata.substringData(1, -1);\n" - + "} catch(e) { alert('exception-substringCntNegative'); }\n" - + "alert(cdata.data);\n" + + "} catch(e) { log('exception-substringCntNegative'); }\n" + + "log(cdata.data);\n" // count too high - + "alert(cdata.substringData(1, 25));\n" - + "alert(cdata.data);\n"; + + "log(cdata.substringData(1, 25));\n" + + "log(cdata.data);\n"; tester(test); } private void property(final String property) throws Exception { - tester("alert(cdata." + property + ");\n"); + tester("log(cdata." + property + ");\n"); } private void tester(final String test) throws Exception { @@ -763,6 +759,7 @@ private void tester(final String test) throws Exception { private void tester(final String test, final String xml) throws Exception { final String html = "" + + LOG_TITLE_NORMALIZE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'second.xml'") + ";\n" @@ -770,11 +767,11 @@ private void tester(final String test, final String xml) throws Exception { + " try {\n" + " var cdata = root.firstChild;\n" + test - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; getMockWebConnection().setDefaultResponse(xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCommentTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCommentTest.java index d14c7747c..b2ac5da52 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCommentTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMCommentTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -47,7 +47,7 @@ public class XMLDOMCommentTest extends WebDriverTestCase { @Alerts(DEFAULT = "no ActiveX", IE = "[object Object]") public void scriptableToString() throws Exception { - tester("alert(Object.prototype.toString.call(comment));\n"); + tester("log(Object.prototype.toString.call(comment));\n"); } /** @@ -77,7 +77,7 @@ public void baseName() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "0") public void childNodes() throws Exception { - tester("alert(comment.childNodes.length);\n"); + tester("log(comment.childNodes.length);\n"); } /** @@ -86,40 +86,40 @@ public void childNodes() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"", "", "", - "exception-setNull", - "", "", "", - "test", "test", "test", - "test\ntest", "test\ntest", "test\ntest", - "", "", ""}) + "exception-setNull", + "", "", "", + "test", "test", "test", + "test\\ntest", "test\\ntest", "test\\ntest", + "", "", ""}) public void data() throws Exception { final String test = "" - + "alert(comment.data);\n" - + "alert(comment.nodeValue);\n" - + "alert(comment.text);\n" + + "log(comment.data);\n" + + "log(comment.nodeValue);\n" + + "log(comment.text);\n" // null + "try {\n" + " comment.data = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "comment.data = '';\n" - + "alert(comment.data);\n" - + "alert(comment.nodeValue);\n" - + "alert(comment.text);\n" + + "log(comment.data);\n" + + "log(comment.nodeValue);\n" + + "log(comment.text);\n" // normal + "comment.data = 'test';\n" - + "alert(comment.data);\n" - + "alert(comment.nodeValue);\n" - + "alert(comment.text);\n" + + "log(comment.data);\n" + + "log(comment.nodeValue);\n" + + "log(comment.text);\n" // linebreak + "comment.data = 'test\\ntest';\n" - + "alert(comment.data);\n" - + "alert(comment.nodeValue);\n" - + "alert(comment.text);\n" + + "log(comment.data);\n" + + "log(comment.nodeValue);\n" + + "log(comment.text);\n" // xml + "comment.data = '';\n" - + "alert(comment.data);\n" - + "alert(comment.nodeValue);\n" - + "alert(comment.text);\n"; + + "log(comment.data);\n" + + "log(comment.nodeValue);\n" + + "log(comment.text);\n"; final String xml = "" + "" @@ -177,19 +177,19 @@ public void lastChild() throws Exception { IE = {"0", "0", "4", "9", "6"}) public void length() throws Exception { final String test = "" - + "alert(comment.length);\n" + + "log(comment.length);\n" // empty + "comment.data = '';\n" - + "alert(comment.length);\n" + + "log(comment.length);\n" // normal + "comment.data = 'test';\n" - + "alert(comment.length);\n" + + "log(comment.length);\n" // linebreak + "comment.data = 'test\\ntest';\n" - + "alert(comment.length);\n" + + "log(comment.length);\n" // xml + "comment.data = '';\n" - + "alert(comment.length);\n"; + + "log(comment.length);\n"; final String xml = "" + "" @@ -235,40 +235,40 @@ public void nodeType() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"", "", "", - "exception-setNull", - "", "", "", - "test", "test", "test", - "test\ntest", "test\ntest", "test\ntest", - "", "", ""}) + "exception-setNull", + "", "", "", + "test", "test", "test", + "test\\ntest", "test\\ntest", "test\\ntest", + "", "", ""}) public void nodeValue() throws Exception { final String test = "" - + "alert(comment.nodeValue);\n" - + "alert(comment.data);\n" - + "alert(comment.text);\n" + + "log(comment.nodeValue);\n" + + "log(comment.data);\n" + + "log(comment.text);\n" // null + "try {\n" + " comment.nodeValue = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "comment.nodeValue = '';\n" - + "alert(comment.nodeValue);\n" - + "alert(comment.data);\n" - + "alert(comment.text);\n" + + "log(comment.nodeValue);\n" + + "log(comment.data);\n" + + "log(comment.text);\n" // normal + "comment.nodeValue = 'test';\n" - + "alert(comment.nodeValue);\n" - + "alert(comment.data);\n" - + "alert(comment.text);\n" + + "log(comment.nodeValue);\n" + + "log(comment.data);\n" + + "log(comment.text);\n" // linebreak + "comment.nodeValue = 'test\\ntest';\n" - + "alert(comment.nodeValue);\n" - + "alert(comment.data);\n" - + "alert(comment.text);\n" + + "log(comment.nodeValue);\n" + + "log(comment.data);\n" + + "log(comment.text);\n" // xml + "comment.nodeValue = '';\n" - + "alert(comment.nodeValue);\n" - + "alert(comment.data);\n" - + "alert(comment.text);\n"; + + "log(comment.nodeValue);\n" + + "log(comment.data);\n" + + "log(comment.text);\n"; final String xml = "" + "" @@ -285,7 +285,7 @@ public void nodeValue() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void ownerDocument() throws Exception { - tester("alert(comment.ownerDocument === doc);\n"); + tester("log(comment.ownerDocument === doc);\n"); } /** @@ -296,17 +296,18 @@ public void ownerDocument() throws Exception { IE = "true") public void ownerDocument_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var comment = doc.createComment('something');\n" + " try {\n" - + " alert(comment.ownerDocument === doc);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(comment.ownerDocument === doc);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -316,7 +317,7 @@ public void ownerDocument_created() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void parentNode() throws Exception { - tester("alert(root === comment.parentNode);\n"); + tester("log(root === comment.parentNode);\n"); } /** @@ -327,17 +328,18 @@ public void parentNode() throws Exception { IE = "true") public void parentNode_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var comment = doc.createComment('something');\n" + " try {\n" - + " alert(comment.parentNode == null);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(comment.parentNode == null);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -356,40 +358,40 @@ public void prefix() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"", "", "", - "exception-setNull", - "", "", "", - "test", "test", "test", - "test\ntest", "test\ntest", "test\ntest", - "", "", ""}) + "exception-setNull", + "", "", "", + "test", "test", "test", + "test\\ntest", "test\\ntest", "test\\ntest", + "", "", ""}) public void text() throws Exception { final String test = "" - + "alert(comment.text);\n" - + "alert(comment.data);\n" - + "alert(comment.nodeValue);\n" + + "log(comment.text);\n" + + "log(comment.data);\n" + + "log(comment.nodeValue);\n" // null + "try {\n" + " comment.text = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "comment.text = '';\n" - + "alert(comment.text);\n" - + "alert(comment.data);\n" - + "alert(comment.nodeValue);\n" + + "log(comment.text);\n" + + "log(comment.data);\n" + + "log(comment.nodeValue);\n" // normal + "comment.text = 'test';\n" - + "alert(comment.text);\n" - + "alert(comment.data);\n" - + "alert(comment.nodeValue);\n" + + "log(comment.text);\n" + + "log(comment.data);\n" + + "log(comment.nodeValue);\n" // linebreak + "comment.text = 'test\\ntest';\n" - + "alert(comment.text);\n" - + "alert(comment.data);\n" - + "alert(comment.nodeValue);\n" + + "log(comment.text);\n" + + "log(comment.data);\n" + + "log(comment.nodeValue);\n" // xml + "comment.text = '';\n" - + "alert(comment.text);\n" - + "alert(comment.data);\n" - + "alert(comment.nodeValue);\n"; + + "log(comment.text);\n" + + "log(comment.data);\n" + + "log(comment.nodeValue);\n"; final String xml = "" + "" @@ -404,38 +406,33 @@ public void text() throws Exception { */ @Test @Alerts(DEFAULT = "no ActiveX", - IE = {"", "", "", "", ""}) + IE = {"", "", "", "", ""}) public void xml() throws Exception { final String test = // empty "var txt = comment.xml;\n" - + "txt = txt.replace(/\\r/g, '\\\\r');\n" - + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n" + + "txt = txt.replace(/ /g, '#');\n" + + "log(txt);\n" // blank + "comment = root.childNodes[1];\n" + "txt = comment.xml;\n" - + "txt = txt.replace(/\\r/g, '\\\\r');\n" - + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n" + + "txt = txt.replace(/ /g, '#');\n" + + "log(txt);\n" // normal + "comment = root.childNodes[2];\n" + "txt = comment.xml;\n" - + "txt = txt.replace(/\\r/g, '\\\\r');\n" - + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n" + + "txt = txt.replace(/ /g, '#');\n" + + "log(txt);\n" // linebreak + "comment = root.childNodes[3];\n" + "txt = comment.xml;\n" - + "txt = txt.replace(/\\r/g, '\\\\r');\n" - + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n" + + "txt = txt.replace(/ /g, '#');\n" + + "log(txt);\n" // space + "comment = root.childNodes[4];\n" + "txt = comment.xml;\n" - + "txt = txt.replace(/\\r/g, '\\\\r');\n" - + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n"; + + "txt = txt.replace(/ /g, '#');\n" + + "log(txt);\n"; final String xml = "" + "" @@ -457,17 +454,18 @@ public void xml() throws Exception { IE = "") public void xml_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var comment = doc.createComment('');\n" + " try {\n" - + " alert(comment.xml);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(comment.xml);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -475,23 +473,23 @@ public void xml_created() throws Exception { */ @Test @Alerts(DEFAULT = "no ActiveX", - IE = {"myComment", "myComment-appended", "exception-appendNull", "myComment-appended", "myComment-appended\n"}) + IE = {"myComment", "myComment-appended", "exception-appendNull", "myComment-appended", "myComment-appended\\n"}) public void appendData() throws Exception { final String test = "" - + "alert(comment.data);\n" + + "log(comment.data);\n" // normal + "comment.appendData('-appended');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // null + "try {\n" + " comment.appendData(null);\n" - + "} catch(e) { alert('exception-appendNull'); }\n" + + "} catch(e) { log('exception-appendNull'); }\n" // empty + "comment.appendData('');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // linebreak + "comment.appendData('\\n');\n" - + "alert(comment.data);\n"; + + "log(comment.data);\n"; tester(test); } @@ -502,44 +500,44 @@ public void appendData() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"myComment", "myCommen", "myCen", "yCen", - "exception-deletePosNegative", "yCen", - "exception-deletePosTooHigh", "yCen", - "yCen", - "exception-deleteCntNegative", "yCen", - "y"}) + "exception-deletePosNegative", "yCen", + "exception-deletePosTooHigh", "yCen", + "yCen", + "exception-deleteCntNegative", "yCen", + "y"}) public void deleteData() throws Exception { final String test = "" - + "alert(comment.data);\n" + + "log(comment.data);\n" // back + "comment.deleteData(8, 1);\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // middle + "comment.deleteData(3, 3);\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // front + "comment.deleteData(0, 1);\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // position negative + "try {\n" + " comment.deleteData(-1, 1);\n" - + "} catch(e) { alert('exception-deletePosNegative'); }\n" - + "alert(comment.data);\n" + + "} catch(e) { log('exception-deletePosNegative'); }\n" + + "log(comment.data);\n" // position too high + "try {\n" + " comment.deleteData(5, 1);\n" - + "} catch(e) { alert('exception-deletePosTooHigh'); }\n" - + "alert(comment.data);\n" + + "} catch(e) { log('exception-deletePosTooHigh'); }\n" + + "log(comment.data);\n" // count zero + "comment.deleteData(1, 0);\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // count negative + "try {\n" + " comment.deleteData(1, -1);\n" - + "} catch(e) { alert('exception-deleteCntNegative'); }\n" - + "alert(comment.data);\n" + + "} catch(e) { log('exception-deleteCntNegative'); }\n" + + "log(comment.data);\n" // count too high + "comment.deleteData(1, 5);\n" - + "alert(comment.data);\n"; + + "log(comment.data);\n"; tester(test); } @@ -550,49 +548,49 @@ public void deleteData() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"myComment", "myComment-b", "myCom-m-ment-b", "f-myCom-m-ment-b", - "exception-insertNull", "f-myCom-m-ment-b", "\nf-myCom-m-ment-b", - "\nf-myCom-m-ment-b", - "exception-insertPosNegative", "\nf-myCom-m-ment-b", - "\nf-myCom-m-ment-b", - "exception-insertPosTooHigh", "\nf-myCom-m-ment-b"}) + "exception-insertNull", "f-myCom-m-ment-b", "\\nf-myCom-m-ment-b", + "\\nf-myCom-m-ment-b", + "exception-insertPosNegative", "\\nf-myCom-m-ment-b", + "\\nf-myCom-m-ment-b", + "exception-insertPosTooHigh", "\\nf-myCom-m-ment-b"}) public void insertData() throws Exception { final String test = "" - + "alert(comment.data);\n" + + "log(comment.data);\n" // back + "comment.insertData(9, '-b');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // middle + "comment.insertData(5, '-m-');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // front + "comment.insertData(0, 'f-');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // null + "try {\n" + " comment.insertData(0, null);\n" - + "} catch(e) { alert('exception-insertNull'); }\n" + + "} catch(e) { log('exception-insertNull'); }\n" // empty + "comment.insertData(5, '');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // linebreak + "comment.insertData(0, '\\n');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // empty and position negative + "comment.insertData(-1, '');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // position negative + "try {\n" + " comment.insertData(-1, 'X');\n" - + "} catch(e) { alert('exception-insertPosNegative'); }\n" - + "alert(comment.data);\n" + + "} catch(e) { log('exception-insertPosNegative'); }\n" + + "log(comment.data);\n" // empty and position too high + "comment.insertData(25, '');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // position too high + "try {\n" + " comment.insertData(25, 'Y');\n" - + "} catch(e) { alert('exception-insertPosTooHigh'); }\n" - + "alert(comment.data);\n"; + + "} catch(e) { log('exception-insertPosTooHigh'); }\n" + + "log(comment.data);\n"; tester(test); } @@ -603,55 +601,55 @@ public void insertData() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"myComment", "myCommen-b", "myC-m-en-b", "f-yC-m-en-b", - "exception-replaceNull", "f-yCen-b", "f-y\nn-b", - "exception-replacePosNegative", "f-y\nn-b", - "exception-replacePosTooHigh", "f-y\nn-b", - "f-yC\nn-b", - "exception-replaceCntNegative", "f-yC\nn-b", - "fX"}) + "exception-replaceNull", "f-yCen-b", "f-y\\nn-b", + "exception-replacePosNegative", "f-y\\nn-b", + "exception-replacePosTooHigh", "f-y\\nn-b", + "f-yC\\nn-b", + "exception-replaceCntNegative", "f-yC\\nn-b", + "fX"}) public void replaceData() throws Exception { final String test = "" - + "alert(comment.data);\n" + + "log(comment.data);\n" // back + "comment.replaceData(8, 1, '-b');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // middle + "comment.replaceData(3, 3, '-m-');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // front + "comment.replaceData(0, 1, 'f-');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // null + "try {\n" + " comment.replaceData(0, 1, null);\n" - + "} catch(e) { alert('exception-replaceNull'); }\n" + + "} catch(e) { log('exception-replaceNull'); }\n" // empty + "comment.replaceData(4, 3, '');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // linebreak + "comment.replaceData(3, 2, '\\n');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // position negative + "try {\n" + " comment.replaceData(-1, 1, '');\n" - + "} catch(e) { alert('exception-replacePosNegative'); }\n" - + "alert(comment.data);\n" + + "} catch(e) { log('exception-replacePosNegative'); }\n" + + "log(comment.data);\n" // position too high + "try {\n" + " comment.replaceData(25, 1, '');\n" - + "} catch(e) { alert('exception-replacePosTooHigh'); }\n" - + "alert(comment.data);\n" + + "} catch(e) { log('exception-replacePosTooHigh'); }\n" + + "log(comment.data);\n" // count zero + "comment.replaceData(3, 0, 'C');\n" - + "alert(comment.data);\n" + + "log(comment.data);\n" // count negative + "try {\n" + " comment.replaceData(1, -1, '');\n" - + "} catch(e) { alert('exception-replaceCntNegative'); }\n" - + "alert(comment.data);\n" + + "} catch(e) { log('exception-replaceCntNegative'); }\n" + + "log(comment.data);\n" // count too high + "comment.replaceData(1, 25, 'X');\n" - + "alert(comment.data);\n"; + + "log(comment.data);\n"; tester(test); } @@ -662,50 +660,50 @@ public void replaceData() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"myComment", "t", "myComment", "omm", "myComment", "m", "myComment", - "exception-substringPosNegative", "myComment", - "exception-substringPosTooHigh", "myComment", - "", "myComment", - "exception-substringCntNegative", "myComment", - "yComment", "myComment"}) + "exception-substringPosNegative", "myComment", + "exception-substringPosTooHigh", "myComment", + "", "myComment", + "exception-substringCntNegative", "myComment", + "yComment", "myComment"}) public void substringData() throws Exception { final String test = "" - + "alert(comment.data);\n" + + "log(comment.data);\n" // back - + "alert(comment.substringData(8, 1));\n" - + "alert(comment.data);\n" + + "log(comment.substringData(8, 1));\n" + + "log(comment.data);\n" // middle - + "alert(comment.substringData(3, 3));\n" - + "alert(comment.data);\n" + + "log(comment.substringData(3, 3));\n" + + "log(comment.data);\n" // front - + "alert(comment.substringData(0, 1));\n" - + "alert(comment.data);\n" + + "log(comment.substringData(0, 1));\n" + + "log(comment.data);\n" // position negative + "try {\n" + " comment.substringData(-1, 1);\n" - + "} catch(e) { alert('exception-substringPosNegative'); }\n" - + "alert(comment.data);\n" + + "} catch(e) { log('exception-substringPosNegative'); }\n" + + "log(comment.data);\n" // position too high + "try {\n" + " comment.substringData(25, 1);\n" - + "} catch(e) { alert('exception-substringPosTooHigh'); }\n" - + "alert(comment.data);\n" + + "} catch(e) { log('exception-substringPosTooHigh'); }\n" + + "log(comment.data);\n" // count zero - + "alert(comment.substringData(1, 0));\n" - + "alert(comment.data);\n" + + "log(comment.substringData(1, 0));\n" + + "log(comment.data);\n" // count negative + "try {\n" + " comment.substringData(1, -1);\n" - + "} catch(e) { alert('exception-substringCntNegative'); }\n" - + "alert(comment.data);\n" + + "} catch(e) { log('exception-substringCntNegative'); }\n" + + "log(comment.data);\n" // count too high - + "alert(comment.substringData(1, 25));\n" - + "alert(comment.data);\n"; + + "log(comment.substringData(1, 25));\n" + + "log(comment.data);\n"; tester(test); } private void property(final String property) throws Exception { - tester("alert(comment." + property + ");\n"); + tester("log(comment." + property + ");\n"); } private void tester(final String test) throws Exception { @@ -716,6 +714,7 @@ private void tester(final String test) throws Exception { private void tester(final String test, final String xml) throws Exception { final String html = "" + + LOG_TITLE_NORMALIZE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'second.xml'") + ";\n" @@ -723,11 +722,11 @@ private void tester(final String test, final String xml) throws Exception { + " try {\n" + " var comment = root.firstChild;\n" + test - + " } catch(e) { alert('exception'+e.message); }\n" + + " } catch(e) { log('exception'+e.message); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; getMockWebConnection().setDefaultResponse(xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocument2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocument2Test.java index b0663c351..169d0ad94 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocument2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocument2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -53,14 +53,14 @@ public class XMLDOMDocument2Test extends WebDriverTestCase { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void async() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" - + " alert(doc.async);\n" + + " log(doc.async);\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -70,17 +70,17 @@ public void async() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = {"true", "books", "books", "1", "book", "0"}) public void load() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " doc.async = false;\n" - + " alert(doc.load('" + URL_SECOND + "'));\n" - + " alert(doc.documentElement.nodeName);\n" - + " alert(doc.childNodes[0].nodeName);\n" - + " alert(doc.childNodes[0].childNodes.length);\n" - + " alert(doc.childNodes[0].childNodes[0].nodeName);\n" - + " alert(doc.getElementsByTagName('books').item(0).attributes.length);\n" + + " log(doc.load('" + URL_SECOND + "'));\n" + + " log(doc.documentElement.nodeName);\n" + + " log(doc.childNodes[0].nodeName);\n" + + " log(doc.childNodes[0].childNodes.length);\n" + + " log(doc.childNodes[0].childNodes[0].nodeName);\n" + + " log(doc.getElementsByTagName('books').item(0).attributes.length);\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; @@ -93,7 +93,7 @@ public void load() throws Exception { + ""; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -104,17 +104,17 @@ public void load() throws Exception { IE = {"true", "books", "books", "1", "book", "0"}) // TODO what is the difference to load()? public void load_relativeURL() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " doc.async = false;\n" - + " alert(doc.load('" + URL_SECOND + "'));\n" - + " alert(doc.documentElement.nodeName);\n" - + " alert(doc.childNodes[0].nodeName);\n" - + " alert(doc.childNodes[0].childNodes.length);\n" - + " alert(doc.childNodes[0].childNodes[0].nodeName);\n" - + " alert(doc.getElementsByTagName('books').item(0).attributes.length);\n" + + " log(doc.load('" + URL_SECOND + "'));\n" + + " log(doc.documentElement.nodeName);\n" + + " log(doc.childNodes[0].nodeName);\n" + + " log(doc.childNodes[0].childNodes.length);\n" + + " log(doc.childNodes[0].childNodes[0].nodeName);\n" + + " log(doc.getElementsByTagName('books').item(0).attributes.length);\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; @@ -127,7 +127,7 @@ public void load_relativeURL() throws Exception { + ""; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -137,16 +137,16 @@ public void load_relativeURL() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "false") public void preserveWhiteSpace() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " try {\n" + " var doc = " + callCreateXMLDOMDocument() + ";\n" - + " alert(doc.preserveWhiteSpace);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(doc.preserveWhiteSpace);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -156,17 +156,17 @@ public void preserveWhiteSpace() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = {}) public void setProperty() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " try {\n" + " doc.setProperty('SelectionNamespaces', \"xmlns:xsl='http://www.w3.org/1999/XSL/Transform'\");\n" + " doc.setProperty('SelectionLanguage', 'XPath');\n" - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -176,15 +176,15 @@ public void setProperty() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = {"1", "books"}) public void selectNodes() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" + " try {\n" + " var nodes = doc.selectNodes('/books');\n" - + " alert(nodes.length);\n" - + " alert(nodes[0].tagName);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(nodes.length);\n" + + " log(nodes[0].tagName);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; @@ -197,7 +197,7 @@ public void selectNodes() throws Exception { + ""; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -207,14 +207,14 @@ public void selectNodes() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = {"0", "1"}) public void selectNodes_caseSensitive() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" + " try {\n" - + " alert(doc.selectNodes('/bOoKs').length);\n" - + " alert(doc.selectNodes('/books').length);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(doc.selectNodes('/bOoKs').length);\n" + + " log(doc.selectNodes('/books').length);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; @@ -227,7 +227,7 @@ public void selectNodes_caseSensitive() throws Exception { + ""; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -237,14 +237,14 @@ public void selectNodes_caseSensitive() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = {"2", "1"}) public void selectNodes_namespace() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" + " try {\n" - + " alert(doc.selectNodes('//ns1:title').length);\n" - + " alert(doc.selectNodes('//ns2:title').length);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(doc.selectNodes('//ns1:title').length);\n" + + " log(doc.selectNodes('//ns2:title').length);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; final String xml @@ -264,7 +264,7 @@ public void selectNodes_namespace() throws Exception { + ""; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -274,18 +274,18 @@ public void selectNodes_namespace() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = {"book", "null", "book", "null"}) public void selectNodes_nextNodeAndReset() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " try {\n" + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" + " var nodes = doc.selectNodes('//book');\n" - + " alert(nodes.nextNode().nodeName);\n" - + " alert(nodes.nextNode());\n" + + " log(nodes.nextNode().nodeName);\n" + + " log(nodes.nextNode());\n" + " nodes.reset();\n" - + " alert(nodes.nextNode().nodeName);\n" - + " alert(nodes.nextNode());\n" - + " } catch(e) { alert('exception'); }\n" + + " log(nodes.nextNode().nodeName);\n" + + " log(nodes.nextNode());\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; @@ -298,7 +298,7 @@ public void selectNodes_nextNodeAndReset() throws Exception { + ""; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -309,29 +309,29 @@ public void selectNodes_nextNodeAndReset() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = {"book", "0", "1"}) public void selectNodes_fromRoot() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" + " try {\n" + " var child = doc.documentElement.firstChild;\n" - + " alert(child.tagName);\n" + + " log(child.tagName);\n" + " try {\n" - + " alert(child.selectNodes('/title').length);\n" - + " } catch(e) { alert('exception /title'); }\n" + + " log(child.selectNodes('/title').length);\n" + + " } catch(e) { log('exception /title'); }\n" + " try {\n" - + " alert(child.selectNodes('title').length);\n" - + " } catch(e) { alert('exception title'); }\n" - + " } catch(e) { alert('exception'); }\n" + + " log(child.selectNodes('title').length);\n" + + " } catch(e) { log('exception title'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; final String xml = "ImmortalityJohn Smith"; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -341,20 +341,20 @@ public void selectNodes_fromRoot() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = {"book", "#document", "book", "#document"}) public void selectSingleNode() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var text='';\n" + " try {\n" + " var doc = " + callLoadXMLDOMDocumentFromString("text") + ";\n" - + " alert(doc.selectNodes('*')[0].nodeName);\n" - + " alert(doc.selectNodes('/')[0].nodeName);\n" - + " alert(doc.selectSingleNode('*').nodeName);\n" - + " alert(doc.selectNodes('*')[0].selectSingleNode('/').nodeName);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(doc.selectNodes('*')[0].nodeName);\n" + + " log(doc.selectNodes('/')[0].nodeName);\n" + + " log(doc.selectSingleNode('*').nodeName);\n" + + " log(doc.selectNodes('*')[0].selectSingleNode('/').nodeName);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_STRING_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -364,15 +364,15 @@ public void selectSingleNode() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "someprefix:test") public void loadXML_Namespace() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var text='';\n" + " var doc = " + callLoadXMLDOMDocumentFromString("text") + ";\n" - + " alert(doc.documentElement.tagName);\n" + + " log(doc.documentElement.tagName);\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_STRING_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -390,16 +390,16 @@ public void loadXML_Namespace() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "7") public void loadXML_XMLSpaceAttribute() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + "function test() {\n" + ACTIVEX_CHECK + " var text='This t" + "ext has in it';\n" + " var doc = " + callLoadXMLDOMDocumentFromString("text") + ";\n" - + " alert(doc.documentElement.childNodes.length);\n" + + " log(doc.documentElement.childNodes.length);\n" + "}\n" + LOAD_XMLDOMDOCUMENT_FROM_STRING_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -408,40 +408,40 @@ public void loadXML_XMLSpaceAttribute() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"same doc: false", "in first: 3", "book", "ownerDocument: doc1", - "in 2nd: 3", "ownerDocument: doc2", "first child ownerDocument: doc2", "in first: 2", "in 2nd: 4", - "ownerDocument: doc1", "in first: 2", "in 2nd: 3", - "ownerDocument: doc2", "in first: 1", "in 2nd: 4"}) + "in 2nd: 3", "ownerDocument: doc2", "first child ownerDocument: doc2", "in first: 2", "in 2nd: 4", + "ownerDocument: doc1", "in first: 2", "in 2nd: 3", + "ownerDocument: doc2", "in first: 1", "in 2nd: 4"}) public void moveChildBetweenDocuments() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + "function test() {\n" + ACTIVEX_CHECK + " var doc1 = " + callLoadXMLDOMDocumentFromURL("'foo.xml'") + ";\n" + " var doc2 = " + callLoadXMLDOMDocumentFromURL("'foo.xml'") + ";\n" - + " alert('same doc: ' + (doc1 == doc2));\n" + + " log('same doc: ' + (doc1 == doc2));\n" + " var doc1Root = doc1.firstChild;\n" - + " alert('in first: ' + doc1Root.childNodes.length);\n" + + " log('in first: ' + doc1Root.childNodes.length);\n" + " var doc1RootOriginalFirstChild = doc1Root.firstChild;\n" - + " alert(doc1RootOriginalFirstChild.tagName);\n" - + " alert('ownerDocument: ' + (doc1RootOriginalFirstChild.ownerDocument == doc1 ? 'doc1' : 'doc2'));\n" + + " log(doc1RootOriginalFirstChild.tagName);\n" + + " log('ownerDocument: ' + (doc1RootOriginalFirstChild.ownerDocument == doc1 ? 'doc1' : 'doc2'));\n" + "\n" + " var doc2Root = doc2.firstChild;\n" - + " alert('in 2nd: ' + doc2Root.childNodes.length);\n" + + " log('in 2nd: ' + doc2Root.childNodes.length);\n" + " doc2Root.appendChild(doc1RootOriginalFirstChild);\n" - + " alert('ownerDocument: ' + (doc1RootOriginalFirstChild.ownerDocument == doc1 ? 'doc1' : 'doc2'));\n" - + " alert('first child ownerDocument: ' + " + + " log('ownerDocument: ' + (doc1RootOriginalFirstChild.ownerDocument == doc1 ? 'doc1' : 'doc2'));\n" + + " log('first child ownerDocument: ' + " + "(doc1RootOriginalFirstChild.firstChild.ownerDocument == doc1 ? 'doc1' : 'doc2'));\n" - + " alert('in first: ' + doc1Root.childNodes.length);\n" - + " alert('in 2nd: ' + doc2Root.childNodes.length);\n" + + " log('in first: ' + doc1Root.childNodes.length);\n" + + " log('in 2nd: ' + doc2Root.childNodes.length);\n" + "\n" + " doc1Root.replaceChild(doc1RootOriginalFirstChild, doc1Root.firstChild);\n" - + " alert('ownerDocument: ' + (doc1RootOriginalFirstChild.ownerDocument == doc1 ? 'doc1' : 'doc2'));\n" - + " alert('in first: ' + doc1Root.childNodes.length);\n" - + " alert('in 2nd: ' + doc2Root.childNodes.length);\n" + + " log('ownerDocument: ' + (doc1RootOriginalFirstChild.ownerDocument == doc1 ? 'doc1' : 'doc2'));\n" + + " log('in first: ' + doc1Root.childNodes.length);\n" + + " log('in 2nd: ' + doc2Root.childNodes.length);\n" + "\n" + " doc2Root.insertBefore(doc1RootOriginalFirstChild, doc2Root.firstChild);\n" - + " alert('ownerDocument: ' + (doc1RootOriginalFirstChild.ownerDocument == doc1 ? 'doc1' : 'doc2'));\n" - + " alert('in first: ' + doc1Root.childNodes.length);\n" - + " alert('in 2nd: ' + doc2Root.childNodes.length);\n" + + " log('ownerDocument: ' + (doc1RootOriginalFirstChild.ownerDocument == doc1 ? 'doc1' : 'doc2'));\n" + + " log('in first: ' + doc1Root.childNodes.length);\n" + + " log('in 2nd: ' + doc2Root.childNodes.length);\n" + "\n" + "}\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; @@ -449,7 +449,7 @@ public void moveChildBetweenDocuments() throws Exception { final String xml = "</book><cd/><dvd/></order>"; getMockWebConnection().setResponse(new URL(URL_FIRST, "foo.xml"), xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -459,15 +459,15 @@ public void moveChildBetweenDocuments() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = {"1", "0", "1", "0"}) public void getElementsByTagName() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" - + " alert(doc.getElementsByTagName('book').length);\n" - + " alert(doc.getElementsByTagName('soap:book').length);\n" + + " log(doc.getElementsByTagName('book').length);\n" + + " log(doc.getElementsByTagName('soap:book').length);\n" + " var elem = doc.getElementsByTagName('book')[0];\n" - + " alert(elem.getElementsByTagName('title').length);\n" - + " alert(elem.getElementsByTagName('soap:title').length);\n" + + " log(elem.getElementsByTagName('title').length);\n" + + " log(elem.getElementsByTagName('soap:title').length);\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; @@ -482,7 +482,7 @@ public void getElementsByTagName() throws Exception { + "</soap:Envelope>"; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -492,15 +492,15 @@ public void getElementsByTagName() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = {"0", "1", "0", "1"}) public void getElementsByTagNameWithNamespace() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" - + " alert(doc.getElementsByTagName('book').length);\n" - + " alert(doc.getElementsByTagName('soap:book').length);\n" + + " log(doc.getElementsByTagName('book').length);\n" + + " log(doc.getElementsByTagName('soap:book').length);\n" + " var elem = doc.getElementsByTagName('soap:book')[0];\n" - + " alert(elem.getElementsByTagName('title').length);\n" - + " alert(elem.getElementsByTagName('soap:title').length);\n" + + " log(elem.getElementsByTagName('title').length);\n" + + " log(elem.getElementsByTagName('soap:title').length);\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; @@ -515,7 +515,7 @@ public void getElementsByTagNameWithNamespace() throws Exception { + "</soap:Envelope>"; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -525,14 +525,14 @@ public void getElementsByTagNameWithNamespace() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "1") public void xpathWithNamespaces() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + "function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" + " try {\n" - + " alert(doc.selectNodes('//soap:book').length);\n" + + " log(doc.selectNodes('//soap:book').length);\n" + " } catch (e) {\n" - + " alert(doc.evaluate('count(//book)', doc.documentElement, " + + " log(doc.evaluate('count(//book)', doc.documentElement, " + "null, XPathResult.NUMBER_TYPE, null).numberValue);\n" + " }\n" + "}\n" @@ -549,7 +549,7 @@ public void xpathWithNamespaces() throws Exception { + "</soap:Envelope>"; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -559,7 +559,7 @@ public void xpathWithNamespaces() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "1") public void selectionNamespaces() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + "var selectionNamespaces = 'xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" " + "xmlns:ns1=\"http://www.example.com/ns1\"';\n" + "function test() {\n" @@ -569,9 +569,9 @@ public void selectionNamespaces() throws Exception { + " doc.async = false;\n" + " doc.load('" + URL_SECOND + "');\n" + " try {\n" - + " alert(doc.selectNodes('/s:Envelope/ns1:books/s:book').length);\n" + + " log(doc.selectNodes('/s:Envelope/ns1:books/s:book').length);\n" + " } catch (e) {\n" - + " alert(doc.evaluate('count(//book)', doc.documentElement, " + + " log(doc.evaluate('count(//book)', doc.documentElement, " + "null, XPathResult.NUMBER_TYPE, null).numberValue);\n" + " }\n" + "}\n" @@ -588,7 +588,7 @@ public void selectionNamespaces() throws Exception { + "</soap:Envelope>"; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -598,11 +598,11 @@ public void selectionNamespaces() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "null") public void nodeFromID() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" - + " alert(doc.nodeFromID('target'));\n" + + " log(doc.nodeFromID('target'));\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; @@ -615,6 +615,6 @@ public void nodeFromID() throws Exception { + "</html>"; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocument3Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocument3Test.java index 12d652464..5cd1b7d24 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocument3Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocument3Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -47,9 +47,10 @@ public class XMLDOMDocument3Test extends WebDriverTestCase { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"myTarget,myData,7", "myTarget,myData", "abcdefghij", - "<?myTarget myData?>", "<![CDATA[abcdefghij]]>"}) + "<?myTarget myData?>", "<![CDATA[abcdefghij]]>"}) public void createProcessingInstruction() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" @@ -59,17 +60,17 @@ public void createProcessingInstruction() throws Exception { + " doc.appendChild(d);\n" + " var pi = doc.createProcessingInstruction('myTarget', 'myData');\n" + " doc.insertBefore(pi, d);\n" - + " alert(pi.nodeName + ',' + pi.nodeValue + ',' + pi.nodeType);\n" - + " alert(pi.target + ',' + pi.data);\n" + + " log(pi.nodeName + ',' + pi.nodeValue + ',' + pi.nodeType);\n" + + " log(pi.target + ',' + pi.data);\n" + " var cdata = doc.createCDATASection('abcdefghij');\n" + " d.appendChild(cdata);\n" - + " alert(cdata.data);\n" - + " alert(" + callSerializeXMLDOMDocumentToString("pi") + ");\n" - + " alert(" + callSerializeXMLDOMDocumentToString("cdata") + ");\n" + + " log(cdata.data);\n" + + " log(" + callSerializeXMLDOMDocumentToString("pi") + ");\n" + + " log(" + callSerializeXMLDOMDocumentToString("cdata") + ");\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION + SERIALIZE_XMLDOMDOCUMENT_TO_STRING_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -80,18 +81,19 @@ public void createProcessingInstruction() throws Exception { IE = "createNode not available") public void createNode() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromString("'<root><child/></root>'") + ";\n" + " if (document.createNode) {\n" + " var node = doc.createNode(2, 'Sci-Fi', '');\n" + " doc.documentElement.childNodes.item(0).attributes.setNamedItem(node);\n" - + " alert(" + callSerializeXMLDOMDocumentToString("doc.documentElement") + ");\n" - + " } else { alert('createNode not available'); }\n" + + " log(" + callSerializeXMLDOMDocumentToString("doc.documentElement") + ");\n" + + " } else { log('createNode not available'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_STRING_FUNCTION + SERIALIZE_XMLDOMDOCUMENT_TO_STRING_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -102,19 +104,20 @@ public void createNode() throws Exception { IE = "createNode not available") public void createNode_element() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " if (document.createNode) {\n" + " var node = doc.createNode(1, 'test:element', 'uri:test');\n" - + " alert(node.localName);\n" - + " alert(node.prefix);\n" - + " alert(node.namespaceURI);\n" - + " alert(node.nodeName);\n" - + " } else { alert('createNode not available'); }\n" + + " log(node.localName);\n" + + " log(node.prefix);\n" + + " log(node.namespaceURI);\n" + + " log(node.nodeName);\n" + + " } else { log('createNode not available'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -125,20 +128,21 @@ public void createNode_element() throws Exception { IE = {"a", "null", "b"}) public void documentElementCaching() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var a = doc.createElement('a');\n" + " var b = doc.createElement('b');\n" + " doc.appendChild(a);\n" - + " alert(doc.documentElement.tagName);\n" + + " log(doc.documentElement.tagName);\n" + " doc.removeChild(a);\n" - + " alert(doc.documentElement);\n" + + " log(doc.documentElement);\n" + " doc.appendChild(b);\n" - + " alert(doc.documentElement.tagName);\n" + + " log(doc.documentElement.tagName);\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -149,14 +153,15 @@ public void documentElementCaching() throws Exception { IE = "a:b") public void createElement_namespace() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var a = doc.createElement('a:b');\n" - + " alert(a.tagName);\n" + + " log(a.tagName);\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -169,6 +174,7 @@ public void createElement_namespace() throws Exception { IE = {"content", "content"}) public void text() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var xml = '<Envelope><Body>content</Body></Envelope>';\n" @@ -176,10 +182,10 @@ public void text() throws Exception { + " var expression = '/Envelope/Body';\n" + " var body = xmldoc.documentElement.selectSingleNode(expression);\n" - + " alert(body.text);\n" - + " alert(body.firstChild.text);\n" + + " log(body.text);\n" + + " log(body.firstChild.text);\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_STRING_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentFragmentTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentFragmentTest.java index 47f481bf2..bac293d01 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentFragmentTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentFragmentTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -45,7 +45,7 @@ public class XMLDOMDocumentFragmentTest extends WebDriverTestCase { @Alerts(DEFAULT = "no ActiveX", IE = "[object Object]") public void scriptableToString() throws Exception { - tester("alert(Object.prototype.toString.call(fragment));\n"); + tester("log(Object.prototype.toString.call(fragment));\n"); } /** @@ -74,7 +74,7 @@ public void baseName() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"4", "#cdata-section=child-cdata", "true", "#comment=child-comment", "true", - "child-element=null", "true", "#text=child-text", "true"}) + "child-element=null", "true", "#text=child-text", "true"}) public void childNodes() throws Exception { final String test = "" + "var cdata = doc.createCDATASection('child-cdata');\n" @@ -87,19 +87,19 @@ public void childNodes() throws Exception { + "fragment.appendChild(text);\n" + "var fragment2 = doc.createDocumentFragment();\n" + "fragment.appendChild(fragment2);\n" - + "alert(fragment.childNodes.length);\n" + + "log(fragment.childNodes.length);\n" // cdata + "debug(fragment.childNodes[0]);\n" - + "alert(fragment.childNodes[0] === cdata);\n" + + "log(fragment.childNodes[0] === cdata);\n" // comment + "debug(fragment.childNodes[1]);\n" - + "alert(fragment.childNodes[1] === comment);\n" + + "log(fragment.childNodes[1] === comment);\n" // element + "debug(fragment.childNodes[2]);\n" - + "alert(fragment.childNodes[2] === element);\n" + + "log(fragment.childNodes[2] === element);\n" // text + "debug(fragment.childNodes[3]);\n" - + "alert(fragment.childNodes[3] === text);\n"; + + "log(fragment.childNodes[3] === text);\n"; // no fragment tester(test); @@ -112,7 +112,7 @@ public void childNodes() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "0") public void childNodes_none() throws Exception { - tester("alert(fragment.childNodes.length);\n"); + tester("log(fragment.childNodes.length);\n"); } /** @@ -146,7 +146,7 @@ public void firstChild() throws Exception { + "var element = doc.createElement('child-element');\n" + "fragment.appendChild(element);\n" + "debug(fragment.firstChild);\n" - + "alert(fragment.firstChild === element);\n"; + + "log(fragment.firstChild === element);\n"; tester(test); } @@ -172,7 +172,7 @@ public void lastChild() throws Exception { + "var element = doc.createElement('child-element');\n" + "fragment.appendChild(element);\n" + "debug(fragment.lastChild);\n" - + "alert(fragment.lastChild === element);\n"; + + "log(fragment.lastChild === element);\n"; tester(test); } @@ -225,19 +225,19 @@ public void nodeType() throws Exception { IE = {"null", "exception-setNull", "exception-setEmpty", "exception-set"}) public void nodeValue() throws Exception { final String test = "" - + "alert(fragment.nodeValue);\n" + + "log(fragment.nodeValue);\n" // null + "try {\n" + " fragment.nodeValue = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "try {\n" + " fragment.nodeValue = '';\n" - + "} catch(e) { alert('exception-setEmpty'); }\n" + + "} catch(e) { log('exception-setEmpty'); }\n" // normal + "try {\n" + " fragment.nodeValue = 'test';\n" - + "} catch(e) { alert('exception-set'); }\n"; + + "} catch(e) { log('exception-set'); }\n"; tester(test); } @@ -249,7 +249,7 @@ public void nodeValue() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void ownerDocument() throws Exception { - tester("alert(fragment.ownerDocument === doc);\n"); + tester("log(fragment.ownerDocument === doc);\n"); } /** @@ -294,7 +294,7 @@ public void text() throws Exception { + "fragment.appendChild(text);\n" + "var fragment2 = doc.createDocumentFragment();\n" + "fragment.appendChild(fragment2);\n" - + "alert(fragment.text);\n"; + + "log(fragment.text);\n"; tester(test); } @@ -310,15 +310,15 @@ public void text_set() throws Exception { // normal "try {\n" + " fragment.text = 'text';\n" - + "} catch(e) { alert('exception-set'); }\n" + + "} catch(e) { log('exception-set'); }\n" // empty + "try {\n" + " fragment.text = '';\n" - + "} catch(e) { alert('exception-setEmpty'); }\n" + + "} catch(e) { log('exception-setEmpty'); }\n" // null + "try {\n" + " fragment.text = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n"; + + "} catch(e) { log('exception-setNull'); }\n"; tester(test); } @@ -328,14 +328,14 @@ public void text_set() throws Exception { */ @Test @Alerts(DEFAULT = "no ActiveX", - IE = "c\nct\nt") + IE = "c ct t") public void text_lineBreak() throws Exception { final String test = "" + "var cdata = doc.createCDATASection('c\\nc');\n" + "fragment.appendChild(cdata);\n" + "var text = doc.createTextNode('t\\nt');\n" + "fragment.appendChild(text);\n" - + "alert(fragment.text);\n"; + + "log(fragment.text);\n"; tester(test); } @@ -348,17 +348,18 @@ public void text_lineBreak() throws Exception { IE = "") public void text_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var fragment = doc.createDocumentFragment();\n" + " try {\n" - + " alert(fragment.text);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(fragment.text);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -384,7 +385,7 @@ public void xml() throws Exception { + "fragment.appendChild(text);\n" + "var fragment2 = doc.createDocumentFragment();\n" + "fragment.appendChild(fragment2);\n" - + "alert(fragment.xml);\n"; + + "log(fragment.xml);\n"; tester(test); } @@ -402,7 +403,7 @@ public void xml_lineBreak() throws Exception { + "var txt = fragment.xml;\n" + "txt = txt.replace('\\r', '\\\\r');\n" + "txt = txt.replace('\\n', '\\\\n');\n" - + "alert(txt);\n"; + + "log(txt);\n"; tester(test); } @@ -415,21 +416,22 @@ public void xml_lineBreak() throws Exception { IE = "") public void xml_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var fragment = doc.createDocumentFragment();\n" + " try {\n" - + " alert(fragment.xml);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(fragment.xml);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } private void property(final String property) throws Exception { - tester("alert(fragment." + property + ");\n"); + tester("log(fragment." + property + ");\n"); } private void tester(final String test) throws Exception { @@ -438,6 +440,7 @@ private void tester(final String test) throws Exception { private void tester(final String test, final String xml) throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" @@ -445,18 +448,18 @@ private void tester(final String test, final String xml) throws Exception { + " var fragment = doc.createDocumentFragment();\n" + " try {\n" + " " + test + "\n" - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + " function debug(e) {\n" + " if (e != null) {\n" - + " alert(e.nodeName + '=' + e.nodeValue);\n" + + " log(e.nodeName + '=' + e.nodeValue);\n" + " } else {\n" - + " alert('null');\n" + + " log('null');\n" + " }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentTest.java index 4e04f79af..4489e0395 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -94,17 +94,17 @@ public void createDocument_Msxml2_FreeThreadedDOMDocument_6() throws Exception { } private void createDocument(final String activeXName) throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" - + " alert(Object.prototype.toString.call(doc));\n" + + " log(Object.prototype.toString.call(doc));\n" + " }\n" + " function " + CREATE_XMLDOMDOCUMENT_FUNCTION_NAME + "() {\n" + " return new ActiveXObject('" + activeXName + "');\n" + " }\n"; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -114,7 +114,7 @@ private void createDocument(final String activeXName) throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "[object Object]") public void scriptableToString() throws Exception { - tester_create("alert(Object.prototype.toString.call(doc));\n"); + tester_create("log(Object.prototype.toString.call(doc));\n"); } /** @@ -127,12 +127,12 @@ public void async() throws Exception { final String test = "" + "try {\n" + " var doc = " + callCreateXMLDOMDocument() + ";\n" - + " alert(doc.async);\n" - + "} catch(e) { alert('exception-read'); }\n" + + " log(doc.async);\n" + + "} catch(e) { log('exception-read'); }\n" + "try {\n" + " doc.async = false;\n" - + " alert(doc.async);\n" - + "} catch(e) { alert('exception-write'); }\n"; + + " log(doc.async);\n" + + "} catch(e) { log('exception-write'); }\n"; tester_create(test); } @@ -163,7 +163,7 @@ public void baseName() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"4", "#comment(8)=child-comment", "true", "child-element(1)=null", "true", - "child-instr(7)=", "true", "xml(7)=version=\"1.0\"", "true"}) + "child-instr(7)=", "true", "xml(7)=version=\"1.0\"", "true"}) public void childNodes() throws Exception { final String test = "" + "var comment = doc.createComment('child-comment');\n" @@ -176,20 +176,20 @@ public void childNodes() throws Exception { + "doc.appendChild(instr);\n" + "var xmlDecl = doc.createProcessingInstruction('xml', 'version=\"1.0\"');\n" + "doc.appendChild(xmlDecl);\n" - + "alert(doc.childNodes.length);\n" + + "log(doc.childNodes.length);\n" // comment + "debug(doc.childNodes[0]);\n" - + "alert(doc.childNodes[0] === comment);\n" + + "log(doc.childNodes[0] === comment);\n" // element + "debug(doc.childNodes[1]);\n" - + "alert(doc.childNodes[1] === element);\n" + + "log(doc.childNodes[1] === element);\n" // no fragment // processing instruction + "debug(doc.childNodes[2]);\n" - + "alert(doc.childNodes[2] === instr);\n" + + "log(doc.childNodes[2] === instr);\n" // XML declaration + "debug(doc.childNodes[3]);\n" - + "alert(doc.childNodes[3] === xmlDecl);\n"; + + "log(doc.childNodes[3] === xmlDecl);\n"; tester_create(test); } @@ -201,7 +201,7 @@ public void childNodes() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "0") public void childNodes_none() throws Exception { - tester_create("alert(doc.childNodes.length);\n"); + tester_create("log(doc.childNodes.length);\n"); } /** @@ -235,11 +235,11 @@ public void doctype_created() throws Exception { final String test = "" + "try {\n" + " var doc = " + callCreateXMLDOMDocument() + ";\n" - + " alert(doc.doctype == null);\n" - + "} catch(e) { alert('exception-read'); }\n" + + " log(doc.doctype == null);\n" + + "} catch(e) { log('exception-read'); }\n" + "try {\n" + " doc.doctype = null;\n" - + "} catch(e) { alert('exception-write'); }\n"; + + "} catch(e) { log('exception-write'); }\n"; tester_create(test); } @@ -253,11 +253,11 @@ public void doctype_created() throws Exception { public void doctype_load() throws Exception { final String test = "" + "try {\n" - + " alert(doc.doctype == null);\n" - + "} catch(e) { alert('exception-read'); }\n" + + " log(doc.doctype == null);\n" + + "} catch(e) { log('exception-read'); }\n" + "try {\n" + " doc.doctype = null;\n" - + "} catch(e) { alert('exception-write'); }\n"; + + "} catch(e) { log('exception-write'); }\n"; final String xml = "<!DOCTYPE a [ <!ELEMENT a (b+)> <!ELEMENT b (#PCDATA)> ]>\n" + "<a><b>1</b><b>2</b></a>"; @@ -273,15 +273,15 @@ public void doctype_load() throws Exception { IE = {"true", "true", "exception-setNull"}) public void documentElement() throws Exception { final String test = "" - + "alert(doc.documentElement == null);\n" + + "log(doc.documentElement == null);\n" // normal + "var element = doc.createElement('foo');\n" + "doc.documentElement = element;\n" - + "alert(doc.documentElement === element);\n" + + "log(doc.documentElement === element);\n" // null + "try {\n" + " doc.documentElement = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n"; + + "} catch(e) { log('exception-setNull'); }\n"; tester_create(test); } @@ -298,11 +298,11 @@ public void documentElement_replaceExisting() throws Exception { + "doc.documentElement.appendChild(doc.createElement('bar'));\n" + "var element = doc.createElement('new');\n" + "doc.documentElement = element;\n" - + "alert(doc.documentElement === element);\n" + + "log(doc.documentElement === element);\n" + "var txt = doc.xml;\n" + "txt = txt.replace(/\\r/g, '\\\\r');\n" + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n"; + + "log(txt);\n"; tester_create(test); } @@ -314,7 +314,7 @@ public void documentElement_replaceExisting() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void documentElement_setElementFromOtherDocument() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc1 = " + callCreateXMLDOMDocument() + ";\n" @@ -322,12 +322,12 @@ public void documentElement_setElementFromOtherDocument() throws Exception { + " var element = doc1.createElement('foo');\n" + " try {\n" + " doc2.documentElement = element;\n" - + " alert(doc2.documentElement === element);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(doc2.documentElement === element);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -419,19 +419,19 @@ public void documentElement_xmlDeclaration() throws Exception { IE = {"true", "exception-setNull", "exception-setEmpty", "exception-set"}) public void firstChild() throws Exception { final String test = "" - + "alert(doc.firstChild == null);\n" + + "log(doc.firstChild == null);\n" // null + "try {\n" + " doc.firstChild = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "try {\n" + " doc.firstChild = '';\n" - + "} catch(e) { alert('exception-setEmpty'); }\n" + + "} catch(e) { log('exception-setEmpty'); }\n" // normal + "try {\n" + "doc.firstChild = doc.createElement('foo');\n" - + "} catch(e) { alert('exception-set'); }\n"; + + "} catch(e) { log('exception-set'); }\n"; tester_create(test); } @@ -529,11 +529,11 @@ public void firstChild_comment() throws Exception { public void implementation() throws Exception { final String test = "" + "try {\n" - + " alert(doc.implementation == null);\n" - + "} catch(e) { alert('exception-read'); }\n" + + " log(doc.implementation == null);\n" + + "} catch(e) { log('exception-read'); }\n" + "try {\n" + " doc.implementation = null;\n" - + "} catch(e) { alert('exception-write'); }\n"; + + "} catch(e) { log('exception-write'); }\n"; tester_create(test); } @@ -546,19 +546,19 @@ public void implementation() throws Exception { IE = {"true", "exception-setNull", "exception-setEmpty", "exception-set"}) public void lastChild() throws Exception { final String test = "" - + "alert(doc.lastChild == null);\n" + + "log(doc.lastChild == null);\n" // null + "try {\n" + " doc.lastChild = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "try {\n" + " doc.lastChild = '';\n" - + "} catch(e) { alert('exception-setEmpty'); }\n" + + "} catch(e) { log('exception-setEmpty'); }\n" // normal + "try {\n" + "doc.lastChild = doc.createElement('foo');\n" - + "} catch(e) { alert('exception-set'); }\n"; + + "} catch(e) { log('exception-set'); }\n"; tester_create(test); } @@ -627,7 +627,7 @@ public void lastChild_documentType() throws Exception { + "<a><b>1</b><b>2</b></a>" + "<!DOCTYPE a [ <!ELEMENT a (b+)> <!ELEMENT b (#PCDATA)> ]>\n"; - tester("alert(doc.parseError.reason === '');\n", xml); + tester("log(doc.parseError.reason === '');\n", xml); } /** @@ -664,7 +664,7 @@ public void namespaceURI() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void nextSibling() throws Exception { - tester("alert(doc.nextSibling == null);\n", "<root/>"); + tester("log(doc.nextSibling == null);\n", "<root/>"); } /** @@ -674,7 +674,7 @@ public void nextSibling() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void nextSibling_created() throws Exception { - tester_create("alert(doc.nextSibling == null);\n"); + tester_create("log(doc.nextSibling == null);\n"); } /** @@ -705,19 +705,19 @@ public void nodeType() throws Exception { IE = {"null", "exception-setNull", "exception-setEmpty", "exception-set"}) public void nodeValue() throws Exception { final String test = "" - + "alert(doc.nodeValue);\n" + + "log(doc.nodeValue);\n" // null + "try {\n" + " doc.nodeValue = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "try {\n" + " doc.nodeValue = '';\n" - + "} catch(e) { alert('exception-setEmpty'); }\n" + + "} catch(e) { log('exception-setEmpty'); }\n" // normal + "try {\n" + " doc.nodeValue = 'test';\n" - + "} catch(e) { alert('exception-set'); }\n"; + + "} catch(e) { log('exception-set'); }\n"; tester(test, "<root/>"); } @@ -729,7 +729,7 @@ public void nodeValue() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void ownerDocument() throws Exception { - tester("alert(doc.ownerDocument == null);\n", "<root/>"); + tester("log(doc.ownerDocument == null);\n", "<root/>"); } /** @@ -739,7 +739,7 @@ public void ownerDocument() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void ownerDocument_created() throws Exception { - tester_create("alert(doc.ownerDocument == null);\n"); + tester_create("log(doc.ownerDocument == null);\n"); } /** @@ -749,7 +749,7 @@ public void ownerDocument_created() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void parentNode() throws Exception { - tester("alert(doc.parentNode == null);\n", "<root/>"); + tester("log(doc.parentNode == null);\n", "<root/>"); } /** @@ -759,7 +759,7 @@ public void parentNode() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void parentNode_created() throws Exception { - tester_create("alert(doc.parentNode == null);\n"); + tester_create("log(doc.parentNode == null);\n"); } /** @@ -772,11 +772,11 @@ public void parentNode_created() throws Exception { public void parseError() throws Exception { final String test = "" + "try {\n" - + " alert(doc.parseError == null);\n" - + "} catch(e) { alert('exception-read'); }\n" + + " log(doc.parseError == null);\n" + + "} catch(e) { log('exception-read'); }\n" + "try {\n" + " doc.parseError = null;\n" - + "} catch(e) { alert('exception-write'); }\n"; + + "} catch(e) { log('exception-write'); }\n"; tester_create(test); } @@ -797,7 +797,7 @@ public void prefix() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"false", "<root><test><element/></test></root>\\r\\n", - "true", "<root><test><element/></test></root>\\r\\n"}) + "true", "<root><test><element/></test></root>\\r\\n"}) public void preserveWhiteSpace() throws Exception { final String test = "" + "doc.documentElement = doc.createElement('root');\n" @@ -806,20 +806,20 @@ public void preserveWhiteSpace() throws Exception { + "var element = doc.createElement('element');\n" + "test.appendChild(element);\n" + "try {\n" - + " alert(doc.preserveWhiteSpace);\n" + + " log(doc.preserveWhiteSpace);\n" + " var txt = doc.xml;\n" + " txt = txt.replace(/\\r/g, '\\\\r');\n" + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + "} catch(e) { alert('exception1'); }\n" + + " log(txt);\n" + + "} catch(e) { log('exception1'); }\n" + "try {\n" + " doc.preserveWhiteSpace = true;\n" - + " alert(doc.preserveWhiteSpace);\n" + + " log(doc.preserveWhiteSpace);\n" + " txt = doc.xml;\n" + " txt = txt.replace(/\\r/g, '\\\\r');\n" + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + "} catch(e) { alert('exception2'); }\n"; + + " log(txt);\n" + + "} catch(e) { log('exception2'); }\n"; tester_create(test); } @@ -829,56 +829,52 @@ public void preserveWhiteSpace() throws Exception { */ @Test @Alerts(DEFAULT = "no ActiveX", - IE = {"false", "false", "<root>\\r\\n\t<test>\\r\\n\t\t<element/>\\r\\n\t</test>\\r\\nA B C\tD\\r\\n</root>\\r\\n", - "false", "true", "<root>\\r\\n\t<test>\\r\\n\t\t<element/>\\r\\n\t</test>\\r\\nA B C\tD\\r\\n</root>\\r\\n", - "true", "false", "<root>\\r\\n<test>\\r\\n <element/>\\r\\n</test>\\r\\nA B C\tD\\r\\n</root>\\r\\n", - "true", "true", "<root>\\r\\n<test>\\r\\n <element/>\\r\\n</test>\\r\\nA B C\tD\\r\\n</root>\\r\\n"}) + IE = {"false", "false", "<root>\\r\\n\\t<test>\\r\\n\\t\\t<element/>\\r\\n\\t</test>\\r\\nA#B##C\\tD\\r\\n</root>\\r\\n", + "false", "true", "<root>\\r\\n\\t<test>\\r\\n\\t\\t<element/>\\r\\n\\t</test>\\r\\nA#B##C\\tD\\r\\n</root>\\r\\n", + "true", "false", "<root>\\r\\n<test>\\r\\n##<element/>\\r\\n</test>\\r\\nA#B##C\\tD\\r\\n</root>\\r\\n", + "true", "true", "<root>\\r\\n<test>\\r\\n##<element/>\\r\\n</test>\\r\\nA#B##C\\tD\\r\\n</root>\\r\\n"}) public void preserveWhiteSpace_load() throws Exception { final String test = "" + "doc.async = false;\n" // read false, write false + "try {\n" - + " alert(doc.preserveWhiteSpace);\n" + + " log(doc.preserveWhiteSpace);\n" + " doc.load('" + URL_SECOND + "');\n" - + " alert(doc.preserveWhiteSpace);\n" + + " log(doc.preserveWhiteSpace);\n" + " var txt = doc.xml;\n" - + " txt = txt.replace(/\\r/g, '\\\\r');\n" - + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + "} catch(e) { alert('exception1'); }\n" + + " txt = txt.replace(/ /g, '#');\n" + + " log(txt);\n" + + "} catch(e) { log('exception1'); }\n" // read false, write true + "try {\n" - + " alert(doc.preserveWhiteSpace);\n" + + " log(doc.preserveWhiteSpace);\n" + " doc.load('" + URL_SECOND + "');\n" + " doc.preserveWhiteSpace = true;\n" - + " alert(doc.preserveWhiteSpace);\n" - + " txt = doc.xml;\n" - + " txt = txt.replace(/\\r/g, '\\\\r');\n" - + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + "} catch(e) { alert('exception2'); }\n" + + " log(doc.preserveWhiteSpace);\n" + + " var txt = doc.xml;\n" + + " txt = txt.replace(/ /g, '#');\n" + + " log(txt);\n" + + "} catch(e) { log('exception2'); }\n" // read true, write false + "try {\n" - + " alert(doc.preserveWhiteSpace);\n" + + " log(doc.preserveWhiteSpace);\n" + " doc.load('" + URL_SECOND + "');\n" + " doc.preserveWhiteSpace = false;\n" - + " alert(doc.preserveWhiteSpace);\n" - + " txt = doc.xml;\n" - + " txt = txt.replace(/\\r/g, '\\\\r');\n" - + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + "} catch(e) { alert('exception2'); }\n" + + " log(doc.preserveWhiteSpace);\n" + + " var txt = doc.xml;\n" + + " txt = txt.replace(/ /g, '#');\n" + + " log(txt);\n" + + "} catch(e) { log('exception2'); }\n" // read true, write true + "try {\n" + " doc.preserveWhiteSpace = true;\n" - + " alert(doc.preserveWhiteSpace);\n" + + " log(doc.preserveWhiteSpace);\n" + " doc.load('" + URL_SECOND + "');\n" - + " alert(doc.preserveWhiteSpace);\n" - + " txt = doc.xml;\n" - + " txt = txt.replace(/\\r/g, '\\\\r');\n" - + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + "} catch(e) { alert('exception2'); }\n"; + + " log(doc.preserveWhiteSpace);\n" + + " var txt = doc.xml;\n" + + " txt = txt.replace(/ /g, '#');\n" + + " log(txt);\n" + + "} catch(e) { log('exception2'); }\n"; final String xml = "<root>\n" @@ -899,7 +895,7 @@ public void preserveWhiteSpace_load() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void previousSibling() throws Exception { - tester("alert(doc.previousSibling == null);\n", "<root/>"); + tester("log(doc.previousSibling == null);\n", "<root/>"); } /** @@ -909,7 +905,7 @@ public void previousSibling() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void previousSibling_created() throws Exception { - tester_create("alert(doc.previousSibling == null);\n"); + tester_create("log(doc.previousSibling == null);\n"); } /** @@ -928,7 +924,7 @@ public void text() throws Exception { + "<grand-child-element2><![CDATA[grand-child-cdata]]></grand-child-element2>" + "</child-element>"; - tester("alert(doc.text);\n", xml); + tester("log(doc.text);\n", xml); } /** @@ -939,20 +935,20 @@ public void text() throws Exception { IE = {"0", "", "exception-set", "exception-setEmpty", "exception-setNull"}) public void text_set() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.text);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.text);\n" // normal + "try {\n" + " doc.text = 'text';\n" - + "} catch(e) { alert('exception-set'); }\n" + + "} catch(e) { log('exception-set'); }\n" // empty + "try {\n" + " doc.text = '';\n" - + "} catch(e) { alert('exception-setEmpty'); }\n" + + "} catch(e) { log('exception-setEmpty'); }\n" // null + "try {\n" + " doc.text = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n"; + + "} catch(e) { log('exception-setNull'); }\n"; tester_create(test); } @@ -964,7 +960,7 @@ public void text_set() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "") public void text_created() throws Exception { - tester_create("alert(doc.text);\n"); + tester_create("log(doc.text);\n"); } /** @@ -974,7 +970,7 @@ public void text_created() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "§§URL§§second/") public void url() throws Exception { - tester("alert(doc.url);\n", "<root/>"); + tester("log(doc.url);\n", "<root/>"); } /** @@ -984,25 +980,26 @@ public void url() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "§§URL§§second.xml") public void url_relative() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'second.xml'") + ";\n" + " try {\n" - + " alert(doc.url);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(doc.url);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + " function debug(e) {\n" + " if (e != null) {\n" - + " alert(e.nodeName + '(' + e.nodeType + ')=' + e.nodeValue);\n" + + " log(e.nodeName + '(' + e.nodeType + ')=' + e.nodeValue);\n" + " } else {\n" - + " alert('null');\n" + + " log('null');\n" + " }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; getMockWebConnection().setDefaultResponse("<root/>", MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + expandExpectedAlertsVariables(URL_FIRST); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -1012,7 +1009,7 @@ public void url_relative() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "") public void url_error() throws Exception { - tester("alert(doc.url);\n", "<root>"); + tester("log(doc.url);\n", "<root>"); } /** @@ -1022,7 +1019,7 @@ public void url_error() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "") public void url_created() throws Exception { - tester_create("alert(doc.url);\n"); + tester_create("log(doc.url);\n"); } /** @@ -1037,13 +1034,13 @@ public void xml() throws Exception { + "var txt = doc.xml;\n" + "txt = txt.replace(/\\r/g, '\\\\r');\n" + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n" + + "log(txt);\n" + "doc.documentElement = doc.createElement('foo');\n" + "txt = doc.xml;\n" + "txt = txt.replace(/\\r/g, '\\\\r');\n" + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n"; + + "log(txt);\n"; tester_create(test); } @@ -1054,20 +1051,20 @@ public void xml() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "exception-appendNull", - "exception-appendEmpty"}) + "exception-appendNull", + "exception-appendEmpty"}) public void appendChild() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // null + "try {\n" + " doc.appendChild(null);\n" - + "} catch(e) { alert('exception-appendNull'); }\n" + + "} catch(e) { log('exception-appendNull'); }\n" // empty + "try {\n" + " doc.appendChild('');\n" - + "} catch(e) { alert('exception-appendEmpty'); }\n"; + + "} catch(e) { log('exception-appendEmpty'); }\n"; tester_create(test); } @@ -1080,12 +1077,12 @@ public void appendChild() throws Exception { IE = {"0", "true", "exception-appendCDATA1"}) public void appendChild_cdata() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // cdata 1 + "try {\n" + " doc.appendChild(doc.createCDATASection('cdata1'));\n" - + "} catch(e) { alert('exception-appendCDATA1'); }\n"; + + "} catch(e) { log('exception-appendCDATA1'); }\n"; tester_create(test); } @@ -1096,28 +1093,28 @@ public void appendChild_cdata() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "1", "true", "true", "true", - "2", "true", "true", "true", "true", "true"}) + "1", "true", "true", "true", + "2", "true", "true", "true", "true", "true"}) public void appendChild_comment() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // comment 1 + "var comment1 = doc.createComment('comment1');\n" + "doc.appendChild(comment1);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === comment1);\n" - + "alert(doc.lastChild === comment1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === comment1);\n" + + "log(doc.lastChild === comment1);\n" // comment 2 + "var comment2 = doc.createComment('comment2');\n" + "doc.appendChild(comment2);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === comment1);\n" - + "alert(doc.firstChild.nextSibling === comment2);\n" - + "alert(doc.lastChild === comment2);\n" - + "alert(doc.lastChild.previousSibling === comment1);\n"; + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === comment1);\n" + + "log(doc.firstChild.nextSibling === comment2);\n" + + "log(doc.lastChild === comment2);\n" + + "log(doc.lastChild.previousSibling === comment1);\n"; tester_create(test); } @@ -1128,28 +1125,28 @@ public void appendChild_comment() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "0", "true", "true", "true", - "1", "true", "true", "true"}) + "0", "true", "true", "true", + "1", "true", "true", "true"}) public void appendChild_documentFragment() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // empty + "var fragment1 = doc.createDocumentFragment();\n" + "doc.appendChild(fragment1);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild == null);\n" - + "alert(doc.lastChild == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild == null);\n" + + "log(doc.lastChild == null);\n" // element + "var fragment2 = doc.createDocumentFragment();\n" + "var element1 = doc.createElement('element1');\n" + "fragment2.appendChild(element1);\n" + "doc.appendChild(fragment2);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement === element1);\n" - + "alert(doc.firstChild === element1);\n" - + "alert(doc.lastChild === element1);\n"; + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement === element1);\n" + + "log(doc.firstChild === element1);\n" + + "log(doc.lastChild === element1);\n"; tester_create(test); } @@ -1160,21 +1157,21 @@ public void appendChild_documentFragment() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "exception-appendFragment", - "0", "true", "true", "true"}) + "exception-appendFragment", + "0", "true", "true", "true"}) public void appendChild_documentFragment_cdata() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + "var fragment = doc.createDocumentFragment();\n" + "fragment.appendChild(doc.createCDATASection('cdata1'));\n" + "try {\n" + " doc.appendChild(fragment);\n" - + "} catch(e) { alert('exception-appendFragment'); }\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild == null);\n" - + "alert(doc.lastChild == null);\n"; + + "} catch(e) { log('exception-appendFragment'); }\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild == null);\n" + + "log(doc.lastChild == null);\n"; tester_create(test); } @@ -1185,21 +1182,21 @@ public void appendChild_documentFragment_cdata() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "exception-appendFragment", - "0", "true", "true", "true"}) + "exception-appendFragment", + "0", "true", "true", "true"}) public void appendChild_documentFragment_text() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + "var fragment = doc.createDocumentFragment();\n" + "fragment.appendChild(doc.createTextNode('text1'));\n" + "try {\n" + " doc.appendChild(fragment);\n" - + "} catch(e) { alert('exception-appendFragment'); }\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild == null);\n" - + "alert(doc.lastChild == null);\n"; + + "} catch(e) { log('exception-appendFragment'); }\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild == null);\n" + + "log(doc.lastChild == null);\n"; tester_create(test); } @@ -1210,22 +1207,22 @@ public void appendChild_documentFragment_text() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "exception-appendFragment", - "0", "true", "true", "true"}) + "exception-appendFragment", + "0", "true", "true", "true"}) public void appendChild_documentFragment_multipleElement() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + "var fragment = doc.createDocumentFragment();\n" + "fragment.appendChild(doc.createElement('element1'));\n" + "fragment.appendChild(doc.createElement('element2'));\n" + "try {\n" + " doc.appendChild(fragment);\n" - + "} catch(e) { alert('exception-appendFragment'); }\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild == null);\n" - + "alert(doc.lastChild == null);\n"; + + "} catch(e) { log('exception-appendFragment'); }\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild == null);\n" + + "log(doc.lastChild == null);\n"; tester_create(test); } @@ -1236,33 +1233,33 @@ public void appendChild_documentFragment_multipleElement() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "1", "true", "true", "true", - "exception-appendElement2", - "2", "true", "true", "true", "true", "true"}) + "1", "true", "true", "true", + "exception-appendElement2", + "2", "true", "true", "true", "true", "true"}) public void appendChild_element() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // element 1 + "var element1 = doc.createElement('element1');\n" + "doc.appendChild(element1);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement === element1);\n" - + "alert(doc.firstChild === element1);\n" - + "alert(doc.lastChild === element1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement === element1);\n" + + "log(doc.firstChild === element1);\n" + + "log(doc.lastChild === element1);\n" // element 2 + "try {\n" + " doc.appendChild(doc.createElement('element2'));\n" - + "} catch(e) { alert('exception-appendElement2'); }\n" + + "} catch(e) { log('exception-appendElement2'); }\n" // other node + "var comment = doc.createComment('comment');\n" + "doc.appendChild(comment);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement === element1);\n" - + "alert(doc.firstChild === element1);\n" - + "alert(doc.firstChild.nextSibling === comment);\n" - + "alert(doc.lastChild === comment);\n" - + "alert(doc.lastChild.previousSibling === element1);\n"; + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement === element1);\n" + + "log(doc.firstChild === element1);\n" + + "log(doc.firstChild.nextSibling === comment);\n" + + "log(doc.lastChild === comment);\n" + + "log(doc.lastChild.previousSibling === element1);\n"; tester_create(test); } @@ -1275,12 +1272,12 @@ public void appendChild_element() throws Exception { IE = {"0", "true", "exception-appendText1"}) public void appendChild_text() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // text 1 + "try {\n" + " doc.appendChild(doc.createTextNode('text1'));\n" - + "} catch(e) { alert('exception-appendText1'); }\n"; + + "} catch(e) { log('exception-appendText1'); }\n"; tester_create(test); } @@ -1291,28 +1288,28 @@ public void appendChild_text() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "1", "true", "true", "true", - "2", "true", "true", "true", "true", "true"}) + "1", "true", "true", "true", + "2", "true", "true", "true", "true", "true"}) public void appendChild_processingInstruction() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // processing instruction 1 + "var instr1 = doc.createProcessingInstruction('instr1', '');\n" + "doc.appendChild(instr1);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === instr1);\n" - + "alert(doc.lastChild === instr1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === instr1);\n" + + "log(doc.lastChild === instr1);\n" // processing instruction 2 + "var instr2 = doc.createProcessingInstruction('instr2', '');\n" + "doc.appendChild(instr2);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === instr1);\n" - + "alert(doc.firstChild.nextSibling === instr2);\n" - + "alert(doc.lastChild === instr2);\n" - + "alert(doc.lastChild.previousSibling === instr1);\n"; + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === instr1);\n" + + "log(doc.firstChild.nextSibling === instr2);\n" + + "log(doc.lastChild === instr2);\n" + + "log(doc.lastChild.previousSibling === instr1);\n"; tester_create(test); } @@ -1323,28 +1320,28 @@ public void appendChild_processingInstruction() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "1", "true", "true", "true", - "2", "true", "true", "true", "true", "true"}) + "1", "true", "true", "true", + "2", "true", "true", "true", "true", "true"}) public void appendChild_xmlDeclaration() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // XML declaration 1 + "var xmlDecl1 = doc.createProcessingInstruction('xml', 'version=\"1.0\"');\n" + "doc.appendChild(xmlDecl1);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === xmlDecl1);\n" - + "alert(doc.lastChild === xmlDecl1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === xmlDecl1);\n" + + "log(doc.lastChild === xmlDecl1);\n" // XML declaration 2 + "var xmlDecl2 = doc.createProcessingInstruction('xml', 'version=\"1.0\" standalone=\"yes\"');\n" + "doc.appendChild(xmlDecl2);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === xmlDecl1);\n" - + "alert(doc.firstChild.nextSibling === xmlDecl2);\n" - + "alert(doc.lastChild === xmlDecl2);\n" - + "alert(doc.lastChild.previousSibling === xmlDecl1);\n"; + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === xmlDecl1);\n" + + "log(doc.firstChild.nextSibling === xmlDecl2);\n" + + "log(doc.lastChild === xmlDecl2);\n" + + "log(doc.lastChild.previousSibling === xmlDecl1);\n"; tester_create(test); } @@ -1355,31 +1352,31 @@ public void appendChild_xmlDeclaration() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"[object Object]", "foo(2)=", "true", "true", - "exception-createNull", "exception-createEmpty", "exception-createBlank", "exception-createXML"}) + "exception-createNull", "exception-createEmpty", "exception-createBlank", "exception-createXML"}) public void createAttribute() throws Exception { final String test = "" // normal + "var attr = doc.createAttribute('foo');\n" - + "alert(Object.prototype.toString.call(attr));\n" + + "log(Object.prototype.toString.call(attr));\n" + "debug(attr);\n" - + "alert(attr.ownerDocument === doc);\n" - + "alert(attr.parentNode == null);\n" + + "log(attr.ownerDocument === doc);\n" + + "log(attr.parentNode == null);\n" // null + "try {\n" + " doc.createAttribute(null);\n" - + "} catch(e) { alert('exception-createNull'); }\n" + + "} catch(e) { log('exception-createNull'); }\n" // empty + "try {\n" + " doc.createAttribute('');\n" - + "} catch(e) { alert('exception-createEmpty'); }\n" + + "} catch(e) { log('exception-createEmpty'); }\n" // blank + "try {\n" + " doc.createAttribute(' ');\n" - + "} catch(e) { alert('exception-createBlank'); }\n" + + "} catch(e) { log('exception-createBlank'); }\n" // xml + "try {\n" + " doc.createAttribute('<tag/>');\n" - + "} catch(e) { alert('exception-createXML'); }\n"; + + "} catch(e) { log('exception-createXML'); }\n"; tester_create(test); } @@ -1393,11 +1390,11 @@ public void createAttribute() throws Exception { public void createAttribute_caseSensitive() throws Exception { final String test = "" + "var attr = doc.createAttribute('FOO');\n" - + "alert(attr.nodeName);\n" + + "log(attr.nodeName);\n" + "attr = doc.createAttribute('fOo');\n" - + "alert(attr.nodeName);\n" + + "log(attr.nodeName);\n" + "attr = doc.createAttribute('Foo');\n" - + "alert(attr.nodeName);\n"; + + "log(attr.nodeName);\n"; tester_create(test); } @@ -1408,31 +1405,31 @@ public void createAttribute_caseSensitive() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"[object Object]", "foo(1)=null", "true", "true", - "exception-createNull", "exception-createEmpty", "exception-createBlank", "exception-createXML"}) + "exception-createNull", "exception-createEmpty", "exception-createBlank", "exception-createXML"}) public void createElement() throws Exception { final String test = "" // normal + "var element = doc.createElement('foo');\n" - + "alert(Object.prototype.toString.call(element));\n" + + "log(Object.prototype.toString.call(element));\n" + "debug(element);\n" - + "alert(element.ownerDocument === doc);\n" - + "alert(element.parentNode == null);\n" + + "log(element.ownerDocument === doc);\n" + + "log(element.parentNode == null);\n" // null + "try {\n" + " doc.createElement(null);\n" - + "} catch(e) { alert('exception-createNull'); }\n" + + "} catch(e) { log('exception-createNull'); }\n" // empty + "try {\n" + " doc.createElement('');\n" - + "} catch(e) { alert('exception-createEmpty'); }\n" + + "} catch(e) { log('exception-createEmpty'); }\n" // blank + "try {\n" + " doc.createElement(' ');\n" - + "} catch(e) { alert('exception-createBlank'); }\n" + + "} catch(e) { log('exception-createBlank'); }\n" // xml + "try {\n" + " doc.createElement('<tag/>');\n" - + "} catch(e) { alert('exception-createXML'); }\n"; + + "} catch(e) { log('exception-createXML'); }\n"; tester_create(test); } @@ -1446,11 +1443,11 @@ public void createElement() throws Exception { public void createElement_caseSensitive() throws Exception { final String test = "" + "var element = doc.createElement('FOO');\n" - + "alert(element.nodeName);\n" + + "log(element.nodeName);\n" + "element = doc.createElement('fOo');\n" - + "alert(element.nodeName);\n" + + "log(element.nodeName);\n" + "element = doc.createElement('Foo');\n" - + "alert(element.nodeName);\n"; + + "log(element.nodeName);\n"; tester_create(test); } @@ -1461,20 +1458,20 @@ public void createElement_caseSensitive() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "exception-insertNull", - "exception-insertEmpty"}) + "exception-insertNull", + "exception-insertEmpty"}) public void insertBefore() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // null + "try {\n" + " doc.insertBefore(null, null);\n" - + "} catch(e) { alert('exception-insertNull'); }\n" + + "} catch(e) { log('exception-insertNull'); }\n" // empty + "try {\n" + " doc.insertBefore('', null);\n" - + "} catch(e) { alert('exception-insertEmpty'); }\n"; + + "} catch(e) { log('exception-insertEmpty'); }\n"; tester_create(test); } @@ -1487,12 +1484,12 @@ public void insertBefore() throws Exception { IE = {"0", "true", "exception-insertCDATA1"}) public void insertBefore_cdata() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // cdata 1 + "try {\n" + " doc.insertBefore(doc.createCDATASection('cdata1'), null);\n" - + "} catch(e) { alert('exception-insertCDATA1'); }\n"; + + "} catch(e) { log('exception-insertCDATA1'); }\n"; tester_create(test); } @@ -1503,43 +1500,43 @@ public void insertBefore_cdata() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "1", "true", "true", "true", - "2", "true", "true", "true", "true", "true", - "3", "true", "true", "true", "true", "true", - "exception-insertComment4"}) + "1", "true", "true", "true", + "2", "true", "true", "true", "true", "true", + "3", "true", "true", "true", "true", "true", + "exception-insertComment4"}) public void insertBefore_comment() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // comment 1 + "var comment1 = doc.createComment('comment1');\n" + "doc.insertBefore(comment1, null);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === comment1);\n" - + "alert(doc.lastChild === comment1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === comment1);\n" + + "log(doc.lastChild === comment1);\n" // comment 2 (ref null) + "var comment2 = doc.createComment('comment2');\n" + "doc.insertBefore(comment2, null);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === comment1);\n" - + "alert(doc.firstChild.nextSibling === comment2);\n" - + "alert(doc.lastChild === comment2);\n" - + "alert(doc.lastChild.previousSibling === comment1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === comment1);\n" + + "log(doc.firstChild.nextSibling === comment2);\n" + + "log(doc.lastChild === comment2);\n" + + "log(doc.lastChild.previousSibling === comment1);\n" // comment 3 (ref comment1) + "var comment3 = doc.createComment('comment3');\n" + "doc.insertBefore(comment3, comment1);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === comment3);\n" - + "alert(doc.firstChild.nextSibling === comment1);\n" - + "alert(doc.lastChild === comment2);\n" - + "alert(doc.lastChild.previousSibling === comment1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === comment3);\n" + + "log(doc.firstChild.nextSibling === comment1);\n" + + "log(doc.lastChild === comment2);\n" + + "log(doc.lastChild.previousSibling === comment1);\n" // comment 4 (no ref) + "try {\n" + " doc.insertBefore(doc.createComment('comment4'));\n" - + "} catch(e) { alert('exception-insertComment4'); }\n"; + + "} catch(e) { log('exception-insertComment4'); }\n"; tester_create(test); } @@ -1550,57 +1547,57 @@ public void insertBefore_comment() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "0", "true", "true", "true", - "1", "true", "true", "true", - "2", "true", "true", "true", "true", "true", - "3", "true", "true", "true", "true", "true", - "exception-insertFragment5"}) + "0", "true", "true", "true", + "1", "true", "true", "true", + "2", "true", "true", "true", "true", "true", + "3", "true", "true", "true", "true", "true", + "exception-insertFragment5"}) public void insertBefore_documentFragment() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // empty + "var fragment1 = doc.createDocumentFragment();\n" + "doc.insertBefore(fragment1, null);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild == null);\n" - + "alert(doc.lastChild == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild == null);\n" + + "log(doc.lastChild == null);\n" // with element + "var fragment2 = doc.createDocumentFragment();\n" + "var element = doc.createElement('element');\n" + "fragment2.appendChild(element);\n" + "doc.insertBefore(fragment2, null);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement === element);\n" - + "alert(doc.firstChild === element);\n" - + "alert(doc.lastChild === element);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement === element);\n" + + "log(doc.firstChild === element);\n" + + "log(doc.lastChild === element);\n" // with comment 1 (ref null) + "var fragment3 = doc.createDocumentFragment();\n" + "var comment1 = doc.createComment('comment1');\n" + "fragment3.appendChild(comment1);\n" + "doc.insertBefore(fragment3, null);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement === element);\n" - + "alert(doc.firstChild === element);\n" - + "alert(doc.firstChild.nextSibling === comment1);\n" - + "alert(doc.lastChild === comment1);\n" - + "alert(doc.lastChild.previousSibling === element);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement === element);\n" + + "log(doc.firstChild === element);\n" + + "log(doc.firstChild.nextSibling === comment1);\n" + + "log(doc.lastChild === comment1);\n" + + "log(doc.lastChild.previousSibling === element);\n" // with comment 2 (ref element1) + "var fragment4 = doc.createDocumentFragment();\n" + "var comment2 = doc.createComment('comment2');\n" + "fragment4.appendChild(comment2);\n" + "doc.insertBefore(fragment4, element);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement === element);\n" - + "alert(doc.firstChild === comment2);\n" - + "alert(doc.firstChild.nextSibling === element);\n" - + "alert(doc.lastChild === comment1);\n" - + "alert(doc.lastChild.previousSibling === element);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement === element);\n" + + "log(doc.firstChild === comment2);\n" + + "log(doc.firstChild.nextSibling === element);\n" + + "log(doc.lastChild === comment1);\n" + + "log(doc.lastChild.previousSibling === element);\n" // empty (no ref) + "try {\n" + " doc.insertBefore(doc.createDocumentFragment());\n" - + "} catch(e) { alert('exception-insertFragment5'); }\n"; + + "} catch(e) { log('exception-insertFragment5'); }\n"; tester_create(test); } @@ -1611,21 +1608,21 @@ public void insertBefore_documentFragment() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "exception-insertFragment", - "0", "true", "true", "true"}) + "exception-insertFragment", + "0", "true", "true", "true"}) public void insertBefore_documentFragment_cdata() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + "var fragment = doc.createDocumentFragment();\n" + "fragment.appendChild(doc.createCDATASection('cdata1'));\n" + "try {\n" + " doc.insertBefore(fragment, null);\n" - + "} catch(e) { alert('exception-insertFragment'); }\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild == null);\n" - + "alert(doc.lastChild == null);\n"; + + "} catch(e) { log('exception-insertFragment'); }\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild == null);\n" + + "log(doc.lastChild == null);\n"; tester_create(test); } @@ -1636,21 +1633,21 @@ public void insertBefore_documentFragment_cdata() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "exception-insertFragment", - "0", "true", "true", "true"}) + "exception-insertFragment", + "0", "true", "true", "true"}) public void insertBefore_documentFragment_text() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + "var fragment = doc.createDocumentFragment();\n" + "fragment.appendChild(doc.createTextNode('text1'));\n" + "try {\n" + " doc.insertBefore(fragment, null);\n" - + "} catch(e) { alert('exception-insertFragment'); }\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild == null);\n" - + "alert(doc.lastChild == null);\n"; + + "} catch(e) { log('exception-insertFragment'); }\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild == null);\n" + + "log(doc.lastChild == null);\n"; tester_create(test); } @@ -1661,22 +1658,22 @@ public void insertBefore_documentFragment_text() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "exception-insertFragment", - "0", "true", "true", "true"}) + "exception-insertFragment", + "0", "true", "true", "true"}) public void insertBefore_documentFragment_multipleElement() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + "var fragment = doc.createDocumentFragment();\n" + "fragment.appendChild(doc.createElement('element1'));\n" + "fragment.appendChild(doc.createElement('element2'));\n" + "try {\n" + " doc.insertBefore(fragment, null);\n" - + "} catch(e) { alert('exception-insertFragment'); }\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild == null);\n" - + "alert(doc.lastChild == null);\n"; + + "} catch(e) { log('exception-insertFragment'); }\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild == null);\n" + + "log(doc.lastChild == null);\n"; tester_create(test); } @@ -1687,43 +1684,43 @@ public void insertBefore_documentFragment_multipleElement() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "1", "true", "true", "true", - "exception-insertElement2", - "2", "true", "true", "true", "true", "true", - "3", "true", "true", "true", "true", "true"}) + "1", "true", "true", "true", + "exception-insertElement2", + "2", "true", "true", "true", "true", "true", + "3", "true", "true", "true", "true", "true"}) public void insertBefore_element() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // element 1 + "var element1 = doc.createElement('element1');\n" + "doc.insertBefore(element1, null);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement === element1);\n" - + "alert(doc.firstChild === element1);\n" - + "alert(doc.lastChild === element1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement === element1);\n" + + "log(doc.firstChild === element1);\n" + + "log(doc.lastChild === element1);\n" // element 2 + "try {\n" + " doc.insertBefore(doc.createElement('element2'), null);\n" - + "} catch(e) { alert('exception-insertElement2'); }\n" + + "} catch(e) { log('exception-insertElement2'); }\n" // other node (ref null) + "var comment1 = doc.createComment('comment1');\n" + "doc.insertBefore(comment1, null);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement === element1);\n" - + "alert(doc.firstChild === element1);\n" - + "alert(doc.firstChild.nextSibling === comment1);\n" - + "alert(doc.lastChild === comment1);\n" - + "alert(doc.lastChild.previousSibling === element1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement === element1);\n" + + "log(doc.firstChild === element1);\n" + + "log(doc.firstChild.nextSibling === comment1);\n" + + "log(doc.lastChild === comment1);\n" + + "log(doc.lastChild.previousSibling === element1);\n" // other node (ref element 1) + "var comment2 = doc.createComment('comment2');\n" + "doc.insertBefore(comment2, element1);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement === element1);\n" - + "alert(doc.firstChild === comment2);\n" - + "alert(doc.firstChild.nextSibling === element1);\n" - + "alert(doc.lastChild === comment1);\n" - + "alert(doc.lastChild.previousSibling === element1);\n"; + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement === element1);\n" + + "log(doc.firstChild === comment2);\n" + + "log(doc.firstChild.nextSibling === element1);\n" + + "log(doc.lastChild === comment1);\n" + + "log(doc.lastChild.previousSibling === element1);\n"; tester_create(test); } @@ -1736,12 +1733,12 @@ public void insertBefore_element() throws Exception { IE = {"0", "true", "exception-insertText1"}) public void insertBefore_text() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // text 1 + "try {\n" + " doc.insertBefore(doc.createTextNode('text1'), null);\n" - + "} catch(e) { alert('exception-insertText1'); }\n"; + + "} catch(e) { log('exception-insertText1'); }\n"; tester_create(test); } @@ -1752,43 +1749,43 @@ public void insertBefore_text() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "1", "true", "true", "true", - "2", "true", "true", "true", "true", "true", - "3", "true", "true", "true", "true", "true", - "exception-insertInstr4"}) + "1", "true", "true", "true", + "2", "true", "true", "true", "true", "true", + "3", "true", "true", "true", "true", "true", + "exception-insertInstr4"}) public void insertBefore_processingInstruction() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // processing instruction 1 + "var instr1 = doc.createProcessingInstruction('instr1', '');\n" + "doc.insertBefore(instr1, null);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === instr1);\n" - + "alert(doc.lastChild === instr1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === instr1);\n" + + "log(doc.lastChild === instr1);\n" // processing instruction 2 (ref null) + "var instr2 = doc.createProcessingInstruction('instr2', '');\n" + "doc.insertBefore(instr2, null);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === instr1);\n" - + "alert(doc.firstChild.nextSibling === instr2);\n" - + "alert(doc.lastChild === instr2);\n" - + "alert(doc.lastChild.previousSibling === instr1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === instr1);\n" + + "log(doc.firstChild.nextSibling === instr2);\n" + + "log(doc.lastChild === instr2);\n" + + "log(doc.lastChild.previousSibling === instr1);\n" // processing instruction 3 (ref processing instruction 1) + "var instr3 = doc.createProcessingInstruction('instr3', '');\n" + "doc.insertBefore(instr3, instr1);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === instr3);\n" - + "alert(doc.firstChild.nextSibling === instr1);\n" - + "alert(doc.lastChild === instr2);\n" - + "alert(doc.lastChild.previousSibling === instr1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === instr3);\n" + + "log(doc.firstChild.nextSibling === instr1);\n" + + "log(doc.lastChild === instr2);\n" + + "log(doc.lastChild.previousSibling === instr1);\n" // processing instruction 4 (no ref) + "try {\n" + " doc.insertBefore(doc.createProcessingInstruction('instr4', ''));\n" - + "} catch(e) { alert('exception-insertInstr4'); }\n"; + + "} catch(e) { log('exception-insertInstr4'); }\n"; tester_create(test); } @@ -1799,44 +1796,44 @@ public void insertBefore_processingInstruction() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "true", - "1", "true", "true", "true", - "2", "true", "true", "true", "true", "true", - "3", "true", "true", "true", "true", "true", - "exception-insertXMLDecl4"}) + "1", "true", "true", "true", + "2", "true", "true", "true", "true", "true", + "3", "true", "true", "true", "true", "true", + "exception-insertXMLDecl4"}) public void insertBefore_xmlDeclaration() throws Exception { final String test = "" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" // XML declaration 1 + "var xmlDecl1 = doc.createProcessingInstruction('xml', 'version=\"1.0\"');\n" + "doc.insertBefore(xmlDecl1, null);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === xmlDecl1);\n" - + "alert(doc.lastChild === xmlDecl1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === xmlDecl1);\n" + + "log(doc.lastChild === xmlDecl1);\n" // XML declaration 2 (ref null) + "var xmlDecl2 = doc.createProcessingInstruction('xml', 'version=\"1.0\" standalone=\"yes\"');\n" + "doc.insertBefore(xmlDecl2, null);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === xmlDecl1);\n" - + "alert(doc.firstChild.nextSibling === xmlDecl2);\n" - + "alert(doc.lastChild === xmlDecl2);\n" - + "alert(doc.lastChild.previousSibling === xmlDecl1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === xmlDecl1);\n" + + "log(doc.firstChild.nextSibling === xmlDecl2);\n" + + "log(doc.lastChild === xmlDecl2);\n" + + "log(doc.lastChild.previousSibling === xmlDecl1);\n" // XML declaration 3 (ref XML declaration 1) + "var xmlDecl3 = doc.createProcessingInstruction('xml', " + "'version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"');\n" + "doc.insertBefore(xmlDecl3, xmlDecl1);\n" - + "alert(doc.childNodes.length);\n" - + "alert(doc.documentElement == null);\n" - + "alert(doc.firstChild === xmlDecl3);\n" - + "alert(doc.firstChild.nextSibling === xmlDecl1);\n" - + "alert(doc.lastChild === xmlDecl2);\n" - + "alert(doc.lastChild.previousSibling === xmlDecl1);\n" + + "log(doc.childNodes.length);\n" + + "log(doc.documentElement == null);\n" + + "log(doc.firstChild === xmlDecl3);\n" + + "log(doc.firstChild.nextSibling === xmlDecl1);\n" + + "log(doc.lastChild === xmlDecl2);\n" + + "log(doc.lastChild.previousSibling === xmlDecl1);\n" // XML declaration 4 (no ref) + "try {\n" + " doc.insertBefore(doc.createProcessingInstruction('xml', 'version=\"1.0\"'));\n" - + "} catch(e) { alert('exception-insertXMLDecl4'); }\n"; + + "} catch(e) { log('exception-insertXMLDecl4'); }\n"; tester_create(test); } @@ -1851,13 +1848,13 @@ public void loadXML() throws Exception { final String test = "" + "var text='<foo><bar/></foo>';\n" + "doc.async = false;\n" - + "alert(doc.xml);\n" + + "log(doc.xml);\n" + "doc.loadXML(text);\n" + "var txt = doc.xml;\n" + "txt = txt.replace(/\\r/g, '\\\\r');\n" + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n" - + "alert(doc.documentElement.nodeName);\n"; + + "log(txt);\n" + + "log(doc.documentElement.nodeName);\n"; tester_create(test); } @@ -1869,7 +1866,7 @@ public void loadXML() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = {"<myns:foo xmlns:myns=\"http://myNS\"/>\\r\\n", "myns:foo"}) public void loadXML_namespace() throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var text='<myns:foo xmlns:myns=\"http://myNS\"/>';\n" @@ -1878,62 +1875,63 @@ public void loadXML_namespace() throws Exception { + " var txt = doc.xml;\n" + " txt = txt.replace(/\\r/g, '\\\\r');\n" + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" + + " log(txt);\n" + " txt = doc.documentElement.nodeName;\n" + " txt = txt.replace(/\\r/g, '\\\\r');\n" + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" + + " log(txt);\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_STRING_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } private void property_create(final String property) throws Exception { - tester_create("alert(doc." + property + ");\n"); + tester_create("log(doc." + property + ");\n"); } private void tester_create(final String test) throws Exception { - final String html = "" + final String html = LOG_TITLE_NORMALIZE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " try {\n" + test - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + " function debug(e) {\n" + " if (e != null) {\n" - + " alert(e.nodeName + '(' + e.nodeType + ')=' + e.nodeValue);\n" + + " log(e.nodeName + '(' + e.nodeType + ')=' + e.nodeValue);\n" + " } else {\n" - + " alert('null');\n" + + " log('null');\n" + " }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html), 2 * DEFAULT_WAIT_TIME); + loadPageVerifyTitle2(createTestHTML(html)); } private void tester(final String test, final String xml) throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" + " try {\n" + test - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + " function debug(e) {\n" + " if (e != null) {\n" - + " alert(e.nodeName + '(' + e.nodeType + ')=' + e.nodeValue);\n" + + " log(e.nodeName + '(' + e.nodeType + ')=' + e.nodeValue);\n" + " } else {\n" - + " alert('null');\n" + + " log('null');\n" + " }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; getMockWebConnection().setDefaultResponse(xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + expandExpectedAlertsVariables(URL_FIRST); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentTypeTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentTypeTest.java index 7fe98eb9b..da69322b5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentTypeTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMDocumentTypeTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -45,7 +45,7 @@ public class XMLDOMDocumentTypeTest extends WebDriverTestCase { @Alerts(DEFAULT = "no ActiveX", IE = "[object Object]") public void scriptableToString() throws Exception { - tester("alert(Object.prototype.toString.call(doctype));\n"); + tester("log(Object.prototype.toString.call(doctype));\n"); } /** @@ -55,7 +55,7 @@ public void scriptableToString() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "0") public void attributes() throws Exception { - tester("alert(doctype.attributes.length);\n"); + tester("log(doctype.attributes.length);\n"); } /** @@ -75,7 +75,7 @@ public void baseName() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "0") public void childNodes() throws Exception { - tester("alert(doctype.childNodes.length);\n"); + tester("log(doctype.childNodes.length);\n"); } /** @@ -105,7 +105,7 @@ public void definition() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "0") public void entities() throws Exception { - tester("alert(doctype.entities.length);\n"); + tester("log(doctype.entities.length);\n"); } /** @@ -176,19 +176,19 @@ public void nodeType() throws Exception { IE = {"null", "exception-setNull", "exception-setEmpty", "exception-set"}) public void nodeValue() throws Exception { final String test = "" - + "alert(doctype.nodeValue);\n" + + "log(doctype.nodeValue);\n" // null + "try {\n" + " doctype.nodeValue = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "try {\n" + " doctype.nodeValue = '';\n" - + "} catch(e) { alert('exception-setEmpty'); }\n" + + "} catch(e) { log('exception-setEmpty'); }\n" // normal + "try {\n" + " doctype.nodeValue = 'test';\n" - + "} catch(e) { alert('exception-set'); }\n"; + + "} catch(e) { log('exception-set'); }\n"; tester(test); } @@ -200,7 +200,7 @@ public void nodeValue() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "0") public void notations() throws Exception { - tester("alert(doctype.notations.length);\n"); + tester("log(doctype.notations.length);\n"); } /** @@ -210,7 +210,7 @@ public void notations() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void ownerDocument() throws Exception { - tester("alert(doctype.ownerDocument === doc);\n"); + tester("log(doctype.ownerDocument === doc);\n"); } /** @@ -220,7 +220,7 @@ public void ownerDocument() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void parentNode() throws Exception { - tester("alert(doctype.parentNode === doc);\n"); + tester("log(doctype.parentNode === doc);\n"); } /** @@ -254,15 +254,15 @@ public void text_set() throws Exception { // normal "try {\n" + " doctype.text = 'text';\n" - + "} catch(e) { alert('exception-set'); }\n" + + "} catch(e) { log('exception-set'); }\n" // empty + "try {\n" + " doctype.text = '';\n" - + "} catch(e) { alert('exception-setEmpty'); }\n" + + "} catch(e) { log('exception-setEmpty'); }\n" // null + "try {\n" + " doctype.text = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n"; + + "} catch(e) { log('exception-setNull'); }\n"; tester(test); } @@ -280,7 +280,7 @@ public void xml() throws Exception { } private void property(final String property) throws Exception { - tester("alert(doctype." + property + ");\n"); + tester("log(doctype." + property + ");\n"); } private void tester(final String test) throws Exception { @@ -292,6 +292,7 @@ private void tester(final String test) throws Exception { private void tester(final String test, final String xml) throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'second.xml'") + ";\n" @@ -299,11 +300,11 @@ private void tester(final String test, final String xml) throws Exception { + " try {\n" + " var doctype = doc.doctype;\n" + test - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; getMockWebConnection().setDefaultResponse(xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMElementTest.java index 4daa3e209..18b887417 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -47,7 +47,7 @@ public class XMLDOMElementTest extends WebDriverTestCase { @Alerts(DEFAULT = "no ActiveX", IE = "[object Object]") public void scriptableToString() throws Exception { - tester("alert(Object.prototype.toString.call(root));\n", "<root/>"); + tester("log(Object.prototype.toString.call(root));\n", "<root/>"); } /** @@ -58,20 +58,21 @@ public void scriptableToString() throws Exception { IE = {"true", "0", "1"}) public void attributes() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var element = doc.createElement('something');\n" + " try {\n" - + " alert(element.attributes != null);\n" - + " alert(element.attributes.length);\n" + + " log(element.attributes != null);\n" + + " log(element.attributes.length);\n" + " element.setAttribute('attr', 'test');\n" - + " alert(element.attributes.length);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(element.attributes.length);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -112,7 +113,7 @@ public void baseName_created() throws Exception { IE = {"4", "#cdata-section=child-cdata", "#comment=child-comment", "child-element=null", "#text=child-text"}) public void childNodes() throws Exception { final String test = "" - + "alert(root.childNodes.length);\n" + + "log(root.childNodes.length);\n" // cdata + "debug(root.childNodes[0]);\n" // comment @@ -141,7 +142,7 @@ public void childNodes() throws Exception { IE = {"2", "child-element=null", "child-element=null"}) public void childNodes_lineBreak() throws Exception { final String test = "" - + "alert(root.childNodes.length);\n" + + "log(root.childNodes.length);\n" + "debug(root.childNodes[0]);\n" + "debug(root.childNodes[1]);\n"; @@ -161,7 +162,7 @@ public void childNodes_lineBreak() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "0") public void childNodes_none() throws Exception { - tester("alert(root.childNodes.length);\n", "<root/>"); + tester("log(root.childNodes.length);\n", "<root/>"); } /** @@ -296,9 +297,9 @@ public void namespaceURI() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"http://www.w3.org/1999/xhtml", - "http://www.w3.org/1999/xhtml", - "http://www.appcelerator.org", - "http://www.appcelerator.org"}) + "http://www.w3.org/1999/xhtml", + "http://www.appcelerator.org", + "http://www.appcelerator.org"}) public void namespaceURI_namespace() throws Exception { namespace("namespaceURI"); } @@ -381,16 +382,16 @@ public void nodeType_created() throws Exception { IE = {"null", "exception-setNull", "exception-setEmpty", "exception-set"}) public void nodeValue() throws Exception { final String test = "" - + "alert(root.nodeValue);\n" + + "log(root.nodeValue);\n" + "try {\n" + " root.nodeValue = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" + "try {\n" + " root.nodeValue = '';\n" - + "} catch(e) { alert('exception-setEmpty'); }\n" + + "} catch(e) { log('exception-setEmpty'); }\n" + "try {\n" + " root.nodeValue = 'test';\n" - + "} catch(e) { alert('exception-set'); }\n"; + + "} catch(e) { log('exception-set'); }\n"; final String xml = "" + "<root child-attribute='test'>" @@ -410,7 +411,7 @@ public void nodeValue() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void ownerDocument() throws Exception { - tester("alert(root.ownerDocument === doc);\n", "<root/>"); + tester("log(root.ownerDocument === doc);\n", "<root/>"); } /** @@ -421,17 +422,18 @@ public void ownerDocument() throws Exception { IE = "true") public void ownerDocument_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var element = doc.createElement('something');\n" + " try {\n" - + " alert(element.ownerDocument === doc);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(element.ownerDocument === doc);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -443,7 +445,7 @@ public void ownerDocument_created() throws Exception { public void parentNode() throws Exception { final String test = "" + "debug(root.parentNode);\n" - + "alert(root === root.childNodes[0].parentNode);\n"; + + "log(root === root.childNodes[0].parentNode);\n"; final String xml = "" + "<root>" @@ -461,17 +463,18 @@ public void parentNode() throws Exception { IE = "true") public void parentNode_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var element = doc.createElement('something');\n" + " try {\n" - + " alert(element.parentNode == null);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(element.parentNode == null);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -550,7 +553,7 @@ public void text() throws Exception { + "child-text" + "</root>"; - tester("alert(root.text);\n", xml); + tester("log(root.text);\n", xml); } /** @@ -561,19 +564,19 @@ public void text() throws Exception { IE = {"5", "child-cdatagrand-child-textchild-text", "1", "test", "", "exception-setNull"}) public void text_set() throws Exception { final String test = "" - + "alert(root.childNodes.length);\n" - + "alert(root.text);\n" + + "log(root.childNodes.length);\n" + + "log(root.text);\n" // normal + "root.text = 'test';\n" - + "alert(root.childNodes.length);\n" - + "alert(root.text);\n" + + "log(root.childNodes.length);\n" + + "log(root.text);\n" // empty + "root.text = '';\n" - + "alert(root.text);\n" + + "log(root.text);\n" // null + "try {\n" + " root.text = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n"; + + "} catch(e) { log('exception-setNull'); }\n"; final String xml = "" + "<root child-attribute='test'>" @@ -592,10 +595,8 @@ public void text_set() throws Exception { */ @Test @Alerts(DEFAULT = "no ActiveX", - IE = "child-cdata\n" - + " grand-child-text\n" - + "\n" - + "child-text") + IE = "child-cdata\\n" + + " grand-child-text\\n\\nchild-text") public void text_lineBreak() throws Exception { final String xml = "" + "<root child-attribute='test'>\n" @@ -606,7 +607,7 @@ public void text_lineBreak() throws Exception { + "child-text\n" + "</root>"; - tester("alert(root.text);\n", xml); + tester("var txt = root.text; txt = txt.replace(/\\n/g, '\\\\n'); log(txt);", xml); } /** @@ -617,17 +618,18 @@ public void text_lineBreak() throws Exception { IE = "") public void text_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var element = doc.createElement('something');\n" + " try {\n" - + " alert(element.text);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(element.text);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -647,7 +649,7 @@ public void xml() throws Exception { + "child-text" + "</root>"; - tester("alert(root.xml);\n", xml); + tester("log(root.xml);\n", xml); } /** @@ -656,10 +658,10 @@ public void xml() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = "<root child-attribute=\"test\">\\r\\n" - + "\t<![CDATA[child-cdata]]>\\r\\n" - + "\t<!--child-comment-->\\r\\n" - + "\t<child-element/>\\r\\n" - + "\t<child-element2><grand-child-element/></child-element2>\\r\\n" + + "\\t<![CDATA[child-cdata]]>\\r\\n" + + "\\t<!--child-comment-->\\r\\n" + + "\\t<child-element/>\\r\\n" + + "\\t<child-element2><grand-child-element/></child-element2>\\r\\n" + "child-text\\r\\n" + "</root>") public void xml_lineBreak() throws Exception { @@ -674,9 +676,10 @@ public void xml_lineBreak() throws Exception { final String tester = "var txt = root.xml;\n" + + "txt = txt.replace(/\\t/g, '\\\\t');\n" + "txt = txt.replace(/\\r/g, '\\\\r');\n" + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n"; + + "log(txt);\n"; tester(tester, xml); } @@ -688,17 +691,18 @@ public void xml_lineBreak() throws Exception { IE = "<something/>") public void xml_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var element = doc.createElement('something');\n" + " try {\n" - + " alert(element.xml);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(element.xml);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -711,19 +715,19 @@ public void getAttribute() throws Exception { final String test = "" + "var element = root.childNodes[0];\n" // normal - + "alert(element.getAttribute('attr'));\n" + + "log(element.getAttribute('attr'));\n" // case-sensitive - + "alert(element.getAttribute('AttR'));\n" + + "log(element.getAttribute('AttR'));\n" // unknown - + "alert(element.getAttribute('unknown'));\n" + + "log(element.getAttribute('unknown'));\n" // null + "try {\n" + " element.getAttribute(null);\n" - + "} catch(e) { alert('exception-getNull'); }\n" + + "} catch(e) { log('exception-getNull'); }\n" // empty + "try {\n" + " element.getAttribute('');\n" - + "} catch(e) { alert('exception-getEmpty'); }\n"; + + "} catch(e) { log('exception-getEmpty'); }\n"; final String xml = "" + "<root>\n" @@ -743,14 +747,14 @@ public void getAttribute_namespace() throws Exception { final String test = "" + "var element = root.childNodes[0];\n" + "try {\n" - + " alert(element.getAttribute('attr'));\n" - + " alert(element.getAttribute('tst:attr'));\n" - + "} catch(e) { alert('exception1'); }\n" + + " log(element.getAttribute('attr'));\n" + + " log(element.getAttribute('tst:attr'));\n" + + "} catch(e) { log('exception1'); }\n" + "element = root.childNodes[1];\n" + "try {\n" - + " alert(element.getAttribute('attr'));\n" - + " alert(element.getAttribute('tst:attr'));\n" - + "} catch(e) { alert('exception2'); }\n"; + + " log(element.getAttribute('attr'));\n" + + " log(element.getAttribute('tst:attr'));\n" + + "} catch(e) { log('exception2'); }\n"; final String xml = "" + "<root xmlns:tst=\"http://test.com\">\n" @@ -779,11 +783,11 @@ public void getAttributeNode() throws Exception { // null + "try {\n" + " element.getAttributeNode(null);\n" - + "} catch(e) { alert('exception-getNull'); }\n" + + "} catch(e) { log('exception-getNull'); }\n" // empty + "try {\n" + " element.getAttributeNode('');\n" - + "} catch(e) { alert('exception-getEmpty'); }\n"; + + "} catch(e) { log('exception-getEmpty'); }\n"; final String xml = "" + "<root>\n" @@ -805,12 +809,12 @@ public void getAttributeNode_namespace() throws Exception { + "try {\n" + " debug(element.getAttributeNode('attr'));\n" + " debug(element.getAttributeNode('tst:attr'));\n" - + "} catch(e) { alert('exception1'); }\n" + + "} catch(e) { log('exception1'); }\n" + "element = doc.documentElement.childNodes[1];\n" + "try {\n" + " debug(element.getAttributeNode('attr'));\n" + " debug(element.getAttributeNode('tst:attr'));\n" - + "} catch(e) { alert('exception2'); }\n"; + + "} catch(e) { log('exception2'); }\n"; final String xml = "" + "<root xmlns:tst=\"http://test.com\">\n" @@ -827,42 +831,42 @@ public void getAttributeNode_namespace() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"1", "child-element=null", "0", "1", "child-element=null", "0", "1", "grand-child-element=null", - "2", "child-element3=null", "child-element3=null", "0", "0", "exception-getNull"}) + "2", "child-element3=null", "child-element3=null", "0", "0", "exception-getNull"}) public void getElementsByTagName() throws Exception { final String test = // normal "var elements = root.getElementsByTagName('child-element');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" + "debug(elements[0]);\n" // case-sensitive + "elements = root.getElementsByTagName('chIld-ElEmEnt');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" // trim + "elements = root.getElementsByTagName(' child-element ');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" + "debug(elements[0]);\n" // unknown + "elements = root.getElementsByTagName('unknown');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" // recursive + "elements = root.getElementsByTagName('grand-child-element');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" + "debug(elements[0]);\n" // multiple + "elements = root.getElementsByTagName('child-element3');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" + "debug(elements[0]);\n" + "debug(elements[1]);\n" // not self + "elements = root.childNodes[1].getElementsByTagName('child-element2');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" // only children + "elements = root.childNodes[1].getElementsByTagName('child-element');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" // null + "try {\n" + " root.getElementsByTagName(null);\n" - + "} catch(e) { alert('exception-getNull'); }\n"; + + "} catch(e) { log('exception-getNull'); }\n"; final String xml = "" + "<root child-attribute='test'>" @@ -881,13 +885,13 @@ public void getElementsByTagName() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"6", "#cdata-section=child-cdata", "#comment=child-comment", "child-element=null", - "child-element2=null", "grand-child-element=null", "#text=child-text", "6", - "1", "grand-child-element=null"}) + "child-element2=null", "grand-child-element=null", "#text=child-text", "6", + "1", "grand-child-element=null"}) public void getElementsByTagName_allByEmpty() throws Exception { final String test = // normal "var elements = root.getElementsByTagName('');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" // cdata + "debug(elements[0]);\n" // comment @@ -903,10 +907,10 @@ public void getElementsByTagName_allByEmpty() throws Exception { + "debug(elements[5]);\n" // trim + "elements = root.getElementsByTagName(' \t ');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" // only children + "elements = root.childNodes[3].getElementsByTagName('');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" + "debug(elements[0]);\n"; final String xml = "" @@ -928,12 +932,12 @@ public void getElementsByTagName_allByEmpty() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"3", "child-element=null", "child-element2=null", "grand-child-element=null", "3", - "1", "grand-child-element=null"}) + "1", "grand-child-element=null"}) public void getElementsByTagName_allByStar() throws Exception { final String test = // normal "var elements = root.getElementsByTagName('*');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" // element + "debug(elements[0]);\n" // element2 @@ -942,10 +946,10 @@ public void getElementsByTagName_allByStar() throws Exception { + "debug(elements[2]);\n" // trim + "elements = root.getElementsByTagName(' * ');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" // only children + "elements = root.childNodes[3].getElementsByTagName('*');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" + "debug(elements[0]);\n"; final String xml = "" @@ -970,11 +974,11 @@ public void getElementsByTagName_allByStar() throws Exception { public void getElementsByTagName_none() throws Exception { final String test = "" + "var elements = root.getElementsByTagName('unknown');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" + "elements = root.getElementsByTagName('');\n" - + "alert(elements.length);\n" + + "log(elements.length);\n" + "elements = root.getElementsByTagName('*');\n" - + "alert(elements.length);\n"; + + "log(elements.length);\n"; tester(test, "<root/>"); } @@ -990,9 +994,9 @@ public void normalize_textOnly() throws Exception { + "root.appendChild(doc.createTextNode('Hello '));\n" + "root.appendChild(doc.createTextNode('World'));\n" + "root.appendChild(doc.createTextNode('!'));\n" - + "alert(root.childNodes.length);\n" + + "log(root.childNodes.length);\n" + "root.normalize();\n" - + "alert(root.childNodes.length);\n" + + "log(root.childNodes.length);\n" + "debug(root.childNodes[0]);\n"; tester(test, "<root/>"); @@ -1013,11 +1017,11 @@ public void normalize_recursive() throws Exception { + "element.appendChild(doc.createTextNode('Hello '));\n" + "element.appendChild(doc.createTextNode('World'));\n" + "element.appendChild(doc.createTextNode('!'));\n" - + "alert(root.childNodes.length);\n" - + "alert(root.childNodes[1].childNodes.length);\n" + + "log(root.childNodes.length);\n" + + "log(root.childNodes[1].childNodes.length);\n" + "root.normalize();\n" - + "alert(root.childNodes.length);\n" - + "alert(root.childNodes[1].childNodes.length);\n" + + "log(root.childNodes.length);\n" + + "log(root.childNodes[1].childNodes.length);\n" + "debug(root.childNodes[1].childNodes[0]);\n"; tester(test, "<root/>"); @@ -1031,9 +1035,9 @@ public void normalize_recursive() throws Exception { IE = {"7", "7"}) public void normalize_mixed() throws Exception { final String test = "" - + "alert(root.childNodes.length);\n" + + "log(root.childNodes.length);\n" + "root.normalize();\n" - + "alert(root.childNodes.length);\n"; + + "log(root.childNodes.length);\n"; final String xml = "" + "<root child-attribute='test'>" @@ -1058,24 +1062,24 @@ public void normalize_mixed() throws Exception { public void removeAttribute() throws Exception { final String test = "" + "var element = root.childNodes[0];\n" - + "alert(element.attributes.length);\n" + + "log(element.attributes.length);\n" // case-sensitive + "element.removeAttribute('AttR');\n" - + "alert(element.attributes.length);\n" + + "log(element.attributes.length);\n" // normal + "element.removeAttribute('attr');\n" - + "alert(element.attributes.length);\n" + + "log(element.attributes.length);\n" // unknown + "element.removeAttribute('unknown');\n" - + "alert(element.attributes.length);\n" + + "log(element.attributes.length);\n" // null + "try {\n" + " element.removeAttribute(null);\n" - + "} catch(e) { alert('exception-removeNull'); }\n" + + "} catch(e) { log('exception-removeNull'); }\n" // empty + "try {\n" + " element.removeAttribute('');\n" - + "} catch(e) { alert('exception-removeEmpty'); }\n"; + + "} catch(e) { log('exception-removeEmpty'); }\n"; final String xml = "" + "<root>\n" @@ -1095,20 +1099,20 @@ public void removeAttribute_namespace() throws Exception { final String test = "" + "var element = root.childNodes[0];\n" + "try {\n" - + " alert(element.attributes.length);\n" + + " log(element.attributes.length);\n" + " element.removeAttribute('tst:attr');\n" - + " alert(element.attributes.length);\n" + + " log(element.attributes.length);\n" + " element.removeAttribute('attr');\n" - + " alert(element.attributes.length);\n" - + "} catch(e) { alert('exception1'); }\n" + + " log(element.attributes.length);\n" + + "} catch(e) { log('exception1'); }\n" + "element = doc.documentElement.childNodes[1];\n" + "try {\n" - + " alert(element.attributes.length);\n" + + " log(element.attributes.length);\n" + " element.removeAttribute('attr');\n" - + " alert(element.attributes.length);\n" + + " log(element.attributes.length);\n" + " element.removeAttribute('tst:attr');\n" - + " alert(element.attributes.length);\n" - + "} catch(e) { alert('exception2'); }\n"; + + " log(element.attributes.length);\n" + + "} catch(e) { log('exception2'); }\n"; final String xml = "" + "<root xmlns:tst=\"http://test.com\">\n" @@ -1129,14 +1133,14 @@ public void removeAttributeNode() throws Exception { final String test = "" + "var element = root.childNodes[0];\n" + "var attribute = element.getAttributeNode('attr');\n" - + "alert(element.attributes.length);\n" + + "log(element.attributes.length);\n" + "var removed = element.removeAttributeNode(attribute);\n" - + "alert(element.attributes.length);\n" - + "alert(attribute === removed);\n" + + "log(element.attributes.length);\n" + + "log(attribute === removed);\n" // null + "try {\n" + " element.removeAttributeNode(null);\n" - + "} catch(e) { alert('exception-removeNull'); }\n"; + + "} catch(e) { log('exception-removeNull'); }\n"; final String xml = "" + "<root>\n" @@ -1152,35 +1156,35 @@ public void removeAttributeNode() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "1", "test1", "1", "test2", "exception-setNameNull", - "exception-setNameEmpty", "exception-setValueNull", "1", ""}) + "exception-setNameEmpty", "exception-setValueNull", "1", ""}) public void setAttribute() throws Exception { final String test = "" + "var element = root.childNodes[0];\n" - + "alert(element.attributes.length);\n" + + "log(element.attributes.length);\n" // normal + "element.setAttribute('attr', 'test1');\n" - + "alert(element.attributes.length);\n" - + "alert(element.getAttribute('attr'));\n" + + "log(element.attributes.length);\n" + + "log(element.getAttribute('attr'));\n" // overwrite + "element.setAttribute('attr', 'test2');\n" - + "alert(element.attributes.length);\n" - + "alert(element.getAttribute('attr'));\n" + + "log(element.attributes.length);\n" + + "log(element.getAttribute('attr'));\n" // null name + "try {\n" + " element.setAttribute(null, 'test');\n" - + "} catch(e) { alert('exception-setNameNull'); }\n" + + "} catch(e) { log('exception-setNameNull'); }\n" // empty name + "try {\n" + "element.setAttribute('', 'test');\n" - + "} catch(e) { alert('exception-setNameEmpty'); }\n" + + "} catch(e) { log('exception-setNameEmpty'); }\n" // null value + "try {\n" + " element.setAttribute('attr', null);\n" - + "} catch(e) { alert('exception-setValueNull'); }\n" + + "} catch(e) { log('exception-setValueNull'); }\n" // empty value + "element.setAttribute('attr', '');\n" - + "alert(element.attributes.length);\n" - + "alert(element.getAttribute('attr'));\n"; + + "log(element.attributes.length);\n" + + "log(element.getAttribute('attr'));\n"; final String xml = "" + "<root>\n" @@ -1199,13 +1203,13 @@ public void setAttribute() throws Exception { public void setAttribute_namespace() throws Exception { final String test = "" + "var element = root.childNodes[0];\n" - + "alert(element.attributes.length);\n" + + "log(element.attributes.length);\n" + "element.setAttribute('attr', 'test1');\n" - + "alert(element.attributes.length);\n" - + "alert(element.getAttribute('attr'));\n" + + "log(element.attributes.length);\n" + + "log(element.getAttribute('attr'));\n" + "element.setAttribute('tst:attr', 'test2');\n" - + "alert(element.attributes.length);\n" - + "alert(element.getAttribute('tst:attr'));\n"; + + "log(element.attributes.length);\n" + + "log(element.getAttribute('tst:attr'));\n"; final String xml = "" + "<root xmlns:tst=\"http://test.com\">\n" @@ -1221,7 +1225,7 @@ public void setAttribute_namespace() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0", "1", "attr=test1", "null", "1", "attr=test2", "attr=test1", "true", - "exception-setNull"}) + "exception-setNull"}) public void setAttributeNode() throws Exception { final String test = "" + "var element = root.childNodes[0];\n" @@ -1230,22 +1234,22 @@ public void setAttributeNode() throws Exception { + "var attribute2 = doc.createAttribute('attr');\n" + "attribute2.value = 'test2';\n" - + "alert(element.attributes.length);\n" + + "log(element.attributes.length);\n" // normal + "var replaced = element.setAttributeNode(attribute1);\n" - + "alert(element.attributes.length);\n" + + "log(element.attributes.length);\n" + "debug(element.getAttributeNode('attr'));\n" + "debug(replaced);\n" // overwrite + "var replaced = element.setAttributeNode(attribute2);\n" - + "alert(element.attributes.length);\n" + + "log(element.attributes.length);\n" + "debug(element.getAttributeNode('attr'));\n" + "debug(replaced);\n" - + "alert(replaced === attribute1);\n" + + "log(replaced === attribute1);\n" // null + "try {\n" + " element.setAttributeNode(null);\n" - + "} catch(e) { alert('exception-setNull'); }\n"; + + "} catch(e) { log('exception-setNull'); }\n"; final String xml = "" + "<root>\n" @@ -1269,20 +1273,20 @@ public void setAttributeNode_namespace() throws Exception { + "var attribute2 = doc.createAttribute('tst:attr');\n" + "attribute2.value = 'test2';\n" - + "alert(element.attributes.length);\n" + + "log(element.attributes.length);\n" // normal + "var replaced = element.setAttributeNode(attribute1);\n" - + "alert(element.attributes.length);\n" + + "log(element.attributes.length);\n" + "debug(element.getAttributeNode('attr'));\n" + "debug(element.getAttributeNode('tst:attr'));\n" + "debug(replaced);\n" // overwrite + "var replaced = element.setAttributeNode(attribute2);\n" - + "alert(element.attributes.length);\n" + + "log(element.attributes.length);\n" + "debug(element.getAttributeNode('attr'));\n" + "debug(element.getAttributeNode('tst:attr'));\n" + "debug(replaced);\n" - + "alert(replaced === attribute1);\n"; + + "log(replaced === attribute1);\n"; final String xml = "" + "<root xmlns:tst=\"http://test.com\">\n" @@ -1324,6 +1328,7 @@ public void not_localName() throws Exception { private void created(final String methodName) throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" @@ -1332,22 +1337,22 @@ private void created(final String methodName) throws Exception { + " try {\n" + " debug(elem1);\n" + " debug(elem2);\n" - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + " function debug(e) {\n" - + " alert(e." + methodName + ");\n" + + " log(e." + methodName + ");\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } private void xml(final String methodName) throws Exception { final String test = "" - + "alert(root.childNodes[0]." + methodName + ");\n" - + "alert(root.childNodes[1]." + methodName + ");\n" - + "alert(root.childNodes[2]." + methodName + ");\n" - + "alert(root.childNodes[3]." + methodName + ");\n"; + + "log(root.childNodes[0]." + methodName + ");\n" + + "log(root.childNodes[1]." + methodName + ");\n" + + "log(root.childNodes[2]." + methodName + ");\n" + + "log(root.childNodes[3]." + methodName + ");\n"; final String xml = "" + "<xml>" @@ -1362,10 +1367,10 @@ private void xml(final String methodName) throws Exception { private void namespace(final String methodName) throws Exception { final String test = "" - + "alert(root.childNodes[0]." + methodName + ");\n" - + "alert(root.childNodes[1]." + methodName + ");\n" - + "alert(root.childNodes[2]." + methodName + ");\n" - + "alert(root.childNodes[3]." + methodName + ");\n"; + + "log(root.childNodes[0]." + methodName + ");\n" + + "log(root.childNodes[1]." + methodName + ");\n" + + "log(root.childNodes[2]." + methodName + ");\n" + + "log(root.childNodes[3]." + methodName + ");\n"; final String xml = "" + "<html xmlns='http://www.w3.org/1999/xhtml' xmlns:app='http://www.appcelerator.org'>" @@ -1380,25 +1385,26 @@ private void namespace(final String methodName) throws Exception { private void tester(final String test, final String xml) throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" + " var root = doc.documentElement;\n" + " try {\n" + test - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + " function debug(e) {\n" + " if (e != null) {\n" - + " alert(e.nodeName + '=' + e.nodeValue);\n" + + " log(e.nodeName + '=' + e.nodeValue);\n" + " } else {\n" - + " alert('null');\n" + + " log('null');\n" + " }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -1409,20 +1415,21 @@ private void tester(final String test, final String xml) throws Exception { IE = {"2", "1"}) public void removeChild() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" + " var parent = doc.documentElement.firstChild;\n" - + " alert(parent.childNodes.length);\n" + + " log(parent.childNodes.length);\n" + " parent.removeChild(parent.firstChild);\n" - + " alert(parent.childNodes.length);\n" + + " log(parent.childNodes.length);\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; final String xml = "<books><book><title>ImmortalityJohn Smith"; getMockWebConnection().setDefaultResponse(xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -1433,22 +1440,23 @@ public void removeChild() throws Exception { IE = {"book", "0", "1"}) public void selectNode_root() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" + " var child = doc.documentElement.firstChild;\n" - + " alert(child.tagName);\n" + + " log(child.tagName);\n" + " try {\n" - + " alert(child.selectNodes('/title').length);\n" - + " alert(child.selectNodes('title').length);\n" - + " } catch (e) { alert('exception'); }\n" + + " log(child.selectNodes('/title').length);\n" + + " log(child.selectNodes('title').length);\n" + + " } catch (e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; final String xml = "ImmortalityJohn Smith"; getMockWebConnection().setDefaultResponse(xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -1459,14 +1467,15 @@ public void selectNode_root() throws Exception { IE = {"1", "title"}) public void selectNodes() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" + " try {\n" + " var nodes = doc.documentElement.selectNodes('//title');\n" - + " alert(nodes.length);\n" - + " alert(nodes[0].tagName);\n" - + " } catch (e) { alert('exception'); }\n" + + " log(nodes.length);\n" + + " log(nodes[0].tagName);\n" + + " } catch (e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; @@ -1479,6 +1488,6 @@ public void selectNodes() throws Exception { + ""; getMockWebConnection().setDefaultResponse(xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMImplementationTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMImplementationTest.java index 520139d46..4712a8242 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMImplementationTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMImplementationTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -44,14 +44,15 @@ public class XMLDOMImplementationTest extends WebDriverTestCase { @Alerts(DEFAULT = "no ActiveX", IE = "[object Object]") public void scriptableToString() throws Exception { - final String html = " function test() {\n" + final String html = LOG_TITLE_FUNCTION + + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" - + " alert(Object.prototype.toString.call(doc.implementation));\n" + + " log(Object.prototype.toString.call(doc.implementation));\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -61,16 +62,17 @@ public void scriptableToString() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "exception") public void hasFeature_featureNull() throws Exception { - final String html = " function test() {\n" + final String html = LOG_TITLE_FUNCTION + + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " try {\n" + " doc.implementation.hasFeature(null, '1.0');\n" - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -78,7 +80,7 @@ public void hasFeature_featureNull() throws Exception { */ @Test @Alerts(DEFAULT = "no ActiveX", - IE = " 1.0: false") + IE = "1.0: false") public void hasFeature_featureEmpty() throws Exception { hasFeature("", "['1.0']"); } @@ -90,16 +92,17 @@ public void hasFeature_featureEmpty() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "exception") public void hasFeature_versionNull() throws Exception { - final String html = " function test() {\n" + final String html = LOG_TITLE_FUNCTION + + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " try {\n" + " doc.implementation.hasFeature('MS-DOM', null);\n" - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -268,8 +271,8 @@ public void hasFeature_MutationEvents() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"MutationNameEvents 1.0: false", - "MutationNameEvents 2.0: false", - "MutationNameEvents 3.0: false"}) + "MutationNameEvents 2.0: false", + "MutationNameEvents 3.0: false"}) public void hasFeature_MutationNameEvents() throws Exception { hasFeature("MutationNameEvents", "['1.0', '2.0', '3.0']"); } @@ -350,8 +353,8 @@ public void hasFeature_XPath() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"http://www.w3.org/TR/SVG11/feature#BasicStructure 1.0: false", - "http://www.w3.org/TR/SVG11/feature#BasicStructure 1.1: false", - "http://www.w3.org/TR/SVG11/feature#BasicStructure 1.2: false"}) + "http://www.w3.org/TR/SVG11/feature#BasicStructure 1.1: false", + "http://www.w3.org/TR/SVG11/feature#BasicStructure 1.2: false"}) public void hasFeature_SVG_BasicStructure() throws Exception { hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "['1.0', '1.1', '1.2']"); } @@ -362,8 +365,8 @@ public void hasFeature_SVG_BasicStructure() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"http://www.w3.org/TR/SVG11/feature#Shape 1.0: false", - "http://www.w3.org/TR/SVG11/feature#Shape 1.1: false", - "http://www.w3.org/TR/SVG11/feature#Shape 1.2: false"}) + "http://www.w3.org/TR/SVG11/feature#Shape 1.1: false", + "http://www.w3.org/TR/SVG11/feature#Shape 1.2: false"}) public void hasFeature_SVG_Shape() throws Exception { hasFeature("http://www.w3.org/TR/SVG11/feature#Shape", "['1.0', '1.1', '1.2']"); } @@ -389,18 +392,20 @@ public void hasFeature_MSDOM() throws Exception { } private void hasFeature(final String feature, final String versions) throws Exception { - final String html = " function test() {\n" + final String html = + LOG_TITLE_FUNCTION + + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var feature = '" + feature + "';\n" + " var versions = " + versions + ";\n" + " for (var j = 0; j < versions.length; j++) {\n" + " var version = versions[j];\n" - + " alert(feature + ' ' + version + ': ' + doc.implementation.hasFeature(feature, version));\n" + + " log(feature + ' ' + version + ': ' + doc.implementation.hasFeature(feature, version));\n" + " }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNamedNodeMapTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNamedNodeMapTest.java index 5f77c8911..e334467b3 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNamedNodeMapTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNamedNodeMapTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -46,7 +46,7 @@ public class XMLDOMNamedNodeMapTest extends WebDriverTestCase { @Alerts(DEFAULT = "no ActiveX", IE = "[object Object]") public void scriptableToString() throws Exception { - tester("alert(Object.prototype.toString.call(attrs));\n"); + tester("log(Object.prototype.toString.call(attrs));\n"); } /** @@ -56,7 +56,7 @@ public void scriptableToString() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "1") public void length() throws Exception { - tester("alert(attrs.length);\n"); + tester("log(attrs.length);\n"); } /** @@ -66,7 +66,7 @@ public void length() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "undefined") public void byName_attribute() throws Exception { - tester("alert(attrs.name);\n"); + tester("log(attrs.name);\n"); } /** @@ -76,7 +76,7 @@ public void byName_attribute() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "undefined") public void byName_map() throws Exception { - tester("alert(attrs['name']);\n"); + tester("log(attrs['name']);\n"); } /** @@ -86,7 +86,7 @@ public void byName_map() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "name") public void byNumber() throws Exception { - tester("alert(attrs[0].nodeName);\n"); + tester("log(attrs[0].nodeName);\n"); } /** @@ -139,7 +139,7 @@ public void getNamedItem_null() throws Exception { final String test = "" + "try {\n" + " attrs.getNamedItem(null);\n" - + "} catch(e) { alert('exception-getNull'); }\n"; + + "} catch(e) { log('exception-getNull'); }\n"; tester(test, ""); } @@ -172,7 +172,7 @@ public void item_unknown() throws Exception { IE = {"2", "name1=y1", "name2=y2", "null"}) public void nextNode() throws Exception { final String test = "" - + "alert(attrs.length);\n" + + "log(attrs.length);\n" + "debug(attrs.nextNode());\n" + "debug(attrs.nextNode());\n" + "debug(attrs.nextNode());\n"; @@ -188,10 +188,10 @@ public void nextNode() throws Exception { IE = {"1", "name=y", "0", "null", "name=y"}) public void removeNamedItem() throws Exception { final String test = "" - + "alert(attrs.length);\n" + + "log(attrs.length);\n" + "debug(attrs.getNamedItem('name'));\n" + "var attr = attrs.removeNamedItem('name');\n" - + "alert(attrs.length);\n" + + "log(attrs.length);\n" + "debug(attrs.getNamedItem('name'));\n" + "debug(attr);\n"; @@ -206,9 +206,9 @@ public void removeNamedItem() throws Exception { IE = {"1", "1", "null"}) public void removeNamedItem_unknown() throws Exception { final String test = "" - + "alert(attrs.length);\n" + + "log(attrs.length);\n" + "var attr = attrs.removeNamedItem('other');\n" - + "alert(attrs.length);\n" + + "log(attrs.length);\n" + "debug(attr);\n"; tester(test); @@ -222,9 +222,9 @@ public void removeNamedItem_unknown() throws Exception { IE = {"1", "1", "null"}) public void removeNamedItem_caseSensitive() throws Exception { final String test = "" - + "alert(attrs.length);\n" + + "log(attrs.length);\n" + "var attr = attrs.removeNamedItem('NaMe');\n" - + "alert(attrs.length);\n" + + "log(attrs.length);\n" + "debug(attr);\n"; tester(test); @@ -238,10 +238,10 @@ public void removeNamedItem_caseSensitive() throws Exception { IE = {"0", "exception-removeNull"}) public void removeNamedItem_null() throws Exception { final String test = "" - + "alert(attrs.length);\n" + + "log(attrs.length);\n" + "try {\n" + " attrs.removeNamedItem(null);\n" - + "} catch(e) { alert('exception-removeNull'); }\n"; + + "} catch(e) { log('exception-removeNull'); }\n"; tester(test, ""); } @@ -254,7 +254,7 @@ public void removeNamedItem_null() throws Exception { IE = {"2", "name1=y1", "name1=y1", "name2=y2", "name1=y1"}) public void reset() throws Exception { final String test = "" - + "alert(attrs.length);\n" + + "log(attrs.length);\n" + "debug(attrs.nextNode());\n" + "attrs.reset();\n" + "debug(attrs.nextNode());\n" @@ -273,12 +273,12 @@ public void reset() throws Exception { IE = {"0", "1", "myAttr=", "true"}) public void setNamedItem() throws Exception { final String test = "" - + "alert(attrs.length);\n" + + "log(attrs.length);\n" + "var attr = doc.createAttribute('myAttr');\n" + "var node = attrs.setNamedItem(attr);\n" - + "alert(attrs.length);\n" + + "log(attrs.length);\n" + "debug(attrs.getNamedItem('myAttr'));\n" - + "alert(node === attr);\n"; + + "log(node === attr);\n"; tester(test, ""); } @@ -291,10 +291,10 @@ public void setNamedItem() throws Exception { IE = {"0", "exception-setNull"}) public void setNamedItem_null() throws Exception { final String test = "" - + "alert(attrs.length);\n" + + "log(attrs.length);\n" + "try {\n" + " attrs.setNamedItem(null);\n" - + "} catch(e) { alert('exception-setNull'); }\n"; + + "} catch(e) { log('exception-setNull'); }\n"; tester(test, ""); } @@ -307,24 +307,25 @@ private void tester(final String test) throws Exception { private void tester(final String test, final String xml) throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'second.xml'") + ";\n" + " try {\n" + " var attrs = doc.documentElement.attributes;\n" + test - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + " function debug(e) {\n" + " if (e != null) {\n" - + " alert(e.nodeName + '=' + e.nodeValue);\n" + + " log(e.nodeName + '=' + e.nodeValue);\n" + " } else {\n" - + " alert('null');\n" + + " log('null');\n" + " }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; getMockWebConnection().setDefaultResponse(xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNodeListTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNodeListTest.java index 402eaa330..9333fbade 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNodeListTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMNodeListTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -31,6 +31,7 @@ * * @author Ahmed Ashour * @author Frank Danek + * @author Ronald Brill */ @RunWith(BrowserRunner.class) public class XMLDOMNodeListTest extends WebDriverTestCase { @@ -42,7 +43,7 @@ public class XMLDOMNodeListTest extends WebDriverTestCase { @Alerts(DEFAULT = "exception", IE = "[object Object]") public void scriptableToString() throws Exception { - tester("alert(Object.prototype.toString.call(list));\n"); + tester("log(Object.prototype.toString.call(list));\n"); } /** @@ -52,7 +53,7 @@ public void scriptableToString() throws Exception { @Alerts(DEFAULT = "exception", IE = "2") public void length() throws Exception { - tester("alert(list.length);\n"); + tester("log(list.length);\n"); } /** @@ -62,7 +63,7 @@ public void length() throws Exception { @Alerts(DEFAULT = "exception", IE = "0") public void length_empty() throws Exception { - tester("alert(list.length);\n", ""); + tester("log(list.length);\n", ""); } /** @@ -72,7 +73,7 @@ public void length_empty() throws Exception { @Alerts(DEFAULT = "exception", IE = "undefined") public void byName_attribute() throws Exception { - tester("alert(list.child1);\n"); + tester("log(list.child1);\n"); } /** @@ -82,7 +83,7 @@ public void byName_attribute() throws Exception { @Alerts(DEFAULT = "exception", IE = "undefined") public void byName_map() throws Exception { - tester("alert(list['child1']);\n"); + tester("log(list['child1']);\n"); } /** @@ -133,7 +134,7 @@ public void item_unknown() throws Exception { IE = {"2", "child1=null", "child2=null", "null"}) public void nextNode() throws Exception { final String test = "" - + "alert(list.length);\n" + + "log(list.length);\n" + "debug(list.nextNode());\n" + "debug(list.nextNode());\n" + "debug(list.nextNode());\n"; @@ -149,7 +150,7 @@ public void nextNode() throws Exception { IE = {"2", "child1=null", "child1=null", "child2=null", "child1=null"}) public void reset() throws Exception { final String test = "" - + "alert(list.length);\n" + + "log(list.length);\n" + "debug(list.nextNode());\n" + "list.reset();\n" + "debug(list.nextNode());\n" @@ -167,7 +168,7 @@ public void reset() throws Exception { @Alerts(DEFAULT = "exception", IE = "true") public void in() throws Exception { - tester("alert(0 in list);\n"); + tester("log(0 in list);\n"); } /** @@ -177,7 +178,7 @@ public void in() throws Exception { @Alerts(DEFAULT = "exception", IE = "true") public void in_length() throws Exception { - tester("alert('length' in list);\n"); + tester("log('length' in list);\n"); } /** @@ -187,7 +188,7 @@ public void in_length() throws Exception { @Alerts(DEFAULT = "exception", IE = "false") public void in_unknownIndex() throws Exception { - tester("alert(-1 in list);\n"); + tester("log(-1 in list);\n"); } /** @@ -197,7 +198,7 @@ public void in_unknownIndex() throws Exception { @Alerts(DEFAULT = "exception", IE = "true") public void in_unknownIndex2() throws Exception { - tester("alert(2 in list);\n"); + tester("log(2 in list);\n"); } /** @@ -207,7 +208,7 @@ public void in_unknownIndex2() throws Exception { @Alerts(DEFAULT = "exception", IE = "false") public void in_unknown() throws Exception { - tester("alert('child1' in list);\n"); + tester("log('child1' in list);\n"); } private void tester(final String test) throws Exception { @@ -221,25 +222,25 @@ private void tester(final String test) throws Exception { } private void tester(final String test, final String xml) throws Exception { - final String html = "" + final String html = LOG_TITLE_FUNCTION + " function test() {\n" + " try {\n" + " var doc = " + callLoadXMLDOMDocumentFromURL("'second.xml'") + ";\n" + " var root = doc.documentElement;\n" + " var list = root.childNodes;\n" + test - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + " function debug(e) {\n" + " if (e != null) {\n" - + " alert(e.nodeName + '=' + e.nodeValue);\n" + + " log(e.nodeName + '=' + e.nodeValue);\n" + " } else {\n" - + " alert('null');\n" + + " log('null');\n" + " }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; getMockWebConnection().setDefaultResponse(xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMParseErrorTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMParseErrorTest.java index 6135b717d..0d8524c03 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMParseErrorTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMParseErrorTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -48,16 +48,17 @@ public class XMLDOMParseErrorTest extends WebDriverTestCase { IE = "[object Object]") public void scriptableToString() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " try {\n" - + " alert(Object.prototype.toString.call(doc.parseError));\n" - + " } catch(e) { alert('exception'); }\n" + + " log(Object.prototype.toString.call(doc.parseError));\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -68,29 +69,30 @@ public void scriptableToString() throws Exception { IE = {"false", "true", "true", "true", "true", "true", "true", "true", "exception-Other"}) public void parseError_createXMLDocument() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " try {\n" + " var doc = " + callCreateXMLDOMDocument() + ";\n" - + " alert(doc.parseError == null);\n" + + " log(doc.parseError == null);\n" + " try {\n" - + " alert(doc.parseError.errorCode === 0);\n" - + " alert(doc.parseError.filepos === 0);\n" - + " alert(doc.parseError.line === 0);\n" - + " alert(doc.parseError.linepos === 0);\n" - + " alert(doc.parseError.reason === '');\n" - + " alert(doc.parseError.srcText === '');\n" - + " alert(doc.parseError.url === '');\n" - + " } catch(e) { alert('exception-MSXML'); }\n" + + " log(doc.parseError.errorCode === 0);\n" + + " log(doc.parseError.filepos === 0);\n" + + " log(doc.parseError.line === 0);\n" + + " log(doc.parseError.linepos === 0);\n" + + " log(doc.parseError.reason === '');\n" + + " log(doc.parseError.srcText === '');\n" + + " log(doc.parseError.url === '');\n" + + " } catch(e) { log('exception-MSXML'); }\n" + " try {\n" - + " alert(doc.documentElement.nodeName == 'parsererror');\n" - + " alert(doc.documentElement.childNodes[0].nodeValue);\n" - + " } catch(e) { alert('exception-Other'); }\n" - + " } catch(e) { alert('exception'); }\n" + + " log(doc.documentElement.nodeName == 'parsererror');\n" + + " log(doc.documentElement.childNodes[0].nodeValue);\n" + + " } catch(e) { log('exception-Other'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -101,30 +103,31 @@ public void parseError_createXMLDocument() throws Exception { IE = {"false", "false", "false", "false", "false", "false", "false", "true", "exception-Other"}) public void parseError_loadXML() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var text='';\n" + " try {\n" + " var doc = " + callLoadXMLDOMDocumentFromString("text") + ";\n" - + " alert(doc.parseError == null);\n" + + " log(doc.parseError == null);\n" + " try {\n" - + " alert(doc.parseError.errorCode === 0);\n" - + " alert(doc.parseError.filepos === 0);\n" - + " alert(doc.parseError.line === 0);\n" - + " alert(doc.parseError.linepos === 0);\n" - + " alert(doc.parseError.reason === '');\n" - + " alert(doc.parseError.srcText === '');\n" - + " alert(doc.parseError.url === '');\n" - + " } catch(e) { alert('exception-MSXML'); }\n" + + " log(doc.parseError.errorCode === 0);\n" + + " log(doc.parseError.filepos === 0);\n" + + " log(doc.parseError.line === 0);\n" + + " log(doc.parseError.linepos === 0);\n" + + " log(doc.parseError.reason === '');\n" + + " log(doc.parseError.srcText === '');\n" + + " log(doc.parseError.url === '');\n" + + " } catch(e) { log('exception-MSXML'); }\n" + " try {\n" - + " alert(doc.documentElement.nodeName == 'parsererror');\n" - + " alert(doc.documentElement.childNodes[0].nodeValue === '');\n" - + " } catch(e) { alert('exception-Other'); }\n" - + " } catch(e) { alert('exception'); }\n" + + " log(doc.documentElement.nodeName == 'parsererror');\n" + + " log(doc.documentElement.childNodes[0].nodeValue === '');\n" + + " } catch(e) { log('exception-Other'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_STRING_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -135,25 +138,26 @@ public void parseError_loadXML() throws Exception { IE = {"false", "false", "false", "false", "false", "false", "false", "false", "exception-Other"}) public void parseError_load() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " try {\n" + " var doc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" - + " alert(doc.parseError == null);\n" + + " log(doc.parseError == null);\n" + " try {\n" - + " alert(doc.parseError.errorCode === 0);\n" - + " alert(doc.parseError.filepos === 0);\n" - + " alert(doc.parseError.line === 0);\n" - + " alert(doc.parseError.linepos === 0);\n" - + " alert(doc.parseError.reason === '');\n" - + " alert(doc.parseError.srcText === '');\n" - + " alert(doc.parseError.url === '');\n" - + " } catch(e) { alert('exception-MSXML'); }\n" + + " log(doc.parseError.errorCode === 0);\n" + + " log(doc.parseError.filepos === 0);\n" + + " log(doc.parseError.line === 0);\n" + + " log(doc.parseError.linepos === 0);\n" + + " log(doc.parseError.reason === '');\n" + + " log(doc.parseError.srcText === '');\n" + + " log(doc.parseError.url === '');\n" + + " } catch(e) { log('exception-MSXML'); }\n" + " try {\n" - + " alert(doc.documentElement.nodeName == 'parsererror');\n" - + " alert(doc.documentElement.childNodes[0].nodeValue === '');\n" - + " } catch(e) { alert('exception-Other'); }\n" - + " } catch(e) { alert('exception'); }\n" + + " log(doc.documentElement.nodeName == 'parsererror');\n" + + " log(doc.documentElement.childNodes[0].nodeValue === '');\n" + + " } catch(e) { log('exception-Other'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; @@ -163,6 +167,6 @@ public void parseError_load() throws Exception { + ""; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMProcessingInstructionTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMProcessingInstructionTest.java index 0fd2050e6..caa8d95c9 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMProcessingInstructionTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMProcessingInstructionTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -47,7 +47,7 @@ public class XMLDOMProcessingInstructionTest extends WebDriverTestCase { @Alerts(DEFAULT = "no ActiveX", IE = "[object Object]") public void scriptableToString() throws Exception { - tester("alert(Object.prototype.toString.call(instr));\n"); + tester("log(Object.prototype.toString.call(instr));\n"); } /** @@ -70,9 +70,9 @@ public void attributes() throws Exception { // DOM processing instructions do not support attributes public void attributes_xmlDecl() throws Exception { final String test = "" - + "alert(instr.attributes.length);\n" + + "log(instr.attributes.length);\n" + "var attr = instr.attributes[0];\n" - + "alert(attr.nodeName + '=' + attr.nodeValue);\n"; + + "log(attr.nodeName + '=' + attr.nodeValue);\n"; tester_xmlDecl(test); } @@ -86,6 +86,7 @@ public void attributes_xmlDecl() throws Exception { // DOM processing instructions do not support attributes public void attributes_complete_xmlDecl() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + "function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" @@ -93,18 +94,18 @@ public void attributes_complete_xmlDecl() throws Exception { + "'xml', 'version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"');\n" + " doc.appendChild(instr);\n" + " try {\n" - + " alert(instr.attributes.length);\n" + + " log(instr.attributes.length);\n" + " var attr = instr.attributes[0];\n" - + " alert(attr.nodeName + '=' + attr.nodeValue);\n" + + " log(attr.nodeName + '=' + attr.nodeValue);\n" + " attr = instr.attributes[1];\n" - + " alert(attr.nodeName + '=' + attr.nodeValue);\n" + + " log(attr.nodeName + '=' + attr.nodeValue);\n" + " attr = instr.attributes[2];\n" - + " alert(attr.nodeName + '=' + attr.nodeValue);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(attr.nodeName + '=' + attr.nodeValue);\n" + + " } catch(e) { log('exception'); }\n" + "}\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -134,7 +135,7 @@ public void baseName_xmlDecl() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "0") public void childNodes() throws Exception { - tester("alert(instr.childNodes.length);\n"); + tester("log(instr.childNodes.length);\n"); } /** @@ -144,7 +145,7 @@ public void childNodes() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "0") public void childNodes_xmlDecl() throws Exception { - tester_xmlDecl("alert(instr.childNodes.length);\n"); + tester_xmlDecl("log(instr.childNodes.length);\n"); } /** @@ -153,40 +154,40 @@ public void childNodes_xmlDecl() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"include file=\"header.html\" ", "include file=\"header.html\" ", "include file=\"header.html\" ", - "exception-setNull", - "", "", "", - "test", "test", "test", - "test\ntest", "test\ntest", "test\ntest", - "", "", ""}) + "exception-setNull", + "", "", "", + "test", "test", "test", + "test test", "test test", "test test", + "", "", ""}) public void data() throws Exception { final String test = "" - + "alert(instr.data);\n" - + "alert(instr.nodeValue);\n" - + "alert(instr.text);\n" + + "log(instr.data);\n" + + "log(instr.nodeValue);\n" + + "log(instr.text);\n" // null + "try {\n" + " instr.data = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "instr.data = '';\n" - + "alert(instr.data);\n" - + "alert(instr.nodeValue);\n" - + "alert(instr.text);\n" + + "log(instr.data);\n" + + "log(instr.nodeValue);\n" + + "log(instr.text);\n" // normal + "instr.data = 'test';\n" - + "alert(instr.data);\n" - + "alert(instr.nodeValue);\n" - + "alert(instr.text);\n" + + "log(instr.data);\n" + + "log(instr.nodeValue);\n" + + "log(instr.text);\n" // linebreak + "instr.data = 'test\\ntest';\n" - + "alert(instr.data);\n" - + "alert(instr.nodeValue);\n" - + "alert(instr.text);\n" + + "log(instr.data);\n" + + "log(instr.nodeValue);\n" + + "log(instr.text);\n" // xml + "instr.data = '';\n" - + "alert(instr.data);\n" - + "alert(instr.nodeValue);\n" - + "alert(instr.text);\n"; + + "log(instr.data);\n" + + "log(instr.nodeValue);\n" + + "log(instr.text);\n"; tester(test); } @@ -197,26 +198,26 @@ public void data() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"version=\"1.0\"", "version=\"1.0\"", "version=\"1.0\"", - "exception-setNull", - "exception-setEmpty", - "exception-set"}) + "exception-setNull", + "exception-setEmpty", + "exception-set"}) public void data_xmlDecl() throws Exception { final String test = "" - + "alert(instr.data);\n" - + "alert(instr.nodeValue);\n" - + "alert(instr.text);\n" + + "log(instr.data);\n" + + "log(instr.nodeValue);\n" + + "log(instr.text);\n" // null + "try {\n" + " instr.data = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "try {\n" + " instr.data = '';\n" - + "} catch(e) { alert('exception-setEmpty'); }\n" + + "} catch(e) { log('exception-setEmpty'); }\n" // normal + "try {\n" + " instr.data = 'test';\n" - + "} catch(e) { alert('exception-set'); }\n"; + + "} catch(e) { log('exception-set'); }\n"; tester_xmlDecl(test); } @@ -367,40 +368,40 @@ public void nodeType_xmlDecl() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"include file=\"header.html\" ", "include file=\"header.html\" ", "include file=\"header.html\" ", - "exception-setNull", - "", "", "", - "test", "test", "test", - "test\ntest", "test\ntest", "test\ntest", - "", "", ""}) + "exception-setNull", + "", "", "", + "test", "test", "test", + "test test", "test test", "test test", + "", "", ""}) public void nodeValue() throws Exception { final String test = "" - + "alert(instr.nodeValue);\n" - + "alert(instr.data);\n" - + "alert(instr.text);\n" + + "log(instr.nodeValue);\n" + + "log(instr.data);\n" + + "log(instr.text);\n" // null + "try {\n" + " instr.nodeValue = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "instr.nodeValue = '';\n" - + "alert(instr.nodeValue);\n" - + "alert(instr.data);\n" - + "alert(instr.text);\n" + + "log(instr.nodeValue);\n" + + "log(instr.data);\n" + + "log(instr.text);\n" // normal + "instr.nodeValue = 'test';\n" - + "alert(instr.nodeValue);\n" - + "alert(instr.data);\n" - + "alert(instr.text);\n" + + "log(instr.nodeValue);\n" + + "log(instr.data);\n" + + "log(instr.text);\n" // linebreak + "instr.nodeValue = 'test\\ntest';\n" - + "alert(instr.nodeValue);\n" - + "alert(instr.data);\n" - + "alert(instr.text);\n" + + "log(instr.nodeValue);\n" + + "log(instr.data);\n" + + "log(instr.text);\n" // xml + "instr.nodeValue = '';\n" - + "alert(instr.nodeValue);\n" - + "alert(instr.data);\n" - + "alert(instr.text);\n"; + + "log(instr.nodeValue);\n" + + "log(instr.data);\n" + + "log(instr.text);\n"; tester(test); } @@ -411,26 +412,26 @@ public void nodeValue() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"version=\"1.0\"", "version=\"1.0\"", "version=\"1.0\"", - "exception-setNull", - "exception-setEmpty", - "exception-set"}) + "exception-setNull", + "exception-setEmpty", + "exception-set"}) public void nodeValue_xmlDecl() throws Exception { final String test = "" - + "alert(instr.nodeValue);\n" - + "alert(instr.data);\n" - + "alert(instr.text);\n" + + "log(instr.nodeValue);\n" + + "log(instr.data);\n" + + "log(instr.text);\n" // null + "try {\n" + " instr.nodeValue = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "try {\n" + " instr.nodeValue = '';\n" - + "} catch(e) { alert('exception-setEmpty'); }\n" + + "} catch(e) { log('exception-setEmpty'); }\n" // normal + "try {\n" + " instr.nodeValue = 'test';\n" - + "} catch(e) { alert('exception-set'); }\n"; + + "} catch(e) { log('exception-set'); }\n"; tester_xmlDecl(test); } @@ -442,7 +443,7 @@ public void nodeValue_xmlDecl() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void ownerDocument() throws Exception { - tester("alert(instr.ownerDocument === doc);\n"); + tester("log(instr.ownerDocument === doc);\n"); } /** @@ -452,7 +453,7 @@ public void ownerDocument() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void ownerDocument_xmlDecl() throws Exception { - tester_xmlDecl("alert(instr.ownerDocument === doc);\n"); + tester_xmlDecl("log(instr.ownerDocument === doc);\n"); } /** @@ -463,17 +464,18 @@ public void ownerDocument_xmlDecl() throws Exception { IE = "true") public void ownerDocument_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var instr = doc.createProcessingInstruction('apache', 'file=\"header.html\"');\n" + " try {\n" - + " alert(instr.ownerDocument === doc);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(instr.ownerDocument === doc);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -484,17 +486,18 @@ public void ownerDocument_created() throws Exception { IE = "true") public void ownerDocument_created_xmlDecl() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var instr = doc.createProcessingInstruction('xml', 'version=\"1.0\"');\n" + " try {\n" - + " alert(instr.ownerDocument === doc);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(instr.ownerDocument === doc);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -504,7 +507,7 @@ public void ownerDocument_created_xmlDecl() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void parentNode() throws Exception { - tester("alert(doc === instr.parentNode);\n"); + tester("log(doc === instr.parentNode);\n"); } /** @@ -514,7 +517,7 @@ public void parentNode() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void parentNode_xmlDecl() throws Exception { - tester_xmlDecl("alert(doc === instr.parentNode);\n"); + tester_xmlDecl("log(doc === instr.parentNode);\n"); } /** @@ -525,17 +528,18 @@ public void parentNode_xmlDecl() throws Exception { IE = "true") public void parentNode_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var instr = doc.createProcessingInstruction('apache', 'file=\"header.html\"');\n" + " try {\n" - + " alert(instr.parentNode == null);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(instr.parentNode == null);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -546,17 +550,18 @@ public void parentNode_created() throws Exception { IE = "true") public void parentNode_created_xmlDecl() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var instr = doc.createProcessingInstruction('xml', 'version=\"1.0\"');\n" + " try {\n" - + " alert(instr.parentNode == null);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(instr.parentNode == null);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -605,40 +610,40 @@ public void target_xmlDecl() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"include file=\"header.html\" ", "include file=\"header.html\" ", "include file=\"header.html\" ", - "exception-setNull", - "", "", "", - "test", "test", "test", - "test\ntest", "test\ntest", "test\ntest", - "", "", ""}) + "exception-setNull", + "", "", "", + "test", "test", "test", + "test test", "test test", "test test", + "", "", ""}) public void text() throws Exception { final String test = "" - + "alert(instr.text);\n" - + "alert(instr.data);\n" - + "alert(instr.nodeValue);\n" + + "log(instr.text);\n" + + "log(instr.data);\n" + + "log(instr.nodeValue);\n" // null + "try {\n" + " instr.text = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "instr.text = '';\n" - + "alert(instr.text);\n" - + "alert(instr.data);\n" - + "alert(instr.nodeValue);\n" + + "log(instr.text);\n" + + "log(instr.data);\n" + + "log(instr.nodeValue);\n" // normal + "instr.text = 'test';\n" - + "alert(instr.text);\n" - + "alert(instr.data);\n" - + "alert(instr.nodeValue);\n" + + "log(instr.text);\n" + + "log(instr.data);\n" + + "log(instr.nodeValue);\n" // linebreak + "instr.text = 'test\\ntest';\n" - + "alert(instr.text);\n" - + "alert(instr.data);\n" - + "alert(instr.nodeValue);\n" + + "log(instr.text);\n" + + "log(instr.data);\n" + + "log(instr.nodeValue);\n" // xml + "instr.text = '';\n" - + "alert(instr.text);\n" - + "alert(instr.data);\n" - + "alert(instr.nodeValue);\n"; + + "log(instr.text);\n" + + "log(instr.data);\n" + + "log(instr.nodeValue);\n"; tester(test); } @@ -649,26 +654,26 @@ public void text() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"version=\"1.0\"", "version=\"1.0\"", "version=\"1.0\"", - "exception-setNull", - "exception-setEmpty", - "exception-set"}) + "exception-setNull", + "exception-setEmpty", + "exception-set"}) public void text_xmlDecl() throws Exception { final String test = "" - + "alert(instr.text);\n" - + "alert(instr.data);\n" - + "alert(instr.nodeValue);\n" + + "log(instr.text);\n" + + "log(instr.data);\n" + + "log(instr.nodeValue);\n" // null + "try {\n" + " instr.text = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "try {\n" + " instr.text = '';\n" - + "} catch(e) { alert('exception-setEmpty'); }\n" + + "} catch(e) { log('exception-setEmpty'); }\n" // normal + "try {\n" + " instr.text = 'test';\n" - + "} catch(e) { alert('exception-set'); }\n"; + + "} catch(e) { log('exception-set'); }\n"; tester_xmlDecl(test); } @@ -701,25 +706,26 @@ public void xml_xmlDecl() throws Exception { IE = "") public void xml_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var instr = doc.createProcessingInstruction('x', '');\n" + " try {\n" - + " alert(instr.xml);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(instr.xml);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } private void property(final String property) throws Exception { - tester("alert(instr." + property + ");\n"); + tester("log(instr." + property + ");\n"); } private void property_xmlDecl(final String property) throws Exception { - tester_xmlDecl("alert(instr." + property + ");\n"); + tester_xmlDecl("log(instr." + property + ");\n"); } private void tester(final String test) throws Exception { @@ -731,6 +737,7 @@ private void tester(final String test) throws Exception { private void tester_xmlDecl(final String test) throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" @@ -738,15 +745,16 @@ private void tester_xmlDecl(final String test) throws Exception { + " doc.appendChild(instr);\n" + " try {\n" + test - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } private void tester(final String test, final String xml) throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'second.xml'") + ";\n" @@ -754,11 +762,11 @@ private void tester(final String test, final String xml) throws Exception { + " try {\n" + " var instr = doc.firstChild;\n" + test - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; getMockWebConnection().setDefaultResponse(xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMTextTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMTextTest.java index 6e1f562a0..ec7bf4dcb 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMTextTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLDOMTextTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -48,7 +48,7 @@ public class XMLDOMTextTest extends WebDriverTestCase { @Alerts(DEFAULT = "no ActiveX", IE = "[object Object]") public void scriptableToString() throws Exception { - tester("alert(Object.prototype.toString.call(text));\n"); + tester("log(Object.prototype.toString.call(text));\n"); } /** @@ -78,7 +78,7 @@ public void baseName() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "0") public void childNodes() throws Exception { - tester("alert(text.childNodes.length);\n"); + tester("log(text.childNodes.length);\n"); } /** @@ -87,40 +87,40 @@ public void childNodes() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"X", "X", "X", - "exception-setNull", - "", "", "", - "test", "test", "test", - "test\ntest", "test\ntest", "test\ntest", - "", "", ""}) + "exception-setNull", + "", "", "", + "test", "test", "test", + "test\\ntest", "test\\ntest", "test\\ntest", + "", "", ""}) public void data() throws Exception { final String test = "" - + "alert(text.data);\n" - + "alert(text.nodeValue);\n" - + "alert(text.text);\n" + + "log(text.data);\n" + + "log(text.nodeValue);\n" + + "log(text.text);\n" // null + "try {\n" + " text.data = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "text.data = '';\n" - + "alert(text.data);\n" - + "alert(text.nodeValue);\n" - + "alert(text.text);\n" + + "log(text.data);\n" + + "log(text.nodeValue);\n" + + "log(text.text);\n" // normal + "text.data = 'test';\n" - + "alert(text.data);\n" - + "alert(text.nodeValue);\n" - + "alert(text.text);\n" + + "log(text.data);\n" + + "log(text.nodeValue);\n" + + "log(text.text);\n" // linebreak + "text.data = 'test\\ntest';\n" - + "alert(text.data);\n" - + "alert(text.nodeValue);\n" - + "alert(text.text);\n" + + "log(text.data);\n" + + "log(text.nodeValue);\n" + + "log(text.text);\n" // xml + "text.data = '';\n" - + "alert(text.data);\n" - + "alert(text.nodeValue);\n" - + "alert(text.text);\n"; + + "log(text.data);\n" + + "log(text.nodeValue);\n" + + "log(text.text);\n"; final String xml = "" + "" @@ -178,19 +178,19 @@ public void lastChild() throws Exception { IE = {"1", "0", "4", "9", "6"}) public void length() throws Exception { final String test = "" - + "alert(text.length);\n" + + "log(text.length);\n" // empty + "text.data = '';\n" - + "alert(text.length);\n" + + "log(text.length);\n" // normal + "text.data = 'test';\n" - + "alert(text.length);\n" + + "log(text.length);\n" // linebreak + "text.data = 'test\\ntest';\n" - + "alert(text.length);\n" + + "log(text.length);\n" // xml + "text.data = '';\n" - + "alert(text.length);\n"; + + "log(text.length);\n"; final String xml = "" + "" @@ -236,40 +236,40 @@ public void nodeType() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"X", "X", "X", - "exception-setNull", - "", "", "", - "test", "test", "test", - "test\ntest", "test\ntest", "test\ntest", - "", "", ""}) + "exception-setNull", + "", "", "", + "test", "test", "test", + "test\\ntest", "test\\ntest", "test\\ntest", + "", "", ""}) public void nodeValue() throws Exception { final String test = "" - + "alert(text.nodeValue);\n" - + "alert(text.data);\n" - + "alert(text.text);\n" + + "log(text.nodeValue);\n" + + "log(text.data);\n" + + "log(text.text);\n" // null + "try {\n" + " text.nodeValue = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "text.nodeValue = '';\n" - + "alert(text.nodeValue);\n" - + "alert(text.data);\n" - + "alert(text.text);\n" + + "log(text.nodeValue);\n" + + "log(text.data);\n" + + "log(text.text);\n" // normal + "text.nodeValue = 'test';\n" - + "alert(text.nodeValue);\n" - + "alert(text.data);\n" - + "alert(text.text);\n" + + "log(text.nodeValue);\n" + + "log(text.data);\n" + + "log(text.text);\n" // linebreak + "text.nodeValue = 'test\\ntest';\n" - + "alert(text.nodeValue);\n" - + "alert(text.data);\n" - + "alert(text.text);\n" + + "log(text.nodeValue);\n" + + "log(text.data);\n" + + "log(text.text);\n" // xml + "text.nodeValue = '';\n" - + "alert(text.nodeValue);\n" - + "alert(text.data);\n" - + "alert(text.text);\n"; + + "log(text.nodeValue);\n" + + "log(text.data);\n" + + "log(text.text);\n"; final String xml = "" + "" @@ -290,13 +290,13 @@ public void nodeValue() throws Exception { public void nodeValue_empty() throws Exception { final String test = // space - "alert(text.firstChild == null);\n" + "log(text.firstChild == null);\n" // tab + "text = text.nextSibling;\n" - + "alert(text.firstChild == null);\n" + + "log(text.firstChild == null);\n" // linebreak + "text = text.nextSibling;\n" - + "alert(text.firstChild == null);\n"; + + "log(text.firstChild == null);\n"; final String xml = "" + "" @@ -315,7 +315,7 @@ public void nodeValue_empty() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void ownerDocument() throws Exception { - tester("alert(text.ownerDocument === doc);\n"); + tester("log(text.ownerDocument === doc);\n"); } /** @@ -326,17 +326,18 @@ public void ownerDocument() throws Exception { IE = "true") public void ownerDocument_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var text = doc.createTextNode('something');\n" + " try {\n" - + " alert(text.ownerDocument === doc);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(text.ownerDocument === doc);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -346,7 +347,7 @@ public void ownerDocument_created() throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "true") public void parentNode() throws Exception { - tester("alert(root === text.parentNode);\n"); + tester("log(root === text.parentNode);\n"); } /** @@ -357,17 +358,18 @@ public void parentNode() throws Exception { IE = "true") public void parentNode_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var text = doc.createTextNode('something');\n" + " try {\n" - + " alert(text.parentNode == null);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(text.parentNode == null);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -386,40 +388,40 @@ public void prefix() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"X", "X", "X", - "exception-setNull", - "", "", "", - "test", "test", "test", - "test\ntest", "test\ntest", "test\ntest", - "", "", ""}) + "exception-setNull", + "", "", "", + "test", "test", "test", + "test\\ntest", "test\\ntest", "test\\ntest", + "", "", ""}) public void text() throws Exception { final String test = "" - + "alert(text.text);\n" - + "alert(text.data);\n" - + "alert(text.nodeValue);\n" + + "log(text.text);\n" + + "log(text.data);\n" + + "log(text.nodeValue);\n" // null + "try {\n" + " text.text = null;\n" - + "} catch(e) { alert('exception-setNull'); }\n" + + "} catch(e) { log('exception-setNull'); }\n" // empty + "text.text = '';\n" - + "alert(text.text);\n" - + "alert(text.data);\n" - + "alert(text.nodeValue);\n" + + "log(text.text);\n" + + "log(text.data);\n" + + "log(text.nodeValue);\n" // normal + "text.text = 'test';\n" - + "alert(text.text);\n" - + "alert(text.data);\n" - + "alert(text.nodeValue);\n" + + "log(text.text);\n" + + "log(text.data);\n" + + "log(text.nodeValue);\n" // linebreak + "text.text = 'test\\ntest';\n" - + "alert(text.text);\n" - + "alert(text.data);\n" - + "alert(text.nodeValue);\n" + + "log(text.text);\n" + + "log(text.data);\n" + + "log(text.nodeValue);\n" // xml + "text.text = '';\n" - + "alert(text.text);\n" - + "alert(text.data);\n" - + "alert(text.nodeValue);\n"; + + "log(text.text);\n" + + "log(text.data);\n" + + "log(text.nodeValue);\n"; final String xml = "" + "" @@ -434,26 +436,27 @@ public void text() throws Exception { */ @Test @Alerts(DEFAULT = "no ActiveX", - IE = {"text", "text\\r\\ntext", " text text "}) + IE = {"text", "text\\r\\ntext", "##text##text##"}) public void xml() throws Exception { final String test = // text "var txt = text.firstChild.xml;\n" + "txt = txt.replace(/\\r/g, '\\\\r');\n" + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n" + + "log(txt);\n" // linebreak + "text = text.nextSibling;\n" + "txt = text.firstChild.xml;\n" + "txt = txt.replace(/\\r/g, '\\\\r');\n" + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n" + + "log(txt);\n" // space + "text = text.nextSibling;\n" + "var txt = text.firstChild.xml;\n" + "txt = txt.replace(/\\r/g, '\\\\r');\n" + "txt = txt.replace(/\\n/g, '\\\\n');\n" - + "alert(txt);\n"; + + "txt = txt.replace(/ /g, '#');\n" + + "log(txt);\n"; final String xml = "" + "" @@ -473,17 +476,18 @@ public void xml() throws Exception { IE = "") public void xml_created() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callCreateXMLDOMDocument() + ";\n" + " var text = doc.createTextNode('');\n" + " try {\n" - + " alert(text.xml);\n" - + " } catch(e) { alert('exception'); }\n" + + " log(text.xml);\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLDOMDOCUMENT_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -491,23 +495,23 @@ public void xml_created() throws Exception { */ @Test @Alerts(DEFAULT = "no ActiveX", - IE = {"myText", "myText-appended", "exception-appendNull", "myText-appended", "myText-appended\n"}) + IE = {"myText", "myText-appended", "exception-appendNull", "myText-appended", "myText-appended\\n"}) public void appendData() throws Exception { final String test = "" - + "alert(text.data);\n" + + "log(text.data);\n" // normal + "text.appendData('-appended');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // null + "try {\n" + " text.appendData(null);\n" - + "} catch(e) { alert('exception-appendNull'); }\n" + + "} catch(e) { log('exception-appendNull'); }\n" // empty + "text.appendData('');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // linebreak + "text.appendData('\\n');\n" - + "alert(text.data);\n"; + + "log(text.data);\n"; tester(test); } @@ -518,44 +522,44 @@ public void appendData() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"myText", "myTex", "myx", "yx", - "exception-deletePosNegative", "yx", - "exception-deletePosTooHigh", "yx", - "yx", - "exception-deleteCntNegative", "yx", - "y"}) + "exception-deletePosNegative", "yx", + "exception-deletePosTooHigh", "yx", + "yx", + "exception-deleteCntNegative", "yx", + "y"}) public void deleteData() throws Exception { final String test = "" - + "alert(text.data);\n" + + "log(text.data);\n" // back + "text.deleteData(5, 1);\n" - + "alert(text.data);\n" + + "log(text.data);\n" // middle + "text.deleteData(2, 2);\n" - + "alert(text.data);\n" + + "log(text.data);\n" // front + "text.deleteData(0, 1);\n" - + "alert(text.data);\n" + + "log(text.data);\n" // position negative + "try {\n" + " text.deleteData(-1, 1);\n" - + "} catch(e) { alert('exception-deletePosNegative'); }\n" - + "alert(text.data);\n" + + "} catch(e) { log('exception-deletePosNegative'); }\n" + + "log(text.data);\n" // position too high + "try {\n" + " text.deleteData(5, 1);\n" - + "} catch(e) { alert('exception-deletePosTooHigh'); }\n" - + "alert(text.data);\n" + + "} catch(e) { log('exception-deletePosTooHigh'); }\n" + + "log(text.data);\n" // count zero + "text.deleteData(1, 0);\n" - + "alert(text.data);\n" + + "log(text.data);\n" // count negative + "try {\n" + " text.deleteData(1, -1);\n" - + "} catch(e) { alert('exception-deleteCntNegative'); }\n" - + "alert(text.data);\n" + + "} catch(e) { log('exception-deleteCntNegative'); }\n" + + "log(text.data);\n" // count too high + "text.deleteData(1, 5);\n" - + "alert(text.data);\n"; + + "log(text.data);\n"; tester(test); } @@ -566,49 +570,49 @@ public void deleteData() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"myText", "myText-b", "myT-m-ext-b", "f-myT-m-ext-b", - "exception-insertNull", "f-myT-m-ext-b", "\nf-myT-m-ext-b", - "\nf-myT-m-ext-b", - "exception-insertPosNegative", "\nf-myT-m-ext-b", - "\nf-myT-m-ext-b", - "exception-insertPosTooHigh", "\nf-myT-m-ext-b"}) + "exception-insertNull", "f-myT-m-ext-b", "\\nf-myT-m-ext-b", + "\\nf-myT-m-ext-b", + "exception-insertPosNegative", "\\nf-myT-m-ext-b", + "\\nf-myT-m-ext-b", + "exception-insertPosTooHigh", "\\nf-myT-m-ext-b"}) public void insertData() throws Exception { final String test = "" - + "alert(text.data);\n" + + "log(text.data);\n" // back + "text.insertData(6, '-b');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // middle + "text.insertData(3, '-m-');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // front + "text.insertData(0, 'f-');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // null + "try {\n" + " text.insertData(0, null);\n" - + "} catch(e) { alert('exception-insertNull'); }\n" + + "} catch(e) { log('exception-insertNull'); }\n" // empty + "text.insertData(5, '');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // linebreak + "text.insertData(0, '\\n');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // empty and position negative + "text.insertData(-1, '');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // position negative + "try {\n" + " text.insertData(-1, 'X');\n" - + "} catch(e) { alert('exception-insertPosNegative'); }\n" - + "alert(text.data);\n" + + "} catch(e) { log('exception-insertPosNegative'); }\n" + + "log(text.data);\n" // empty and position too high + "text.insertData(25, '');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // position too high + "try {\n" + " text.insertData(25, 'Y');\n" - + "} catch(e) { alert('exception-insertPosTooHigh'); }\n" - + "alert(text.data);\n"; + + "} catch(e) { log('exception-insertPosTooHigh'); }\n" + + "log(text.data);\n"; tester(test); } @@ -619,55 +623,55 @@ public void insertData() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"myText", "myTex-b", "my-m-x-b", "f-y-m-x-b", - "exception-replaceNull", "f-y--x-b", "f-y\nx-b", - "exception-replacePosNegative", "f-y\nx-b", - "exception-replacePosTooHigh", "f-y\nx-b", - "f-y\nx-b", - "exception-replaceCntNegative", "f-y\nx-b", - "f"}) + "exception-replaceNull", "f-y--x-b", "f-y\\nx-b", + "exception-replacePosNegative", "f-y\\nx-b", + "exception-replacePosTooHigh", "f-y\\nx-b", + "f-y\\nx-b", + "exception-replaceCntNegative", "f-y\\nx-b", + "f"}) public void replaceData() throws Exception { final String test = "" - + "alert(text.data);\n" + + "log(text.data);\n" // back + "text.replaceData(5, 1, '-b');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // middle + "text.replaceData(2, 2, '-m-');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // front + "text.replaceData(0, 1, 'f-');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // null + "try {\n" + " text.replaceData(0, 1, null);\n" - + "} catch(e) { alert('exception-replaceNull'); }\n" + + "} catch(e) { log('exception-replaceNull'); }\n" // empty + "text.replaceData(4, 1, '');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // linebreak + "text.replaceData(3, 2, '\\n');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // position negative + "try {\n" + " text.replaceData(-1, 1, '');\n" - + "} catch(e) { alert('exception-replacePosNegative'); }\n" - + "alert(text.data);\n" + + "} catch(e) { log('exception-replacePosNegative'); }\n" + + "log(text.data);\n" // position too high + "try {\n" + " text.replaceData(25, 1, '');\n" - + "} catch(e) { alert('exception-replacePosTooHigh'); }\n" - + "alert(text.data);\n" + + "} catch(e) { log('exception-replacePosTooHigh'); }\n" + + "log(text.data);\n" // count zero + "text.replaceData(1, 0, '');\n" - + "alert(text.data);\n" + + "log(text.data);\n" // count negative + "try {\n" + " text.replaceData(1, -1, '');\n" - + "} catch(e) { alert('exception-replaceCntNegative'); }\n" - + "alert(text.data);\n" + + "} catch(e) { log('exception-replaceCntNegative'); }\n" + + "log(text.data);\n" // count too high + "text.replaceData(1, 25, '');\n" - + "alert(text.data);\n"; + + "log(text.data);\n"; tester(test); } @@ -678,30 +682,30 @@ public void replaceData() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"1", "2", "#text", "2", "my", "#text", "4", "Text", "true", - "exception-splitPosNegative", "my", - "exception-splitPosTooHigh", "my"}) + "exception-splitPosNegative", "my", + "exception-splitPosTooHigh", "my"}) public void splitText() throws Exception { final String test = "" - + "alert(root.childNodes.length);\n" + + "log(root.childNodes.length);\n" + "var node = text.splitText(2);\n" - + "alert(root.childNodes.length);\n" - + "alert(root.childNodes[0].nodeName);\n" - + "alert(root.childNodes[0].length);\n" - + "alert(root.childNodes[0].text);\n" - + "alert(root.childNodes[1].nodeName);\n" - + "alert(root.childNodes[1].length);\n" - + "alert(root.childNodes[1].text);\n" - + "alert(node === root.childNodes[1]);\n" + + "log(root.childNodes.length);\n" + + "log(root.childNodes[0].nodeName);\n" + + "log(root.childNodes[0].length);\n" + + "log(root.childNodes[0].text);\n" + + "log(root.childNodes[1].nodeName);\n" + + "log(root.childNodes[1].length);\n" + + "log(root.childNodes[1].text);\n" + + "log(node === root.childNodes[1]);\n" // position negative + "try {\n" + " text.splitText(-1);\n" - + "} catch(e) { alert('exception-splitPosNegative'); }\n" - + "alert(text.data);\n" + + "} catch(e) { log('exception-splitPosNegative'); }\n" + + "log(text.data);\n" // position too high + "try {\n" + " text.splitText(25);\n" - + "} catch(e) { alert('exception-splitPosTooHigh'); }\n" - + "alert(text.data);\n"; + + "} catch(e) { log('exception-splitPosTooHigh'); }\n" + + "log(text.data);\n"; tester(test); } @@ -711,50 +715,50 @@ public void splitText() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"myText", "t", "myText", "Te", "myText", "m", "myText", - "exception-substringPosNegative", "myText", - "exception-substringPosTooHigh", "myText", - "", "myText", - "exception-substringCntNegative", "myText", - "yText", "myText"}) + "exception-substringPosNegative", "myText", + "exception-substringPosTooHigh", "myText", + "", "myText", + "exception-substringCntNegative", "myText", + "yText", "myText"}) public void substringData() throws Exception { final String test = "" - + "alert(text.data);\n" + + "log(text.data);\n" // back - + "alert(text.substringData(5, 1));\n" - + "alert(text.data);\n" + + "log(text.substringData(5, 1));\n" + + "log(text.data);\n" // middle - + "alert(text.substringData(2, 2));\n" - + "alert(text.data);\n" + + "log(text.substringData(2, 2));\n" + + "log(text.data);\n" // front - + "alert(text.substringData(0, 1));\n" - + "alert(text.data);\n" + + "log(text.substringData(0, 1));\n" + + "log(text.data);\n" // position negative + "try {\n" + " text.substringData(-1, 1);\n" - + "} catch(e) { alert('exception-substringPosNegative'); }\n" - + "alert(text.data);\n" + + "} catch(e) { log('exception-substringPosNegative'); }\n" + + "log(text.data);\n" // position too high + "try {\n" + " text.substringData(25, 1);\n" - + "} catch(e) { alert('exception-substringPosTooHigh'); }\n" - + "alert(text.data);\n" + + "} catch(e) { log('exception-substringPosTooHigh'); }\n" + + "log(text.data);\n" // count zero - + "alert(text.substringData(1, 0));\n" - + "alert(text.data);\n" + + "log(text.substringData(1, 0));\n" + + "log(text.data);\n" // count negative + "try {\n" + " text.substringData(1, -1);\n" - + "} catch(e) { alert('exception-substringCntNegative'); }\n" - + "alert(text.data);\n" + + "} catch(e) { log('exception-substringCntNegative'); }\n" + + "log(text.data);\n" // count too high - + "alert(text.substringData(1, 25));\n" - + "alert(text.data);\n"; + + "log(text.substringData(1, 25));\n" + + "log(text.data);\n"; tester(test); } private void property(final String property) throws Exception { - tester("alert(text." + property + ");\n"); + tester("log(text." + property + ");\n"); } private void tester(final String test) throws Exception { @@ -765,6 +769,7 @@ private void tester(final String test) throws Exception { private void tester(final String test, final String xml) throws Exception { final String html = "" + + LOG_TITLE_NORMALIZE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var doc = " + callLoadXMLDOMDocumentFromURL("'second.xml'") + ";\n" @@ -772,11 +777,11 @@ private void tester(final String test, final String xml) throws Exception { + " try {\n" + " var text = root.firstChild;\n" + test - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + LOAD_XMLDOMDOCUMENT_FROM_URL_FUNCTION; getMockWebConnection().setDefaultResponse(xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLHTTPRequestTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLHTTPRequestTest.java index 1e52fc1ab..951169caa 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLHTTPRequestTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLHTTPRequestTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -108,17 +108,18 @@ public void createRequest_Msxml2_XMLHTTP_6() throws Exception { private void createRequest(final String activeXName) throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var xhr = " + callCreateXMLHTTPRequest() + ";\n" - + " alert(Object.prototype.toString.call(xhr));\n" + + " log(Object.prototype.toString.call(xhr));\n" + " }\n" + " function " + CREATE_XMLHTTPREQUEST_FUNCTION_NAME + "() {\n" + " return new ActiveXObject('" + activeXName + "');\n" + " }\n"; getMockWebConnection().setDefaultResponse("Error: not found", 404, "Not Found", MimeType.TEXT_HTML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -128,7 +129,7 @@ private void createRequest(final String activeXName) throws Exception { @Alerts(DEFAULT = "no ActiveX", IE = "[object Object]") public void scriptableToString() throws Exception { - tester("alert(Object.prototype.toString.call(xhr));\n"); + tester("log(Object.prototype.toString.call(xhr));\n"); } /** @@ -139,13 +140,14 @@ public void scriptableToString() throws Exception { IE = "0") public void properties_caseSensitive() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var xhr = " + callCreateXMLHTTPRequest() + ";\n" - + " alert(xhr.reAdYsTaTe);\n" + + " log(xhr.reAdYsTaTe);\n" + " }\n" + CREATE_XMLHTTPREQUEST_FUNCTION; - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -169,16 +171,16 @@ public void onreadystatechange_sync() throws Exception { + "xhr.onreadystatechange = onStateChange;\n" // open + "xhr.open(\"GET\", \"" + URL_SECOND + "\", false);\n" - + "alert('opened 1');\n" + + "log('opened 1');\n" // send + "xhr.send();\n" - + "alert('sent 1');\n" + + "log('sent 1');\n" // re-open + "xhr.open(\"GET\", \"" + URL_SECOND + "\", false);\n" - + "alert('opened 2');\n" + + "log('opened 2');\n" // send + "xhr.send();\n" - + "alert('sent 2');\n"; + + "log('sent 2');\n"; tester(test); } @@ -194,10 +196,10 @@ public void onreadystatechange_async() throws Exception { + "xhr.onreadystatechange = onStateChange;\n" // open + "xhr.open(\"GET\", \"" + URL_SECOND + "delay500/\", true);\n" - + "alert('opened 1');\n" + + "log('opened 1');\n" // send + "xhr.send();\n" - + "alert('sent 1');\n"; + + "log('sent 1');\n"; getMockWebConnection().setDefaultResponse("Error: not found", 404, "Not Found", MimeType.TEXT_HTML); tester(test); @@ -229,10 +231,10 @@ public void readyState_async() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"exception-created", - "exception-opened", - "", - "exception-reopened", - ""}) + "exception-opened", + "", + "exception-reopened", + ""}) public void responseText_sync() throws Exception { property_lifecycleSync("responseText"); } @@ -243,10 +245,10 @@ public void responseText_sync() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"1:exception-async", - "1:exception-async", - "2:exception-async", - "3:exception-async", - "4:"}) + "1:exception-async", + "2:exception-async", + "3:exception-async", + "4:"}) public void responseText_async() throws Exception { property_lifecycleAsync("responseText"); } @@ -259,6 +261,7 @@ public void responseText_async() throws Exception { IE = "") public void responseText_contentTypeNull() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " var xhr;\n" + " function test() {\n" + ACTIVEX_CHECK @@ -267,14 +270,14 @@ public void responseText_contentTypeNull() throws Exception { + " xhr.open(\"GET\", \"" + URL_SECOND + "\", false);\n" + " xhr.send();\n" + " try {\n" - + " alert(xhr.responseText);\n" - + " } catch(e) { alert('exception-text'); }\n" - + " } catch(e) { alert('exception'); }\n" + + " log(xhr.responseText);\n" + + " } catch(e) { log('exception-text'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLHTTPREQUEST_FUNCTION; getMockWebConnection().setResponse(URL_SECOND, "", null); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -285,6 +288,7 @@ public void responseText_contentTypeNull() throws Exception { IE = "") public void responseText_contentTypeText() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " var xhr;\n" + " function test() {\n" + ACTIVEX_CHECK @@ -293,14 +297,14 @@ public void responseText_contentTypeText() throws Exception { + " xhr.open(\"GET\", \"" + URL_SECOND + "\", false);\n" + " xhr.send();\n" + " try {\n" - + " alert(xhr.responseText);\n" - + " } catch(e) { alert('exception-text'); }\n" - + " } catch(e) { alert('exception'); }\n" + + " log(xhr.responseText);\n" + + " } catch(e) { log('exception-text'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLHTTPREQUEST_FUNCTION; getMockWebConnection().setResponse(URL_SECOND, "", MimeType.TEXT_PLAIN); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -311,6 +315,7 @@ public void responseText_contentTypeText() throws Exception { IE = "") public void responseText_contentTypeApplicationXML() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " var xhr;\n" + " function test() {\n" + ACTIVEX_CHECK @@ -319,14 +324,14 @@ public void responseText_contentTypeApplicationXML() throws Exception { + " xhr.open(\"GET\", \"" + URL_SECOND + "\", false);\n" + " xhr.send();\n" + " try {\n" - + " alert(xhr.responseText);\n" - + " } catch(e) { alert('exception-text'); }\n" - + " } catch(e) { alert('exception'); }\n" + + " log(xhr.responseText);\n" + + " } catch(e) { log('exception-text'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLHTTPREQUEST_FUNCTION; getMockWebConnection().setResponse(URL_SECOND, "", "application/xml"); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -338,6 +343,7 @@ public void responseText_contentTypeApplicationXML() throws Exception { IE = "ol\u00E9") public void responseText_defaultEncodingIsUTF8() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " var xhr;\n" + " function test() {\n" + ACTIVEX_CHECK @@ -346,9 +352,9 @@ public void responseText_defaultEncodingIsUTF8() throws Exception { + " xhr.open('GET', '" + URL_SECOND + "', false);\n" + " xhr.send();\n" + " try {\n" - + " alert(xhr.responseText);\n" - + " } catch(e) { alert('exception-text'); }\n" - + " } catch(e) { alert('exception'); }\n" + + " log(xhr.responseText);\n" + + " } catch(e) { log('exception-text'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLHTTPREQUEST_FUNCTION; @@ -357,7 +363,7 @@ public void responseText_defaultEncodingIsUTF8() throws Exception { getMockWebConnection().setResponse(URL_SECOND, responseBytes, 200, "OK", MimeType.TEXT_PLAIN, new ArrayList()); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -366,10 +372,10 @@ public void responseText_defaultEncodingIsUTF8() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"exception-created", - "", - "\\r\\n", - "", - "\\r\\n"}) + "", + "\\r\\n", + "", + "\\r\\n"}) public void responseXML_sync() throws Exception { property_lifecycleSync("responseXML.xml"); } @@ -392,6 +398,7 @@ public void responseXML_async() throws Exception { IE = "") public void responseXML_contentTypeNull() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " var xhr;\n" + " function test() {\n" + ACTIVEX_CHECK @@ -400,14 +407,14 @@ public void responseXML_contentTypeNull() throws Exception { + " xhr.open(\"GET\", \"" + URL_SECOND + "\", false);\n" + " xhr.send();\n" + " try {\n" - + " alert(xhr.responseXML.xml);\n" - + " } catch(e) { alert('exception-xml'); }\n" - + " } catch(e) { alert('exception'); }\n" + + " log(xhr.responseXML.xml);\n" + + " } catch(e) { log('exception-xml'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLHTTPREQUEST_FUNCTION; getMockWebConnection().setResponse(URL_SECOND, "", null); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -418,6 +425,7 @@ public void responseXML_contentTypeNull() throws Exception { IE = "") public void responseXML_contentTypeText() throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " var xhr;\n" + " function test() {\n" + ACTIVEX_CHECK @@ -426,14 +434,14 @@ public void responseXML_contentTypeText() throws Exception { + " xhr.open(\"GET\", \"" + URL_SECOND + "\", false);\n" + " xhr.send();\n" + " try {\n" - + " alert(xhr.responseXML.xml);\n" - + " } catch(e) { alert('exception-xml'); }\n" - + " } catch(e) { alert('exception'); }\n" + + " log(xhr.responseXML.xml);\n" + + " } catch(e) { log('exception-xml'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLHTTPREQUEST_FUNCTION; getMockWebConnection().setResponse(URL_SECOND, "", MimeType.TEXT_PLAIN); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -444,6 +452,7 @@ public void responseXML_contentTypeText() throws Exception { IE = "\\r\\n") public void responseXML_contentTypeApplicationXML() throws Exception { final String html = "" + + LOG_TITLE_NORMALIZE_FUNCTION + " var xhr;\n" + " function test() {\n" + ACTIVEX_CHECK @@ -452,17 +461,14 @@ public void responseXML_contentTypeApplicationXML() throws Exception { + " xhr.open(\"GET\", \"" + URL_SECOND + "\", false);\n" + " xhr.send();\n" + " try {\n" - + " var txt = xhr.responseXML.xml;\n" - + " txt = txt.replace(/\\r/g, '\\\\r');\n" - + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + " } catch(e) { alert('exception-xml'); }\n" - + " } catch(e) { alert('exception'); }\n" + + " log(xhr.responseXML.xml);\n" + + " } catch(e) { log('exception-xml'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLHTTPREQUEST_FUNCTION; getMockWebConnection().setResponse(URL_SECOND, "", "application/xml"); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -474,6 +480,7 @@ public void responseXML_contentTypeApplicationXML() throws Exception { IE = "ol\u00E9\\r\\n") public void responseXML_defaultEncodingIsUTF8() throws Exception { final String html = "" + + LOG_TITLE_NORMALIZE_FUNCTION + " var xhr;\n" + " function test() {\n" + ACTIVEX_CHECK @@ -482,12 +489,9 @@ public void responseXML_defaultEncodingIsUTF8() throws Exception { + " xhr.open('GET', '" + URL_SECOND + "', false);\n" + " xhr.send();\n" + " try {\n" - + " var txt = xhr.responseXML.xml;\n" - + " txt = txt.replace(/\\r/g, '\\\\r');\n" - + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + " } catch(e) { alert('exception-xml'); }\n" - + " } catch(e) { alert('exception'); }\n" + + " log(xhr.responseXML.xml);\n" + + " } catch(e) { log('exception-xml'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + CREATE_XMLHTTPREQUEST_FUNCTION; @@ -496,7 +500,7 @@ public void responseXML_defaultEncodingIsUTF8() throws Exception { getMockWebConnection().setResponse(URL_SECOND, responseBytes, 200, "OK", MimeType.TEXT_XML, new ArrayList()); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } /** @@ -505,10 +509,10 @@ public void responseXML_defaultEncodingIsUTF8() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"exception-created", - "exception-opened", - "200", - "exception-reopened", - "200"}) + "exception-opened", + "200", + "exception-reopened", + "200"}) public void status_sync() throws Exception { property_lifecycleSync("status"); } @@ -519,10 +523,10 @@ public void status_sync() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"1:exception-async", - "1:exception-async", - "2:exception-async", - "3:exception-async", - "4:200"}) + "1:exception-async", + "2:exception-async", + "3:exception-async", + "4:200"}) public void status_async() throws Exception { property_lifecycleAsync("status"); } @@ -533,10 +537,10 @@ public void status_async() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"exception-created", - "exception-opened", - "OK", - "exception-reopened", - "OK"}) + "exception-opened", + "OK", + "exception-reopened", + "OK"}) public void statusText_sync() throws Exception { property_lifecycleSync("statusText"); } @@ -547,10 +551,10 @@ public void statusText_sync() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"1:exception-async", - "1:exception-async", - "2:exception-async", - "3:exception-async", - "4:OK"}) + "1:exception-async", + "2:exception-async", + "3:exception-async", + "4:OK"}) public void statusText_async() throws Exception { property_lifecycleAsync("statusText"); } @@ -561,13 +565,13 @@ public void statusText_async() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"0:ex status ex text ex xml", - "0:ex status ex text ex xml"}) + "0:ex status ex text ex xml"}) public void abort_created() throws Exception { final String test = "" + "debugRequest(xhr);\n" + "try {\n" + " xhr.abort();\n" - + "} catch(e) { alert('exception-abort'); }\n" + + "} catch(e) { log('exception-abort'); }\n" + "debugRequest(xhr);\n"; tester(test); @@ -579,14 +583,14 @@ public void abort_created() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"1:ex status ex text ", - "0:ex status ex text ex xml"}) + "0:ex status ex text ex xml"}) public void abort_opened() throws Exception { final String test = "" + "xhr.open(\"GET\", \"" + URL_SECOND + "\", false);\n" + "debugRequest(xhr);\n" + "try {\n" + " xhr.abort();\n" - + "} catch(e) { alert('exception-abort'); }\n" + + "} catch(e) { log('exception-abort'); }\n" + "debugRequest(xhr);\n"; tester(test); @@ -598,7 +602,7 @@ public void abort_opened() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"4:200 \\r\\n", - "0:ex status ex text ex xml"}) + "0:ex status ex text ex xml"}) public void abort_sentSync() throws Exception { final String test = "" + "xhr.open(\"GET\", \"" + URL_SECOND + "\", false);\n" @@ -606,7 +610,7 @@ public void abort_sentSync() throws Exception { + "debugRequest(xhr);\n" + "try {\n" + " xhr.abort();\n" - + "} catch(e) { alert('exception-abort'); }\n" + + "} catch(e) { log('exception-abort'); }\n" + "debugRequest(xhr);\n"; tester(test); @@ -618,9 +622,9 @@ public void abort_sentSync() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"1:ex status ex text ", - "1:ex status ex text ", - "2:ex status ex text ", - "0:ex status ex text ex xml"}) + "1:ex status ex text ", + "2:ex status ex text ", + "0:ex status ex text ex xml"}) // currently the started asynchronous request is not interrupted on abortion public void abort_sentAsync() throws Exception { final String test = "" @@ -643,21 +647,21 @@ public void abort_sentAsync() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"exception-created", - "exception-opened", - "Date XYZ GMT\\r\\n" - + "Content-Type: text/xml;charset=iso-8859-1\\r\\n" - + "Transfer-Encoding: chunked\\r\\nServer: Jetty(XXX)\\r\\n\\r\\n"}) + "exception-opened", + "Date XYZ GMT\\r\\n" + + "Content-Type: text/xml;charset=iso-8859-1\\r\\n" + + "Transfer-Encoding: chunked\\r\\nServer: Jetty(XXX)\\r\\n\\r\\n"}) public void getAllResponseHeaders() throws Exception { final String test = "" // create + "try {\n" - + " alert(xhr.getAllResponseHeaders());\n" - + "} catch(e) { alert('exception-created'); }\n" + + " log(xhr.getAllResponseHeaders());\n" + + "} catch(e) { log('exception-created'); }\n" // open + "xhr.open('GET', '" + URL_SECOND + "', false);\n" + "try {\n" - + " alert(xhr.getAllResponseHeaders());\n" - + "} catch(e) { alert('exception-opened'); }\n" + + " log(xhr.getAllResponseHeaders());\n" + + "} catch(e) { log('exception-opened'); }\n" // send + "xhr.send();\n" + "try {\n" @@ -666,8 +670,8 @@ public void getAllResponseHeaders() throws Exception { + " txt = txt.replace(/Date.*GMT/, 'Date XYZ GMT');\n" + " txt = txt.replace(/\\r/g, '\\\\r');\n" + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + "} catch(e) { alert('exception-sent'); }\n"; + + " log(txt);\n" + + "} catch(e) { log('exception-sent'); }\n"; tester(test, ""); } @@ -678,42 +682,42 @@ public void getAllResponseHeaders() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"exception-created", - "exception-opened", - "text/xml;charset=iso-8859-1", - "exception-getNull", - "exception-getEmpty", - "", - "text/xml;charset=iso-8859-1"}) + "exception-opened", + "text/xml;charset=iso-8859-1", + "exception-getNull", + "exception-getEmpty", + "", + "text/xml;charset=iso-8859-1"}) public void getResponseHeader() throws Exception { final String test = "" + "try {\n" - + " alert(xhr.getResponseHeader('Content-Type'));\n" - + "} catch(e) { alert('exception-created'); }\n" + + " log(xhr.getResponseHeader('Content-Type'));\n" + + "} catch(e) { log('exception-created'); }\n" + "xhr.open('GET', '" + URL_SECOND + "', false);\n" + "try {\n" - + " alert(xhr.getResponseHeader('Content-Type'));\n" - + "} catch(e) { alert('exception-opened'); }\n" + + " log(xhr.getResponseHeader('Content-Type'));\n" + + "} catch(e) { log('exception-opened'); }\n" + "xhr.send();\n" // normal + "try {\n" - + " alert(xhr.getResponseHeader('Content-Type'));\n" - + "} catch(e) { alert('exception-sent'); }\n" + + " log(xhr.getResponseHeader('Content-Type'));\n" + + "} catch(e) { log('exception-sent'); }\n" // null + "try {\n" - + " alert(xhr.getResponseHeader(null));\n" - + "} catch(e) { alert('exception-getNull'); }\n" + + " log(xhr.getResponseHeader(null));\n" + + "} catch(e) { log('exception-getNull'); }\n" // empty + "try {\n" - + " alert(xhr.getResponseHeader(''));\n" - + "} catch(e) { alert('exception-getEmpty'); }\n" + + " log(xhr.getResponseHeader(''));\n" + + "} catch(e) { log('exception-getEmpty'); }\n" // unknown + "try {\n" - + " alert(xhr.getResponseHeader('XXX'));\n" - + "} catch(e) { alert('exception-getUnknown'); }\n" + + " log(xhr.getResponseHeader('XXX'));\n" + + "} catch(e) { log('exception-getUnknown'); }\n" // case-sensitive + "try {\n" - + " alert(xhr.getResponseHeader('cOntEnt-typE'));\n" - + "} catch(e) { alert('exception-getCase'); }\n"; + + " log(xhr.getResponseHeader('cOntEnt-typE'));\n" + + "} catch(e) { log('exception-getCase'); }\n"; tester(test, ""); } @@ -724,13 +728,13 @@ public void getResponseHeader() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"4:200 GET localhost/bounce?null,-1 ", - "4:200 POST localhost/bounce?null,0 ", - "4:200 PUT localhost/bounce?null,0 ", - "4:200 ", - "exception-methodTRACE", "0:ex status ex text ex xml", - "exception-methodNull", "0:ex status ex text ex xml", - "exception-methodEmpty", "0:ex status ex text ex xml", - "1:ex status ex text ", "4: "}) + "4:200 POST localhost/bounce?null,0 ", + "4:200 PUT localhost/bounce?null,0 ", + "4:200 ", + "exception-methodTRACE", "0:ex status ex text ex xml", + "exception-methodNull", "0:ex status ex text ex xml", + "exception-methodEmpty", "0:ex status ex text ex xml", + "1:ex status ex text ", "4: "}) public void open_method() throws Exception { final String test = "" // GET @@ -738,39 +742,39 @@ public void open_method() throws Exception { + " xhr.open('GET', '/bounce', false);\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-methodGET'); }\n" + + "} catch(e) { log('exception-methodGET'); }\n" // POST + "try {\n" + " xhr.open('POST', '/bounce', false);\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-methodPOST'); }\n" + + "} catch(e) { log('exception-methodPOST'); }\n" // PUT + "try {\n" + " xhr.open('PUT', '/bounce', false);\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-methodPUT'); }\n" + + "} catch(e) { log('exception-methodPUT'); }\n" // HEAD + "try {\n" + " xhr.open('HEAD', '/bounce', false);\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-methodHEAD'); }\n" + + "} catch(e) { log('exception-methodHEAD'); }\n" // TRACE + "try {\n" + " xhr.open('TRACE', '/bounce', false);\n" - + "} catch(e) { alert('exception-methodTRACE'); }\n" + + "} catch(e) { log('exception-methodTRACE'); }\n" + "debugRequest(xhr);\n" // null + "try {\n" + " xhr.open(null, '/bounce', false);\n" - + "} catch(e) { alert('exception-methodNull'); }\n" + + "} catch(e) { log('exception-methodNull'); }\n" + "debugRequest(xhr);\n" // empty + "try {\n" + " xhr.open('', '/bounce', false);\n" - + "} catch(e) { alert('exception-methodEmpty'); }\n" + + "} catch(e) { log('exception-methodEmpty'); }\n" + "debugRequest(xhr);\n" // invalid + "try {\n" @@ -785,8 +789,8 @@ public void open_method() throws Exception { + " try {\n" + " msg += ' ' + xhr.responseXML.xml;\n" + " } catch(e) { msg += ' ex xml'; }\n" - + " alert(msg);\n" - + "} catch(e) { alert('exception-methodInvalid'); }\n"; + + " log(msg);\n" + + "} catch(e) { log('exception-methodInvalid'); }\n"; tester_bounce(test); } @@ -797,7 +801,7 @@ public void open_method() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"4:200 DELETE localhost/bounce?null,0 ", - "4:200 OPTIONS localhost/bounce?null,0 "}) + "4:200 OPTIONS localhost/bounce?null,0 "}) @NotYetImplemented(IE) // HtmlUnit does not send a body for DELETE and OPTIONS requests public void open_method2() throws Exception { @@ -807,13 +811,13 @@ public void open_method2() throws Exception { + " xhr.open('DELETE', '/bounce', false);\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-methodDELETE'); }\n" + + "} catch(e) { log('exception-methodDELETE'); }\n" // OPTIONS + "try {\n" + " xhr.open('OPTIONS', '/bounce', false);\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-methodOPTIONS'); }\n"; + + "} catch(e) { log('exception-methodOPTIONS'); }\n"; tester_bounce(test); } @@ -824,10 +828,10 @@ public void open_method2() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"4:200 GET localhost/bounce?null,-1 ", - "4:200 GET localhost/bounce?null,-1 ", - "exception-urlNull", "4:200 GET localhost/bounce?null,-1 ", - "exception-urlEmpty", "0:ex status ex text ex xml", - "exception-urlNotFound", "4: "}) + "4:200 GET localhost/bounce?null,-1 ", + "exception-urlNull", "4:200 GET localhost/bounce?null,-1 ", + "exception-urlEmpty", "0:ex status ex text ex xml", + "exception-urlNotFound", "4: "}) public void open_url() throws Exception { final String test = "" // relative @@ -835,28 +839,28 @@ public void open_url() throws Exception { + " xhr.open('GET', '/bounce', false);\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-urlRelative'); }\n" + + "} catch(e) { log('exception-urlRelative'); }\n" // absolute + "try {\n" + " xhr.open('GET', '" + URL_FIRST + "bounce', false);\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-urlAbsolute'); }\n" + + "} catch(e) { log('exception-urlAbsolute'); }\n" // null + "try {\n" + " xhr.open('GET', null, false);\n" - + "} catch(e) { alert('exception-urlNull'); }\n" + + "} catch(e) { log('exception-urlNull'); }\n" + "debugRequest(xhr);\n" // empty + "try {\n" + " xhr.open('GET', '', false);\n" - + "} catch(e) { alert('exception-urlEmpty'); }\n" + + "} catch(e) { log('exception-urlEmpty'); }\n" + "debugRequest(xhr);\n" // not found + "try {\n" + " xhr.open('GET', 'http://localhost:9876/doesntexist', false);\n" + " xhr.send();\n" - + "} catch(e) { alert('exception-urlNotFound'); }\n" + + "} catch(e) { log('exception-urlNotFound'); }\n" // debug without status + "var msg = xhr.readyState + ':';\n" + "try {\n" @@ -865,7 +869,7 @@ public void open_url() throws Exception { + "try {\n" + " msg += ' ' + xhr.responseXML.xml;\n" + "} catch(e) { msg += ' ex xml'; }\n" - + "alert(msg);\n"; + + "log(msg);\n"; tester_bounce(test); } @@ -882,16 +886,17 @@ public void open_authentication() throws Exception { + " xhr.open('GET', '/protected/token', false, 'foo', 'bar');\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-auth'); }\n"; + + "} catch(e) { log('exception-auth'); }\n"; final String html = "" + + LOG_TITLE_FUNCTION + " var xhr;\n" + " function test() {\n" + ACTIVEX_CHECK + " xhr = " + callCreateXMLHTTPRequest() + ";\n" + " try {\n" + test - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + " function debugRequest(r) {\r" + " var msg = r.readyState + ':';\n" @@ -904,14 +909,15 @@ public void open_authentication() throws Exception { + " try {\n" + " msg += ' ' + r.responseXML.xml;\n" + " } catch(e) { msg += ' ex xml'; }\n" - + " alert(msg);\n" + + " log(msg);\n" + " }\n" + CREATE_XMLHTTPREQUEST_FUNCTION; final Map> servlets = new HashMap<>(); servlets.put("/protected/token", BasicAuthenticationServlet.class); - loadPageWithAlerts2(createTestHTML(html), servlets); + loadPage2(createTestHTML(html), servlets); + verifyTitle2(getWebDriver(), getExpectedAlerts()); } /** @@ -920,9 +926,9 @@ public void open_authentication() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"4:200 GET localhost/bounce?null,-1 ", - "4:200 GET localhost/bounce?null,-1 ", - "4:200 GET localhost/bounce?null,-1 ", - "4:200 POST localhost/bounce?null,4 "}) + "4:200 GET localhost/bounce?null,-1 ", + "4:200 GET localhost/bounce?null,-1 ", + "4:200 POST localhost/bounce?null,4 "}) public void send_get() throws Exception { final String test = "" // no parameter @@ -930,25 +936,25 @@ public void send_get() throws Exception { + " xhr.open('GET', '/bounce', false);\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendNoParameter'); }\n" + + "} catch(e) { log('exception-sendNoParameter'); }\n" // null + "try {\n" + " xhr.open('GET', '/bounce', false);\n" + " xhr.send(null);\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendNull'); }\n" + + "} catch(e) { log('exception-sendNull'); }\n" // empty + "try {\n" + " xhr.open('GET', '/bounce', false);\n" + " xhr.send('');\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendEmpty'); }\n" + + "} catch(e) { log('exception-sendEmpty'); }\n" // normal + "try {\n" + " xhr.open('GET', '/bounce', false);\n" + " xhr.send('test');\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-send'); }\n"; + + "} catch(e) { log('exception-send'); }\n"; tester_bounce(test); } @@ -959,9 +965,9 @@ public void send_get() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"4:200 POST localhost/bounce?null,0 ", - "4:200 POST localhost/bounce?null,0 ", - "4:200 POST localhost/bounce?null,0 ", - "4:200 POST localhost/bounce?null,4 "}) + "4:200 POST localhost/bounce?null,0 ", + "4:200 POST localhost/bounce?null,0 ", + "4:200 POST localhost/bounce?null,4 "}) public void send_post() throws Exception { final String test = "" // no parameter @@ -969,25 +975,25 @@ public void send_post() throws Exception { + " xhr.open('POST', '/bounce', false);\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendNoParameter'); }\n" + + "} catch(e) { log('exception-sendNoParameter'); }\n" // null + "try {\n" + " xhr.open('POST', '/bounce', false);\n" + " xhr.send(null);\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendNull'); }\n" + + "} catch(e) { log('exception-sendNull'); }\n" // empty + "try {\n" + " xhr.open('POST', '/bounce', false);\n" + " xhr.send('');\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendEmpty'); }\n" + + "} catch(e) { log('exception-sendEmpty'); }\n" // normal + "try {\n" + " xhr.open('POST', '/bounce', false);\n" + " xhr.send('test');\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-send'); }\n"; + + "} catch(e) { log('exception-send'); }\n"; tester_bounce(test); } @@ -998,9 +1004,9 @@ public void send_post() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"4:200 PUT localhost/bounce?null,0 ", - "4:200 PUT localhost/bounce?null,0 ", - "4:200 PUT localhost/bounce?null,0 ", - "4:200 PUT localhost/bounce?null,4 "}) + "4:200 PUT localhost/bounce?null,0 ", + "4:200 PUT localhost/bounce?null,0 ", + "4:200 PUT localhost/bounce?null,4 "}) public void send_put() throws Exception { final String test = "" // no parameter @@ -1008,25 +1014,25 @@ public void send_put() throws Exception { + " xhr.open('PUT', '/bounce', false);\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendNoParameter'); }\n" + + "} catch(e) { log('exception-sendNoParameter'); }\n" // null + "try {\n" + " xhr.open('PUT', '/bounce', false);\n" + " xhr.send(null);\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendNull'); }\n" + + "} catch(e) { log('exception-sendNull'); }\n" // empty + "try {\n" + " xhr.open('PUT', '/bounce', false);\n" + " xhr.send('');\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendEmpty'); }\n" + + "} catch(e) { log('exception-sendEmpty'); }\n" // normal + "try {\n" + " xhr.open('PUT', '/bounce', false);\n" + " xhr.send('test');\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-send'); }\n"; + + "} catch(e) { log('exception-send'); }\n"; tester_bounce(test); } @@ -1036,10 +1042,10 @@ public void send_put() throws Exception { */ @Test @Alerts(DEFAULT = "no ActiveX", - IE = {"4:200 ", - "4:200 ", - "4:200 ", - "4:200 "}) + IE = {"4:200 ", + "4:200 ", + "4:200 ", + "4:200 "}) public void send_head() throws Exception { final String test = "" // no parameter @@ -1047,25 +1053,25 @@ public void send_head() throws Exception { + " xhr.open('HEAD', '/bounce', false);\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendNoParameter'); }\n" + + "} catch(e) { log('exception-sendNoParameter'); }\n" // null + "try {\n" + " xhr.open('HEAD', '/bounce', false);\n" + " xhr.send(null);\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendNull'); }\n" + + "} catch(e) { log('exception-sendNull'); }\n" // empty + "try {\n" + " xhr.open('HEAD', '/bounce', false);\n" + " xhr.send('');\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendEmpty'); }\n" + + "} catch(e) { log('exception-sendEmpty'); }\n" // normal + "try {\n" + " xhr.open('HEAD', '/bounce', false);\n" + " xhr.send('test');\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-send'); }\n"; + + "} catch(e) { log('exception-send'); }\n"; tester_bounce(test); } @@ -1076,9 +1082,9 @@ public void send_head() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"4:200 DELETE localhost/bounce?null,0 ", - "4:200 DELETE localhost/bounce?null,0 ", - "4:200 DELETE localhost/bounce?null,0 ", - "4:200 DELETE localhost/bounce?null,4 "}) + "4:200 DELETE localhost/bounce?null,0 ", + "4:200 DELETE localhost/bounce?null,0 ", + "4:200 DELETE localhost/bounce?null,4 "}) @NotYetImplemented(IE) // HtmlUnit does not send a body for DELETE and OPTIONS requests public void send_delete() throws Exception { @@ -1088,25 +1094,25 @@ public void send_delete() throws Exception { + " xhr.open('DELETE', '/bounce', false);\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendNoParameter'); }\n" + + "} catch(e) { log('exception-sendNoParameter'); }\n" // null + "try {\n" + " xhr.open('DELETE', '/bounce', false);\n" + " xhr.send(null);\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendNull'); }\n" + + "} catch(e) { log('exception-sendNull'); }\n" // empty + "try {\n" + " xhr.open('DELETE', '/bounce', false);\n" + " xhr.send('');\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendEmpty'); }\n" + + "} catch(e) { log('exception-sendEmpty'); }\n" // normal + "try {\n" + " xhr.open('DELETE', '/bounce', false);\n" + " xhr.send('test');\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-send'); }\n"; + + "} catch(e) { log('exception-send'); }\n"; tester_bounce(test); } @@ -1117,9 +1123,9 @@ public void send_delete() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"4:200 OPTIONS localhost/bounce?null,0 ", - "4:200 OPTIONS localhost/bounce?null,0 ", - "4:200 OPTIONS localhost/bounce?null,0 ", - "4:200 OPTIONS localhost/bounce?null,4 "}) + "4:200 OPTIONS localhost/bounce?null,0 ", + "4:200 OPTIONS localhost/bounce?null,0 ", + "4:200 OPTIONS localhost/bounce?null,4 "}) @NotYetImplemented(IE) // HtmlUnit does not send a body for DELETE and OPTIONS requests public void send_options() throws Exception { @@ -1129,25 +1135,25 @@ public void send_options() throws Exception { + " xhr.open('OPTIONS', '/bounce', false);\n" + " xhr.send();\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendNoParameter'); }\n" + + "} catch(e) { log('exception-sendNoParameter'); }\n" // null + "try {\n" + " xhr.open('OPTIONS', '/bounce', false);\n" + " xhr.send(null);\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendNull'); }\n" + + "} catch(e) { log('exception-sendNull'); }\n" // empty + "try {\n" + " xhr.open('OPTIONS', '/bounce', false);\n" + " xhr.send('');\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-sendEmpty'); }\n" + + "} catch(e) { log('exception-sendEmpty'); }\n" // normal + "try {\n" + " xhr.open('OPTIONS', '/bounce', false);\n" + " xhr.send('test');\n" + " debugRequest(xhr);\n" - + "} catch(e) { alert('exception-send'); }\n"; + + "} catch(e) { log('exception-send'); }\n"; tester_bounce(test); } @@ -1158,14 +1164,14 @@ public void send_options() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"exception-resend", - "4:200 GET localhost/bounce?null,-1 "}) + "4:200 GET localhost/bounce?null,-1 "}) public void send_resend() throws Exception { final String test = "" + "xhr.open('GET', '/bounce', false);\n" + "xhr.send();\n" + "try {\n" + " xhr.send();\n" - + "} catch(e) { alert('exception-resend'); }\n" + + "} catch(e) { log('exception-resend'); }\n" + "debugRequest(xhr);\n"; tester_bounce(test); @@ -1177,10 +1183,10 @@ public void send_resend() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"*/*", - "gzip, deflate", - "null", - "localhost:12345", - "§§URL§§"}) + "gzip, deflate", + "null", + "localhost:12345", + "§§URL§§"}) public void send_headersDefaultEmpty() throws Exception { expandExpectedAlertsVariables(URL_FIRST); final String[] expectedHeaders = getExpectedAlerts(); @@ -1192,7 +1198,7 @@ public void send_headersDefaultEmpty() throws Exception { + "try {\n" + " xhr.open('GET', '" + URL_SECOND + "', false);\n" + " xhr.send();\n" - + "} catch(e) { alert('exception-send'); }\n"; + + "} catch(e) { log('exception-send'); }\n"; tester(test, ""); @@ -1213,10 +1219,10 @@ public void send_headersDefaultEmpty() throws Exception { @Test @Alerts(DEFAULT = "no ActiveX", IE = {"*/*", - "gzip, deflate", - "4", - "localhost:12345", - "§§URL§§"}) + "gzip, deflate", + "4", + "localhost:12345", + "§§URL§§"}) public void send_headersDefaultBody() throws Exception { expandExpectedAlertsVariables(URL_FIRST); final String[] expectedHeaders = getExpectedAlerts(); @@ -1228,7 +1234,7 @@ public void send_headersDefaultBody() throws Exception { + "try {\n" + " xhr.open('GET', '" + URL_SECOND + "', false);\n" + " xhr.send('1234');\n" - + "} catch(e) { alert('exception-send'); }\n"; + + "} catch(e) { log('exception-send'); }\n"; tester(test, ""); @@ -1248,23 +1254,23 @@ public void send_headersDefaultBody() throws Exception { */ @Test @Alerts(DEFAULT = {"null", "text/html,application/xhtml+xml,application/xml;" - + "q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", - "null", "null", "no ActiveX"}, + + "q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", + "null", "null", "no ActiveX"}, EDGE = {"null", "text/html,application/xhtml+xml,application/xml;" - + "q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", - "null", "null", "no ActiveX"}, + + "q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", + "null", "null", "no ActiveX"}, FF = {"null", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", - "null", "null", "no ActiveX"}, + "null", "null", "no ActiveX"}, FF78 = {"null", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", - "null", "null", "no ActiveX"}, + "null", "null", "no ActiveX"}, IE = {"bar", - "application/javascript", - "null", - "null", - "exception-unopened", - "exception-setNameNull", - "exception-setNameEmpty", - "exception-setValueNull"}) + "application/javascript", + "null", + "null", + "exception-unopened", + "exception-setNameNull", + "exception-setNameEmpty", + "exception-setValueNull"}) public void setRequestHeader() throws Exception { final String[] expectedAlerts = getExpectedAlerts(); setExpectedAlerts( @@ -1276,36 +1282,36 @@ public void setRequestHeader() throws Exception { // before open + "try {\n" + " xhr.setRequestHeader('Foo', 'bar');\n" - + "} catch(e) { alert('exception-unopened'); }\n" + + "} catch(e) { log('exception-unopened'); }\n" + "xhr.open('GET', '" + URL_SECOND + "', false);\n" // normal + "try {\n" + " xhr.setRequestHeader('foo', 'bar');\n" - + "} catch(e) { alert('exception-set'); }\n" + + "} catch(e) { log('exception-set'); }\n" // overwrite + "try {\n" + " xhr.setRequestHeader('Accept', 'application/javascript');\n" - + "} catch(e) { alert('exception-setOverwrite'); }\n" + + "} catch(e) { log('exception-setOverwrite'); }\n" // null name + "try {\n" + " xhr.setRequestHeader(null, 'NameNull');\n" - + "} catch(e) { alert('exception-setNameNull'); }\n" + + "} catch(e) { log('exception-setNameNull'); }\n" // empty name + "try {\n" + " xhr.setRequestHeader('', 'NameEmpty');\n" - + "} catch(e) { alert('exception-setNameEmpty'); }\n" + + "} catch(e) { log('exception-setNameEmpty'); }\n" // null value + "try {\n" + " xhr.setRequestHeader('ValueNull', null);\n" - + "} catch(e) { alert('exception-setValueNull'); }\n" + + "} catch(e) { log('exception-setValueNull'); }\n" // empty value + "try {\n" + " xhr.setRequestHeader('ValueEmpty', '');\n" - + "} catch(e) { alert('exception-setValueEmpty'); }\n" + + "} catch(e) { log('exception-setValueEmpty'); }\n" // blank value + "try {\n" + " xhr.setRequestHeader('ValueEmpty', ' ');\n" - + "} catch(e) { alert('exception-setValueBlank'); }\n" + + "} catch(e) { log('exception-setValueBlank'); }\n" + "xhr.send();\n"; tester(test, ""); @@ -1336,7 +1342,7 @@ private void setRequestHeader_contentLength(final String content, final String c + "xhr.open('GET', '" + URL_SECOND + "', false);\n" + "try {\n" + " xhr.setRequestHeader('Content-Length', '20');\n" - + "} catch(e) { alert('exception-set'); }\n"; + + "} catch(e) { log('exception-set'); }\n"; if (content == null) { test += "xhr.send();\n"; } @@ -1352,7 +1358,7 @@ private void setRequestHeader_contentLength(final String content, final String c } private void property(final String property) throws Exception { - tester("alert(xhr." + property + ");\n"); + tester("log(xhr." + property + ");\n"); } private void property_lifecycleSync(final String property) throws Exception { @@ -1362,40 +1368,40 @@ private void property_lifecycleSync(final String property) throws Exception { + " var txt = '' + xhr." + property + ";\n" + " txt = txt.replace(/\\r/g, '\\\\r');\n" + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + "} catch(e) { alert('exception-created'); }\n" + + " log(txt);\n" + + "} catch(e) { log('exception-created'); }\n" // open + "xhr.open(\"GET\", \"" + URL_SECOND + "\", false);\n" + "try {\n" + " txt = '' + xhr." + property + ";\n" + " txt = txt.replace(/\\r/g, '\\\\r');\n" + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + "} catch(e) { alert('exception-opened'); }\n" + + " log(txt);\n" + + "} catch(e) { log('exception-opened'); }\n" // send + "xhr.send();\n" + "try {\n" + " txt = '' + xhr." + property + ";\n" + " txt = txt.replace(/\\r/g, '\\\\r');\n" + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + "} catch(e) { alert('exception-sent'); }\n" + + " log(txt);\n" + + "} catch(e) { log('exception-sent'); }\n" // re-open + "xhr.open(\"GET\", \"" + URL_SECOND + "\", false);\n" + "try {\n" + " txt = '' + xhr." + property + ";\n" + " txt = txt.replace(/\\r/g, '\\\\r');\n" + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + "} catch(e) { alert('exception-reopened'); }\n" + + " log(txt);\n" + + "} catch(e) { log('exception-reopened'); }\n" // send + "xhr.send();\n" + "try {\n" + " txt = '' + xhr." + property + ";\n" + " txt = txt.replace(/\\r/g, '\\\\r');\n" + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + "} catch(e) { alert('exception-sent'); }\n"; + + " log(txt);\n" + + "} catch(e) { log('exception-sent'); }\n"; tester(test); } @@ -1405,10 +1411,8 @@ private void property_lifecycleAsync(final String property) throws Exception { + "xhr.onreadystatechange = function() {\n" + " try {\n" + " var txt = xhr.readyState + ':' + xhr." + property + ";\n" - + " txt = txt.replace(/\\r/g, '\\\\r');\n" - + " txt = txt.replace(/\\n/g, '\\\\n');\n" - + " alert(txt);\n" - + " } catch(e) { alert(xhr.readyState + ':exception-async'); }\n" + + " log(txt);\n" + + " } catch(e) { log(xhr.readyState + ':exception-async'); }\n" + "};\n" // open + "xhr.open(\"GET\", \"" + URL_SECOND + "\", false);\n" @@ -1428,16 +1432,17 @@ private void tester(final String test) throws Exception { private void tester(final String test, final String xml) throws Exception { final String html = "" + + LOG_TITLE_NORMALIZE_FUNCTION + " var xhr;\n" + " function test() {\n" + ACTIVEX_CHECK + " xhr = " + callCreateXMLHTTPRequest() + ";\n" + " try {\n" + test - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + " function onStateChange() {\n" - + " alert('orsc:' + xhr.readyState);\n" + + " log('orsc:' + xhr.readyState);\n" + " }\n" + " function debugRequest(r) {\r" + " var msg = r.readyState + ':';\n" @@ -1453,26 +1458,28 @@ private void tester(final String test, final String xml) throws Exception { + " txt = txt.replace(/\\n/g, '\\\\n');\n" + " msg += ' ' + txt;\n" + " } catch(e) { msg += ' ex xml'; }\n" - + " alert(msg);\n" + + " log(msg);\n" + " }\n" + CREATE_XMLHTTPREQUEST_FUNCTION; getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html), URL_FIRST, 10 * DEFAULT_WAIT_TIME); + loadPage2(createTestHTML(html), URL_FIRST); + verifyTitle2(DEFAULT_WAIT_TIME, getWebDriver(), getExpectedAlerts()); } private void tester_bounce(final String test) throws Exception { final String html = "" + + LOG_TITLE_FUNCTION + " var xhr;\n" + " function test() {\n" + ACTIVEX_CHECK + " xhr = " + callCreateXMLHTTPRequest() + ";\n" + " try {\n" + test - + " } catch(e) { alert('exception'); }\n" + + " } catch(e) { log('exception'); }\n" + " }\n" + " function onStateChange() {\n" - + " alert('orsc:' + xhr.readyState);\n" + + " log('orsc:' + xhr.readyState);\n" + " }\n" + " function debugRequest(r) {\r" + " var msg = r.readyState + ':';\n" @@ -1485,14 +1492,15 @@ private void tester_bounce(final String test) throws Exception { + " try {\n" + " msg += ' ' + r.responseXML.xml;\n" + " } catch(e) { msg += ' ex xml'; }\n" - + " alert(msg);\n" + + " log(msg);\n" + " }\n" + CREATE_XMLHTTPREQUEST_FUNCTION; final Map> servlets = new HashMap<>(); servlets.put("/bounce", BounceServlet.class); - loadPageWithAlerts2(createTestHTML(html), URL_FIRST, DEFAULT_WAIT_TIME * 2, servlets); + loadPage2(createTestHTML(html), URL_FIRST, servlets); + verifyTitle2(getWebDriver(), getExpectedAlerts()); } /** diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLSerializerTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLSerializerTest.java index 31ea68839..67e3159d5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLSerializerTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/activex/javascript/msxml/XMLSerializerTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -67,7 +67,7 @@ public void test() throws Exception { + " " + ""; - final WebDriver driver = loadPageWithAlerts2(constructPageContent(serializationText)); + final WebDriver driver = loadPageVerifyTitle2(constructPageContent(serializationText)); final WebElement textArea = driver.findElement(By.id("myTextArea")); assertEquals(expectedString, textArea.getAttribute("value")); } @@ -82,7 +82,7 @@ public void comment() throws Exception { final String expectedString = getExpectedAlerts().length != 0 ? "" : "\\r\\n"; final String serializationText = ""; - final WebDriver driver = loadPageWithAlerts2(constructPageContent(serializationText)); + final WebDriver driver = loadPageVerifyTitle2(constructPageContent(serializationText)); final WebElement textArea = driver.findElement(By.id("myTextArea")); assertEquals(expectedString, textArea.getAttribute("value")); } @@ -96,7 +96,7 @@ public void comment() throws Exception { public void xmlEntities() throws Exception { final String expectedString = getExpectedAlerts().length != 0 ? "" : "<>&\\r\\n"; final String serializationText = "<>&"; - final WebDriver driver = loadPageWithAlerts2(constructPageContent(serializationText)); + final WebDriver driver = loadPageVerifyTitle2(constructPageContent(serializationText)); final WebElement textArea = driver.findElement(By.id("myTextArea")); assertEquals(expectedString, textArea.getAttribute("value")); } @@ -126,7 +126,7 @@ public void nameSpaces() throws Exception { + " \\r\\n" + ""; - final WebDriver driver = loadPageWithAlerts2(constructPageContent(serializationText)); + final WebDriver driver = loadPageVerifyTitle2(constructPageContent(serializationText)); final WebElement textArea = driver.findElement(By.id("myTextArea")); assertEquals(expectedString, textArea.getAttribute("value")); } @@ -148,7 +148,7 @@ public void attributes() throws Exception { + "" + ""; - final WebDriver driver = loadPageWithAlerts2(constructPageContent(serializationText)); + final WebDriver driver = loadPageVerifyTitle2(constructPageContent(serializationText)); final WebElement textArea = driver.findElement(By.id("myTextArea")); assertEquals(expectedString, textArea.getAttribute("value")); } @@ -178,7 +178,7 @@ public void htmlAttributes() throws Exception { + "" + ""; - final WebDriver driver = loadPageWithAlerts2(constructPageContent(serializationText)); + final WebDriver driver = loadPageVerifyTitle2(constructPageContent(serializationText)); final WebElement textArea = driver.findElement(By.id("myTextArea")); assertEquals(expectedString, textArea.getAttribute("value")); } @@ -193,7 +193,8 @@ private static String constructPageContent(final String serializationText) { final StringBuilder builder = new StringBuilder(); builder.append( - "foo\n" @@ -86,7 +87,7 @@ public void methods() throws Exception { getMockWebConnection().setResponse(URL_SECOND, xsl, MimeType.TEXT_XML); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -99,6 +100,7 @@ public void transform() throws Exception { final URL urlThird = new URL(URL_FIRST, "third/"); final String html = "" + + LOG_TITLE_FUNCTION + " function test() {\n" + ACTIVEX_CHECK + " var xmlDoc = " + callLoadXMLDOMDocumentFromURL("'" + URL_SECOND + "'") + ";\n" @@ -114,7 +116,7 @@ public void transform() throws Exception { + " xslProc.input = xmlDoc;\n" + " xslProc.transform();\n" + " var s = xslProc.output.replace(/\\r?\\n/g, '');\n" - + " alert(s.length);\n" + + " log(s.length);\n" + " xslProc.input = xmlDoc.documentElement;\n" + " xslProc.transform();\n" + " }\n" @@ -153,6 +155,6 @@ public void transform() throws Exception { getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); getMockWebConnection().setResponse(urlThird, xsl, MimeType.TEXT_XML); - loadPageWithAlerts2(createTestHTML(html)); + loadPageVerifyTitle2(createTestHTML(html)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/annotations/StandardsMode.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/annotations/StandardsMode.java index 9a43ba56d..1262111b3 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/annotations/StandardsMode.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/annotations/StandardsMode.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/annotations/ToRunWithRealBrowsers.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/annotations/ToRunWithRealBrowsers.java index eb3df9004..2284e8fd7 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/annotations/ToRunWithRealBrowsers.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/annotations/ToRunWithRealBrowsers.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/archunit/ArchitectureTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/archunit/ArchitectureTest.java index 7561bf2a0..70f9de3ff 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/archunit/ArchitectureTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/archunit/ArchitectureTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,9 +15,15 @@ package com.gargoylesoftware.htmlunit.archunit; import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.classes; +import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.methods; import org.junit.runner.RunWith; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClasses; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxFunction; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxSetter; import com.tngtech.archunit.junit.AnalyzeClasses; import com.tngtech.archunit.junit.ArchTest; import com.tngtech.archunit.junit.ArchUnitRunner; @@ -39,4 +45,42 @@ public class ArchitectureTest { public static final ArchRule utilsPackageRule = classes() .that().haveNameMatching(".*Util.?") .should().resideInAPackage("com.gargoylesoftware.htmlunit.util"); + + /** + * JsxClasses are always in the javascript package. + */ + @ArchTest + public static final ArchRule jsxClassAnnotationPackages = classes() + .that().areAnnotatedWith(JsxClass.class) + .should().resideInAPackage("..javascript.."); + + /** + * JsxGetter/Setter/Functions are always in the javascript package. + */ + @ArchTest + public static final ArchRule jsxGetterAnnotationPackages = methods() + .that().areAnnotatedWith(JsxGetter.class) + .or().areAnnotatedWith(JsxSetter.class) + .or().areAnnotatedWith(JsxFunction.class) + .should().beDeclaredInClassesThat().resideInAPackage("..javascript.."); + + /** + * JsxGetter/Setter/Functions only valid in classes annotated as JsxClass. + */ + @ArchTest + public static final ArchRule jsxGetterAnnotationJsxClass = methods() + .that().areAnnotatedWith(JsxGetter.class) + .or().areAnnotatedWith(JsxSetter.class) + .or().areAnnotatedWith(JsxFunction.class) + .should().beDeclaredInClassesThat().areAnnotatedWith(JsxClass.class) + .orShould().beDeclaredInClassesThat().areAnnotatedWith(JsxClasses.class); + + /** + * Do not overwrite toString for javascript, use jsToString and define the + * functionName in the @JsxFunction annotation. + */ + @ArchTest + public static final ArchRule jsToString = methods() + .that().areAnnotatedWith(JsxFunction.class) + .should().haveNameNotMatching("toString"); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/attachment/AttachmentTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/attachment/AttachmentTest.java index 0c2d25e52..36a8220aa 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/attachment/AttachmentTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/attachment/AttachmentTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -219,7 +219,7 @@ public void jsChangeLocationAfterReceptionOfAttachment() throws Exception { * @throws Exception if an error occurs */ @Test - public void handleResponseFromHanlder() throws Exception { + public void handleResponseFromHandler() throws Exception { final String content1 = "\n" + "
\n" + "\n" diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/doc/FaqTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/doc/FaqTest.java index 5de86201c..a16cc7541 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/doc/FaqTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/doc/FaqTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,20 +14,21 @@ */ package com.gargoylesoftware.htmlunit.doc; -import java.net.URL; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.nio.charset.StandardCharsets; + +import javax.imageio.ImageIO; import org.junit.Test; -import org.junit.runner.RunWith; -import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserVersion; -import com.gargoylesoftware.htmlunit.SimpleWebTestCase; -import com.gargoylesoftware.htmlunit.StringWebResponse; import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.WebWindow; import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.gargoylesoftware.htmlunit.html.XHtmlPage; -import com.gargoylesoftware.htmlunit.html.parser.HTMLParser; /** * Tests for the sample code from the documentation to make sure @@ -35,8 +36,7 @@ * * @author Ronald Brill */ -@RunWith(BrowserRunner.class) -public class FaqTest extends SimpleWebTestCase { +public class FaqTest { /** * @throws Exception if an error occurs @@ -57,22 +57,14 @@ public void xhtmlPageFromString() throws Exception { + " " + " "; try (WebClient webClient = new WebClient(browserVersion)) { - final HTMLParser htmlParser = webClient.getPageCreator().getHtmlParser(); - final WebWindow webWindow = webClient.getCurrentWindow(); - - final StringWebResponse webResponse = - new StringWebResponse(htmlCode, new URL("http://htmlunit.sourceforge.net/test.html")); - final XHtmlPage page = new XHtmlPage(webResponse, webWindow); - webWindow.setEnclosedPage(page); + final XHtmlPage page = webClient.loadXHtmlCodeIntoCurrentWindow(htmlCode); - htmlParser.parse(webResponse, page, true); - // work with the html page + // work with the xhtml page assertEquals("Title" + ls + "content...", page.asText()); } } - /** * @throws Exception if an error occurs */ @@ -90,18 +82,23 @@ public void htmlPageFromString() throws Exception { + " " + " "; try (WebClient webClient = new WebClient(browserVersion)) { - final HTMLParser htmlParser = webClient.getPageCreator().getHtmlParser(); - final WebWindow webWindow = webClient.getCurrentWindow(); - - final StringWebResponse webResponse = - new StringWebResponse(htmlCode, new URL("http://htmlunit.sourceforge.net/test.html")); - final HtmlPage page = new HtmlPage(webResponse, webWindow); - webWindow.setEnclosedPage(page); + final HtmlPage page = webClient.loadXHtmlCodeIntoCurrentWindow(htmlCode); - htmlParser.parse(webResponse, page, true); // work with the html page assertEquals("Title" + ls + "content...", page.asText()); } } + + /** + * @throws Exception if an error occurs + */ + @Test + public void checkSvgSupport() throws Exception { + final String svg = "" + + "" + + ""; + final BufferedImage img = ImageIO.read(new ByteArrayInputStream(svg.getBytes(StandardCharsets.US_ASCII))); + assertNotNull(img); + } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/ElementChildNodesTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/ElementChildNodesTest.java index f45f5b5ef..715890c4f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/ElementChildNodesTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/ElementChildNodesTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -34,13 +34,14 @@ public class ElementChildNodesTest extends WebDriverTestCase { private static String test(final String tagName) { - return "test_getChildNodes\n" + return "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -774,9 +775,7 @@ public void cryptoKey() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "function", - FF = "object", - FF78 = "object", + @Alerts(DEFAULT = "object", IE = "undefined") public void css() throws Exception { test("CSS"); @@ -2029,9 +2028,7 @@ public void htmlCommentElement() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "undefined", - CHROME = "function", - EDGE = "function") + @Alerts("undefined") public void htmlContentElement() throws Exception { test("HTMLContentElement"); } @@ -2521,7 +2518,6 @@ public void htmlMenuElement() throws Exception { */ @Test @Alerts(DEFAULT = "undefined", - FF = "function", FF78 = "function") public void htmlMenuItemElement() throws Exception { test("HTMLMenuItemElement"); @@ -2763,14 +2759,12 @@ public void htmlSelectElement() throws Exception { } /** - * Test {@link com.gargoylesoftware.htmlunit.javascript.host.html.HTMLShadowElement}. + * Test HTMLShadowElement. * * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "undefined", - CHROME = "function", - EDGE = "function") + @Alerts("undefined") public void htmlShadowElement() throws Exception { test("HTMLShadowElement"); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/ElementClosesElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/ElementClosesElementTest.java index c8fa74175..f25532a33 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/ElementClosesElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/ElementClosesElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,12 +14,6 @@ */ package com.gargoylesoftware.htmlunit.general.huge; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.CHROME; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.EDGE; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF78; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE; - import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -34,9 +28,9 @@ import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner; import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner.Default; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; -import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.WebDriverTestCase; -import com.gargoylesoftware.htmlunit.html.HtmlPageTest; +import com.gargoylesoftware.htmlunit.html.DefaultElementFactory; /** * Tests for an element to close another element, which is defined in @@ -58,7 +52,7 @@ public class ElementClosesElementTest extends WebDriverTestCase { @Parameters public static Collection data() throws Exception { final List list = new ArrayList<>(); - final List strings = new ArrayList<>(HtmlPageTest.HTML_TAGS_); + final List strings = new ArrayList<>(DefaultElementFactory.SUPPORTED_TAGS_); for (final String parent : strings) { for (final String child : strings) { list.add(new Object[] {parent, child}); @@ -250,7 +244,7 @@ public void _a_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _a_isindex() throws Exception { test("a", "isindex"); } @@ -434,7 +428,7 @@ public void _abbr_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _abbr_isindex() throws Exception { test("abbr", "isindex"); } @@ -618,7 +612,7 @@ public void _acronym_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _acronym_isindex() throws Exception { test("acronym", "isindex"); } @@ -802,7 +796,7 @@ public void _address_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _address_isindex() throws Exception { test("address", "isindex"); } @@ -986,7 +980,7 @@ public void _applet_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _applet_isindex() throws Exception { test("applet", "isindex"); } @@ -2448,7 +2442,7 @@ public void _article_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _article_isindex() throws Exception { test("article", "isindex"); } @@ -2632,7 +2626,7 @@ public void _aside_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _aside_isindex() throws Exception { test("aside", "isindex"); } @@ -2816,7 +2810,7 @@ public void _audio_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _audio_isindex() throws Exception { test("audio", "isindex"); } @@ -3000,7 +2994,7 @@ public void _b_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _b_isindex() throws Exception { test("b", "isindex"); } @@ -5740,7 +5734,7 @@ public void _bdi_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _bdi_isindex() throws Exception { test("bdi", "isindex"); } @@ -5924,7 +5918,7 @@ public void _bdo_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _bdo_isindex() throws Exception { test("bdo", "isindex"); } @@ -7386,7 +7380,7 @@ public void _big_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _big_isindex() throws Exception { test("big", "isindex"); } @@ -7570,7 +7564,7 @@ public void _blink_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _blink_isindex() throws Exception { test("blink", "isindex"); } @@ -7754,7 +7748,7 @@ public void _blockquote_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _blockquote_isindex() throws Exception { test("blockquote", "isindex"); } @@ -8370,7 +8364,7 @@ public void _body_ins() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "3") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _body_isindex() throws Exception { test("body", "isindex"); } @@ -10390,7 +10384,7 @@ public void _button_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _button_isindex() throws Exception { test("button", "isindex"); } @@ -10574,7 +10568,7 @@ public void _canvas_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _canvas_isindex() throws Exception { test("canvas", "isindex"); } @@ -12036,7 +12030,7 @@ public void _center_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _center_isindex() throws Exception { test("center", "isindex"); } @@ -12220,7 +12214,7 @@ public void _cite_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _cite_isindex() throws Exception { test("cite", "isindex"); } @@ -12404,7 +12398,7 @@ public void _code_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _code_isindex() throws Exception { test("code", "isindex"); } @@ -16706,7 +16700,7 @@ public void _content_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _content_isindex() throws Exception { test("content", "isindex"); } @@ -16890,7 +16884,7 @@ public void _data_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _data_isindex() throws Exception { test("data", "isindex"); } @@ -17074,7 +17068,7 @@ public void _datalist_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _datalist_isindex() throws Exception { test("datalist", "isindex"); } @@ -17276,7 +17270,7 @@ public void _dd_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _dd_isindex() throws Exception { test("dd", "isindex"); } @@ -17460,7 +17454,7 @@ public void _del_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _del_isindex() throws Exception { test("del", "isindex"); } @@ -17644,7 +17638,7 @@ public void _details_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _details_isindex() throws Exception { test("details", "isindex"); } @@ -17828,7 +17822,7 @@ public void _dfn_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _dfn_isindex() throws Exception { test("dfn", "isindex"); } @@ -18012,7 +18006,7 @@ public void _dialog_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _dialog_isindex() throws Exception { test("dialog", "isindex"); } @@ -18196,7 +18190,7 @@ public void _dir_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _dir_isindex() throws Exception { test("dir", "isindex"); } @@ -18380,7 +18374,7 @@ public void _div_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _div_isindex() throws Exception { test("div", "isindex"); } @@ -18564,7 +18558,7 @@ public void _dl_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _dl_isindex() throws Exception { test("dl", "isindex"); } @@ -18766,7 +18760,7 @@ public void _dt_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _dt_isindex() throws Exception { test("dt", "isindex"); } @@ -18950,7 +18944,7 @@ public void _em_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _em_isindex() throws Exception { test("em", "isindex"); } @@ -20412,7 +20406,7 @@ public void _fieldset_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _fieldset_isindex() throws Exception { test("fieldset", "isindex"); } @@ -20596,7 +20590,7 @@ public void _figcaption_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _figcaption_isindex() throws Exception { test("figcaption", "isindex"); } @@ -20780,7 +20774,7 @@ public void _figure_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _figure_isindex() throws Exception { test("figure", "isindex"); } @@ -20964,7 +20958,7 @@ public void _font_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _font_isindex() throws Exception { test("font", "isindex"); } @@ -21148,7 +21142,7 @@ public void _footer_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _footer_isindex() throws Exception { test("footer", "isindex"); } @@ -24115,7 +24109,7 @@ public void _h1_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _h1_isindex() throws Exception { test("h1", "isindex"); } @@ -24353,7 +24347,7 @@ public void _h2_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _h2_isindex() throws Exception { test("h2", "isindex"); } @@ -24591,7 +24585,7 @@ public void _h3_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _h3_isindex() throws Exception { test("h3", "isindex"); } @@ -24829,7 +24823,7 @@ public void _h4_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _h4_isindex() throws Exception { test("h4", "isindex"); } @@ -25067,7 +25061,7 @@ public void _h5_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _h5_isindex() throws Exception { test("h5", "isindex"); } @@ -25305,7 +25299,7 @@ public void _h6_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _h6_isindex() throws Exception { test("h6", "isindex"); } @@ -26767,7 +26761,7 @@ public void _header_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _header_isindex() throws Exception { test("header", "isindex"); } @@ -28127,7 +28121,11 @@ public void _hr_xmp() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_a() throws Exception { test("html", "a"); } @@ -28137,7 +28135,11 @@ public void _html_a() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_abbr() throws Exception { test("html", "abbr"); } @@ -28147,7 +28149,11 @@ public void _html_abbr() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_acronym() throws Exception { test("html", "acronym"); } @@ -28157,7 +28163,11 @@ public void _html_acronym() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_address() throws Exception { test("html", "address"); } @@ -28167,7 +28177,11 @@ public void _html_address() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_applet() throws Exception { test("html", "applet"); } @@ -28177,7 +28191,11 @@ public void _html_applet() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_area() throws Exception { test("html", "area"); } @@ -28187,7 +28205,11 @@ public void _html_area() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_article() throws Exception { test("html", "article"); } @@ -28197,7 +28219,11 @@ public void _html_article() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_aside() throws Exception { test("html", "aside"); } @@ -28207,7 +28233,11 @@ public void _html_aside() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_audio() throws Exception { test("html", "audio"); } @@ -28217,7 +28247,11 @@ public void _html_audio() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_b() throws Exception { test("html", "b"); } @@ -28227,7 +28261,11 @@ public void _html_b() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_base() throws Exception { test("html", "base"); } @@ -28237,7 +28275,11 @@ public void _html_base() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_basefont() throws Exception { test("html", "basefont"); } @@ -28247,7 +28289,11 @@ public void _html_basefont() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_bdi() throws Exception { test("html", "bdi"); } @@ -28257,7 +28303,11 @@ public void _html_bdi() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_bdo() throws Exception { test("html", "bdo"); } @@ -28267,7 +28317,11 @@ public void _html_bdo() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_bgsound() throws Exception { test("html", "bgsound"); } @@ -28277,7 +28331,11 @@ public void _html_bgsound() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_big() throws Exception { test("html", "big"); } @@ -28287,7 +28345,11 @@ public void _html_big() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_blink() throws Exception { test("html", "blink"); } @@ -28297,7 +28359,11 @@ public void _html_blink() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_blockquote() throws Exception { test("html", "blockquote"); } @@ -28307,7 +28373,11 @@ public void _html_blockquote() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_body() throws Exception { test("html", "body"); } @@ -28317,7 +28387,11 @@ public void _html_body() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_br() throws Exception { test("html", "br"); } @@ -28327,7 +28401,11 @@ public void _html_br() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_button() throws Exception { test("html", "button"); } @@ -28337,7 +28415,11 @@ public void _html_button() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_canvas() throws Exception { test("html", "canvas"); } @@ -28347,7 +28429,11 @@ public void _html_canvas() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_caption() throws Exception { test("html", "caption"); } @@ -28357,7 +28443,11 @@ public void _html_caption() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_center() throws Exception { test("html", "center"); } @@ -28367,7 +28457,11 @@ public void _html_center() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_cite() throws Exception { test("html", "cite"); } @@ -28377,7 +28471,11 @@ public void _html_cite() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_code() throws Exception { test("html", "code"); } @@ -28387,7 +28485,11 @@ public void _html_code() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_col() throws Exception { test("html", "col"); } @@ -28397,7 +28499,11 @@ public void _html_col() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_colgroup() throws Exception { test("html", "colgroup"); } @@ -28407,7 +28513,11 @@ public void _html_colgroup() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_command() throws Exception { test("html", "command"); } @@ -28417,7 +28527,11 @@ public void _html_command() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_content() throws Exception { test("html", "content"); } @@ -28427,7 +28541,11 @@ public void _html_content() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_data() throws Exception { test("html", "data"); } @@ -28437,7 +28555,11 @@ public void _html_data() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_datalist() throws Exception { test("html", "datalist"); } @@ -28447,7 +28569,11 @@ public void _html_datalist() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_dd() throws Exception { test("html", "dd"); } @@ -28457,7 +28583,11 @@ public void _html_dd() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_del() throws Exception { test("html", "del"); } @@ -28467,7 +28597,11 @@ public void _html_del() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_details() throws Exception { test("html", "details"); } @@ -28477,7 +28611,11 @@ public void _html_details() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_dfn() throws Exception { test("html", "dfn"); } @@ -28487,7 +28625,11 @@ public void _html_dfn() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_dialog() throws Exception { test("html", "dialog"); } @@ -28497,7 +28639,11 @@ public void _html_dialog() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_dir() throws Exception { test("html", "dir"); } @@ -28507,7 +28653,11 @@ public void _html_dir() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_div() throws Exception { test("html", "div"); } @@ -28517,7 +28667,11 @@ public void _html_div() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_dl() throws Exception { test("html", "dl"); } @@ -28527,7 +28681,11 @@ public void _html_dl() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_dt() throws Exception { test("html", "dt"); } @@ -28537,7 +28695,11 @@ public void _html_dt() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_em() throws Exception { test("html", "em"); } @@ -28547,7 +28709,11 @@ public void _html_em() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_embed() throws Exception { test("html", "embed"); } @@ -28557,7 +28723,11 @@ public void _html_embed() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_fieldset() throws Exception { test("html", "fieldset"); } @@ -28567,7 +28737,11 @@ public void _html_fieldset() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_figcaption() throws Exception { test("html", "figcaption"); } @@ -28577,7 +28751,11 @@ public void _html_figcaption() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_figure() throws Exception { test("html", "figure"); } @@ -28587,7 +28765,11 @@ public void _html_figure() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_font() throws Exception { test("html", "font"); } @@ -28597,7 +28779,11 @@ public void _html_font() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_footer() throws Exception { test("html", "footer"); } @@ -28607,7 +28793,11 @@ public void _html_footer() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_form() throws Exception { test("html", "form"); } @@ -28617,7 +28807,11 @@ public void _html_form() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_frame() throws Exception { test("html", "frame"); } @@ -28627,7 +28821,11 @@ public void _html_frame() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_frameset() throws Exception { test("html", "frameset"); } @@ -28637,7 +28835,11 @@ public void _html_frameset() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_h1() throws Exception { test("html", "h1"); } @@ -28647,7 +28849,11 @@ public void _html_h1() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_h2() throws Exception { test("html", "h2"); } @@ -28657,7 +28863,11 @@ public void _html_h2() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_h3() throws Exception { test("html", "h3"); } @@ -28667,7 +28877,11 @@ public void _html_h3() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_h4() throws Exception { test("html", "h4"); } @@ -28677,7 +28891,11 @@ public void _html_h4() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_h5() throws Exception { test("html", "h5"); } @@ -28687,7 +28905,11 @@ public void _html_h5() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_h6() throws Exception { test("html", "h6"); } @@ -28697,7 +28919,11 @@ public void _html_h6() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_head() throws Exception { test("html", "head"); } @@ -28707,7 +28933,11 @@ public void _html_head() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_header() throws Exception { test("html", "header"); } @@ -28717,7 +28947,11 @@ public void _html_header() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_hr() throws Exception { test("html", "hr"); } @@ -28727,7 +28961,11 @@ public void _html_hr() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_html() throws Exception { test("html", "html"); } @@ -28737,7 +28975,11 @@ public void _html_html() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_i() throws Exception { test("html", "i"); } @@ -28747,7 +28989,11 @@ public void _html_i() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_iframe() throws Exception { test("html", "iframe"); } @@ -28757,7 +29003,11 @@ public void _html_iframe() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_image() throws Exception { test("html", "image"); } @@ -28767,7 +29017,11 @@ public void _html_image() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_img() throws Exception { test("html", "img"); } @@ -28777,7 +29031,11 @@ public void _html_img() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_input() throws Exception { test("html", "input"); } @@ -28787,7 +29045,11 @@ public void _html_input() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_ins() throws Exception { test("html", "ins"); } @@ -28797,7 +29059,11 @@ public void _html_ins() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_isindex() throws Exception { test("html", "isindex"); } @@ -28807,7 +29073,11 @@ public void _html_isindex() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_kbd() throws Exception { test("html", "kbd"); } @@ -28817,7 +29087,11 @@ public void _html_kbd() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_keygen() throws Exception { test("html", "keygen"); } @@ -28827,7 +29101,11 @@ public void _html_keygen() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_label() throws Exception { test("html", "label"); } @@ -28837,7 +29115,11 @@ public void _html_label() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_layer() throws Exception { test("html", "layer"); } @@ -28847,7 +29129,11 @@ public void _html_layer() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_legend() throws Exception { test("html", "legend"); } @@ -28857,7 +29143,11 @@ public void _html_legend() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_li() throws Exception { test("html", "li"); } @@ -28867,7 +29157,11 @@ public void _html_li() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_link() throws Exception { test("html", "link"); } @@ -28877,7 +29171,11 @@ public void _html_link() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_listing() throws Exception { test("html", "listing"); } @@ -28887,7 +29185,11 @@ public void _html_listing() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_main() throws Exception { test("html", "main"); } @@ -28897,7 +29199,11 @@ public void _html_main() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_map() throws Exception { test("html", "map"); } @@ -28907,7 +29213,11 @@ public void _html_map() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_mark() throws Exception { test("html", "mark"); } @@ -28917,7 +29227,11 @@ public void _html_mark() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_marquee() throws Exception { test("html", "marquee"); } @@ -28927,7 +29241,11 @@ public void _html_marquee() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_menu() throws Exception { test("html", "menu"); } @@ -28937,7 +29255,11 @@ public void _html_menu() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_menuitem() throws Exception { test("html", "menuitem"); } @@ -28947,7 +29269,11 @@ public void _html_menuitem() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_meta() throws Exception { test("html", "meta"); } @@ -28957,7 +29283,11 @@ public void _html_meta() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_meter() throws Exception { test("html", "meter"); } @@ -28967,7 +29297,11 @@ public void _html_meter() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_multicol() throws Exception { test("html", "multicol"); } @@ -28977,7 +29311,11 @@ public void _html_multicol() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_nav() throws Exception { test("html", "nav"); } @@ -28987,7 +29325,11 @@ public void _html_nav() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_nextid() throws Exception { test("html", "nextid"); } @@ -28997,7 +29339,11 @@ public void _html_nextid() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_nobr() throws Exception { test("html", "nobr"); } @@ -29007,7 +29353,11 @@ public void _html_nobr() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_noembed() throws Exception { test("html", "noembed"); } @@ -29017,7 +29367,11 @@ public void _html_noembed() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_noframes() throws Exception { test("html", "noframes"); } @@ -29027,7 +29381,11 @@ public void _html_noframes() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_nolayer() throws Exception { test("html", "nolayer"); } @@ -29037,7 +29395,11 @@ public void _html_nolayer() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_noscript() throws Exception { test("html", "noscript"); } @@ -29047,7 +29409,11 @@ public void _html_noscript() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_object() throws Exception { test("html", "object"); } @@ -29057,7 +29423,11 @@ public void _html_object() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_ol() throws Exception { test("html", "ol"); } @@ -29067,7 +29437,11 @@ public void _html_ol() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_optgroup() throws Exception { test("html", "optgroup"); } @@ -29077,7 +29451,11 @@ public void _html_optgroup() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_option() throws Exception { test("html", "option"); } @@ -29087,7 +29465,11 @@ public void _html_option() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_output() throws Exception { test("html", "output"); } @@ -29097,7 +29479,11 @@ public void _html_output() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_p() throws Exception { test("html", "p"); } @@ -29107,7 +29493,11 @@ public void _html_p() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_param() throws Exception { test("html", "param"); } @@ -29117,7 +29507,11 @@ public void _html_param() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_picture() throws Exception { test("html", "picture"); } @@ -29127,7 +29521,11 @@ public void _html_picture() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_plaintext() throws Exception { test("html", "plaintext"); } @@ -29137,7 +29535,11 @@ public void _html_plaintext() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_pre() throws Exception { test("html", "pre"); } @@ -29147,7 +29549,11 @@ public void _html_pre() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_progress() throws Exception { test("html", "progress"); } @@ -29157,7 +29563,11 @@ public void _html_progress() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_q() throws Exception { test("html", "q"); } @@ -29167,7 +29577,11 @@ public void _html_q() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_rp() throws Exception { test("html", "rp"); } @@ -29177,7 +29591,11 @@ public void _html_rp() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_rt() throws Exception { test("html", "rt"); } @@ -29187,7 +29605,11 @@ public void _html_rt() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_ruby() throws Exception { test("html", "ruby"); } @@ -29197,7 +29619,11 @@ public void _html_ruby() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_s() throws Exception { test("html", "s"); } @@ -29207,7 +29633,11 @@ public void _html_s() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_samp() throws Exception { test("html", "samp"); } @@ -29217,7 +29647,11 @@ public void _html_samp() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_script() throws Exception { test("html", "script"); } @@ -29227,7 +29661,11 @@ public void _html_script() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_section() throws Exception { test("html", "section"); } @@ -29237,7 +29675,11 @@ public void _html_section() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_select() throws Exception { test("html", "select"); } @@ -29247,7 +29689,11 @@ public void _html_select() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_slot() throws Exception { test("html", "slot"); } @@ -29257,7 +29703,11 @@ public void _html_slot() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_small() throws Exception { test("html", "small"); } @@ -29267,7 +29717,11 @@ public void _html_small() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_source() throws Exception { test("html", "source"); } @@ -29277,7 +29731,11 @@ public void _html_source() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_span() throws Exception { test("html", "span"); } @@ -29287,7 +29745,11 @@ public void _html_span() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_strike() throws Exception { test("html", "strike"); } @@ -29297,7 +29759,11 @@ public void _html_strike() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_strong() throws Exception { test("html", "strong"); } @@ -29307,7 +29773,11 @@ public void _html_strong() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_style() throws Exception { test("html", "style"); } @@ -29317,7 +29787,11 @@ public void _html_style() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_sub() throws Exception { test("html", "sub"); } @@ -29327,7 +29801,11 @@ public void _html_sub() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_summary() throws Exception { test("html", "summary"); } @@ -29337,7 +29815,11 @@ public void _html_summary() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_sup() throws Exception { test("html", "sup"); } @@ -29347,7 +29829,11 @@ public void _html_sup() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_svg() throws Exception { test("html", "svg"); } @@ -29357,7 +29843,11 @@ public void _html_svg() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_table() throws Exception { test("html", "table"); } @@ -29367,7 +29857,11 @@ public void _html_table() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_tbody() throws Exception { test("html", "tbody"); } @@ -29377,7 +29871,11 @@ public void _html_tbody() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_td() throws Exception { test("html", "td"); } @@ -29387,7 +29885,11 @@ public void _html_td() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_template() throws Exception { test("html", "template"); } @@ -29397,7 +29899,11 @@ public void _html_template() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_textarea() throws Exception { test("html", "textarea"); } @@ -29407,7 +29913,11 @@ public void _html_textarea() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_tfoot() throws Exception { test("html", "tfoot"); } @@ -29417,7 +29927,11 @@ public void _html_tfoot() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_th() throws Exception { test("html", "th"); } @@ -29427,7 +29941,11 @@ public void _html_th() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_thead() throws Exception { test("html", "thead"); } @@ -29437,7 +29955,11 @@ public void _html_thead() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_time() throws Exception { test("html", "time"); } @@ -29447,7 +29969,11 @@ public void _html_time() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_title() throws Exception { test("html", "title"); } @@ -29457,7 +29983,11 @@ public void _html_title() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_tr() throws Exception { test("html", "tr"); } @@ -29467,7 +29997,11 @@ public void _html_tr() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_track() throws Exception { test("html", "track"); } @@ -29477,7 +30011,11 @@ public void _html_track() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_tt() throws Exception { test("html", "tt"); } @@ -29487,7 +30025,11 @@ public void _html_tt() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_u() throws Exception { test("html", "u"); } @@ -29497,7 +30039,11 @@ public void _html_u() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_ul() throws Exception { test("html", "ul"); } @@ -29507,7 +30053,11 @@ public void _html_ul() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_var() throws Exception { test("html", "var"); } @@ -29517,7 +30067,11 @@ public void _html_var() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_video() throws Exception { test("html", "video"); } @@ -29527,7 +30081,11 @@ public void _html_video() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_wbr() throws Exception { test("html", "wbr"); } @@ -29537,7 +30095,11 @@ public void _html_wbr() throws Exception { */ @Test @Alerts("3") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _html_xmp() throws Exception { test("html", "xmp"); } @@ -29649,7 +30211,7 @@ public void _i_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _i_isindex() throws Exception { test("i", "isindex"); } @@ -33667,7 +34229,7 @@ public void _ins_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _ins_isindex() throws Exception { test("ins", "isindex"); } @@ -33750,7 +34312,7 @@ public void _ins_wbr() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_a() throws Exception { test("isindex", "a"); } @@ -33761,7 +34323,7 @@ public void _isindex_a() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_abbr() throws Exception { test("isindex", "abbr"); } @@ -33772,7 +34334,7 @@ public void _isindex_abbr() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_acronym() throws Exception { test("isindex", "acronym"); } @@ -33783,7 +34345,7 @@ public void _isindex_acronym() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_address() throws Exception { test("isindex", "address"); } @@ -33794,7 +34356,7 @@ public void _isindex_address() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_applet() throws Exception { test("isindex", "applet"); } @@ -33805,7 +34367,7 @@ public void _isindex_applet() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_area() throws Exception { test("isindex", "area"); } @@ -33816,7 +34378,7 @@ public void _isindex_area() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_article() throws Exception { test("isindex", "article"); } @@ -33827,7 +34389,7 @@ public void _isindex_article() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_aside() throws Exception { test("isindex", "aside"); } @@ -33838,7 +34400,7 @@ public void _isindex_aside() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_audio() throws Exception { test("isindex", "audio"); } @@ -33849,7 +34411,7 @@ public void _isindex_audio() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_b() throws Exception { test("isindex", "b"); } @@ -33860,7 +34422,7 @@ public void _isindex_b() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_base() throws Exception { test("isindex", "base"); } @@ -33871,7 +34433,7 @@ public void _isindex_base() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_basefont() throws Exception { test("isindex", "basefont"); } @@ -33882,7 +34444,7 @@ public void _isindex_basefont() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_bdi() throws Exception { test("isindex", "bdi"); } @@ -33893,7 +34455,7 @@ public void _isindex_bdi() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_bdo() throws Exception { test("isindex", "bdo"); } @@ -33904,7 +34466,7 @@ public void _isindex_bdo() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_bgsound() throws Exception { test("isindex", "bgsound"); } @@ -33915,7 +34477,7 @@ public void _isindex_bgsound() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_big() throws Exception { test("isindex", "big"); } @@ -33926,7 +34488,7 @@ public void _isindex_big() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_blink() throws Exception { test("isindex", "blink"); } @@ -33937,7 +34499,7 @@ public void _isindex_blink() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_blockquote() throws Exception { test("isindex", "blockquote"); } @@ -33948,7 +34510,7 @@ public void _isindex_blockquote() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_body() throws Exception { test("isindex", "body"); } @@ -33959,7 +34521,7 @@ public void _isindex_body() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_br() throws Exception { test("isindex", "br"); } @@ -33970,7 +34532,7 @@ public void _isindex_br() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_button() throws Exception { test("isindex", "button"); } @@ -33981,7 +34543,7 @@ public void _isindex_button() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_canvas() throws Exception { test("isindex", "canvas"); } @@ -33992,7 +34554,7 @@ public void _isindex_canvas() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_caption() throws Exception { test("isindex", "caption"); } @@ -34003,7 +34565,7 @@ public void _isindex_caption() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_center() throws Exception { test("isindex", "center"); } @@ -34014,7 +34576,7 @@ public void _isindex_center() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_cite() throws Exception { test("isindex", "cite"); } @@ -34025,7 +34587,7 @@ public void _isindex_cite() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_code() throws Exception { test("isindex", "code"); } @@ -34036,7 +34598,7 @@ public void _isindex_code() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_col() throws Exception { test("isindex", "col"); } @@ -34047,7 +34609,7 @@ public void _isindex_col() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_colgroup() throws Exception { test("isindex", "colgroup"); } @@ -34060,7 +34622,7 @@ public void _isindex_colgroup() throws Exception { FF = "1", FF78 = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_command() throws Exception { test("isindex", "command"); } @@ -34071,7 +34633,7 @@ public void _isindex_command() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_content() throws Exception { test("isindex", "content"); } @@ -34082,7 +34644,7 @@ public void _isindex_content() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_data() throws Exception { test("isindex", "data"); } @@ -34093,7 +34655,7 @@ public void _isindex_data() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_datalist() throws Exception { test("isindex", "datalist"); } @@ -34104,7 +34666,7 @@ public void _isindex_datalist() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_dd() throws Exception { test("isindex", "dd"); } @@ -34115,7 +34677,7 @@ public void _isindex_dd() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_del() throws Exception { test("isindex", "del"); } @@ -34126,7 +34688,7 @@ public void _isindex_del() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_details() throws Exception { test("isindex", "details"); } @@ -34137,7 +34699,7 @@ public void _isindex_details() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_dfn() throws Exception { test("isindex", "dfn"); } @@ -34148,7 +34710,7 @@ public void _isindex_dfn() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_dialog() throws Exception { test("isindex", "dialog"); } @@ -34159,7 +34721,7 @@ public void _isindex_dialog() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_dir() throws Exception { test("isindex", "dir"); } @@ -34170,7 +34732,7 @@ public void _isindex_dir() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_div() throws Exception { test("isindex", "div"); } @@ -34181,7 +34743,7 @@ public void _isindex_div() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_dl() throws Exception { test("isindex", "dl"); } @@ -34192,7 +34754,7 @@ public void _isindex_dl() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_dt() throws Exception { test("isindex", "dt"); } @@ -34203,7 +34765,7 @@ public void _isindex_dt() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_em() throws Exception { test("isindex", "em"); } @@ -34214,7 +34776,7 @@ public void _isindex_em() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_embed() throws Exception { test("isindex", "embed"); } @@ -34225,7 +34787,7 @@ public void _isindex_embed() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_fieldset() throws Exception { test("isindex", "fieldset"); } @@ -34236,7 +34798,7 @@ public void _isindex_fieldset() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_figcaption() throws Exception { test("isindex", "figcaption"); } @@ -34247,7 +34809,7 @@ public void _isindex_figcaption() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_figure() throws Exception { test("isindex", "figure"); } @@ -34258,7 +34820,7 @@ public void _isindex_figure() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_font() throws Exception { test("isindex", "font"); } @@ -34269,7 +34831,7 @@ public void _isindex_font() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_footer() throws Exception { test("isindex", "footer"); } @@ -34280,7 +34842,7 @@ public void _isindex_footer() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_form() throws Exception { test("isindex", "form"); } @@ -34291,7 +34853,7 @@ public void _isindex_form() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_frame() throws Exception { test("isindex", "frame"); } @@ -34302,7 +34864,7 @@ public void _isindex_frame() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_frameset() throws Exception { test("isindex", "frameset"); } @@ -34313,7 +34875,7 @@ public void _isindex_frameset() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_h1() throws Exception { test("isindex", "h1"); } @@ -34324,7 +34886,7 @@ public void _isindex_h1() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_h2() throws Exception { test("isindex", "h2"); } @@ -34335,7 +34897,7 @@ public void _isindex_h2() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_h3() throws Exception { test("isindex", "h3"); } @@ -34346,7 +34908,7 @@ public void _isindex_h3() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_h4() throws Exception { test("isindex", "h4"); } @@ -34357,7 +34919,7 @@ public void _isindex_h4() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_h5() throws Exception { test("isindex", "h5"); } @@ -34368,7 +34930,7 @@ public void _isindex_h5() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_h6() throws Exception { test("isindex", "h6"); } @@ -34379,7 +34941,7 @@ public void _isindex_h6() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_head() throws Exception { test("isindex", "head"); } @@ -34390,7 +34952,7 @@ public void _isindex_head() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_header() throws Exception { test("isindex", "header"); } @@ -34401,7 +34963,7 @@ public void _isindex_header() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_hr() throws Exception { test("isindex", "hr"); } @@ -34412,7 +34974,7 @@ public void _isindex_hr() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_html() throws Exception { test("isindex", "html"); } @@ -34423,7 +34985,7 @@ public void _isindex_html() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_i() throws Exception { test("isindex", "i"); } @@ -34434,7 +34996,7 @@ public void _isindex_i() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_iframe() throws Exception { test("isindex", "iframe"); } @@ -34445,7 +35007,7 @@ public void _isindex_iframe() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_image() throws Exception { test("isindex", "image"); } @@ -34456,7 +35018,7 @@ public void _isindex_image() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_img() throws Exception { test("isindex", "img"); } @@ -34467,7 +35029,7 @@ public void _isindex_img() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_input() throws Exception { test("isindex", "input"); } @@ -34478,7 +35040,7 @@ public void _isindex_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_ins() throws Exception { test("isindex", "ins"); } @@ -34499,7 +35061,7 @@ public void _isindex_isindex() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_kbd() throws Exception { test("isindex", "kbd"); } @@ -34510,7 +35072,7 @@ public void _isindex_kbd() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_keygen() throws Exception { test("isindex", "keygen"); } @@ -34521,7 +35083,7 @@ public void _isindex_keygen() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_label() throws Exception { test("isindex", "label"); } @@ -34532,7 +35094,7 @@ public void _isindex_label() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_layer() throws Exception { test("isindex", "layer"); } @@ -34543,7 +35105,7 @@ public void _isindex_layer() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_legend() throws Exception { test("isindex", "legend"); } @@ -34554,7 +35116,7 @@ public void _isindex_legend() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_li() throws Exception { test("isindex", "li"); } @@ -34565,7 +35127,7 @@ public void _isindex_li() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_link() throws Exception { test("isindex", "link"); } @@ -34576,7 +35138,7 @@ public void _isindex_link() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_listing() throws Exception { test("isindex", "listing"); } @@ -34587,7 +35149,7 @@ public void _isindex_listing() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_main() throws Exception { test("isindex", "main"); } @@ -34598,7 +35160,7 @@ public void _isindex_main() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_map() throws Exception { test("isindex", "map"); } @@ -34609,7 +35171,7 @@ public void _isindex_map() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_mark() throws Exception { test("isindex", "mark"); } @@ -34620,7 +35182,7 @@ public void _isindex_mark() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_marquee() throws Exception { test("isindex", "marquee"); } @@ -34631,7 +35193,7 @@ public void _isindex_marquee() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_menu() throws Exception { test("isindex", "menu"); } @@ -34642,7 +35204,7 @@ public void _isindex_menu() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_menuitem() throws Exception { test("isindex", "menuitem"); } @@ -34653,7 +35215,7 @@ public void _isindex_menuitem() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_meta() throws Exception { test("isindex", "meta"); } @@ -34664,7 +35226,7 @@ public void _isindex_meta() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_meter() throws Exception { test("isindex", "meter"); } @@ -34675,7 +35237,7 @@ public void _isindex_meter() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_multicol() throws Exception { test("isindex", "multicol"); } @@ -34686,7 +35248,7 @@ public void _isindex_multicol() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_nav() throws Exception { test("isindex", "nav"); } @@ -34697,7 +35259,7 @@ public void _isindex_nav() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_nextid() throws Exception { test("isindex", "nextid"); } @@ -34708,7 +35270,7 @@ public void _isindex_nextid() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_nobr() throws Exception { test("isindex", "nobr"); } @@ -34719,7 +35281,7 @@ public void _isindex_nobr() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_noembed() throws Exception { test("isindex", "noembed"); } @@ -34730,7 +35292,7 @@ public void _isindex_noembed() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_noframes() throws Exception { test("isindex", "noframes"); } @@ -34741,7 +35303,7 @@ public void _isindex_noframes() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_nolayer() throws Exception { test("isindex", "nolayer"); } @@ -34752,7 +35314,7 @@ public void _isindex_nolayer() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_noscript() throws Exception { test("isindex", "noscript"); } @@ -34763,7 +35325,7 @@ public void _isindex_noscript() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_object() throws Exception { test("isindex", "object"); } @@ -34774,7 +35336,7 @@ public void _isindex_object() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_ol() throws Exception { test("isindex", "ol"); } @@ -34785,7 +35347,7 @@ public void _isindex_ol() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_optgroup() throws Exception { test("isindex", "optgroup"); } @@ -34796,7 +35358,7 @@ public void _isindex_optgroup() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_option() throws Exception { test("isindex", "option"); } @@ -34807,7 +35369,7 @@ public void _isindex_option() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_output() throws Exception { test("isindex", "output"); } @@ -34818,7 +35380,7 @@ public void _isindex_output() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_p() throws Exception { test("isindex", "p"); } @@ -34829,7 +35391,7 @@ public void _isindex_p() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_param() throws Exception { test("isindex", "param"); } @@ -34840,7 +35402,7 @@ public void _isindex_param() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_picture() throws Exception { test("isindex", "picture"); } @@ -34851,7 +35413,7 @@ public void _isindex_picture() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_plaintext() throws Exception { test("isindex", "plaintext"); } @@ -34862,7 +35424,7 @@ public void _isindex_plaintext() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_pre() throws Exception { test("isindex", "pre"); } @@ -34873,7 +35435,7 @@ public void _isindex_pre() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_progress() throws Exception { test("isindex", "progress"); } @@ -34884,7 +35446,7 @@ public void _isindex_progress() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_q() throws Exception { test("isindex", "q"); } @@ -34895,7 +35457,7 @@ public void _isindex_q() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_rp() throws Exception { test("isindex", "rp"); } @@ -34906,7 +35468,7 @@ public void _isindex_rp() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_rt() throws Exception { test("isindex", "rt"); } @@ -34917,7 +35479,7 @@ public void _isindex_rt() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_ruby() throws Exception { test("isindex", "ruby"); } @@ -34928,7 +35490,7 @@ public void _isindex_ruby() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_s() throws Exception { test("isindex", "s"); } @@ -34939,7 +35501,7 @@ public void _isindex_s() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_samp() throws Exception { test("isindex", "samp"); } @@ -34950,7 +35512,7 @@ public void _isindex_samp() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_script() throws Exception { test("isindex", "script"); } @@ -34961,7 +35523,7 @@ public void _isindex_script() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_section() throws Exception { test("isindex", "section"); } @@ -34972,7 +35534,7 @@ public void _isindex_section() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_select() throws Exception { test("isindex", "select"); } @@ -34983,7 +35545,7 @@ public void _isindex_select() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_slot() throws Exception { test("isindex", "slot"); } @@ -34994,7 +35556,7 @@ public void _isindex_slot() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_small() throws Exception { test("isindex", "small"); } @@ -35005,7 +35567,7 @@ public void _isindex_small() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_source() throws Exception { test("isindex", "source"); } @@ -35016,7 +35578,7 @@ public void _isindex_source() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_span() throws Exception { test("isindex", "span"); } @@ -35027,7 +35589,7 @@ public void _isindex_span() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_strike() throws Exception { test("isindex", "strike"); } @@ -35038,7 +35600,7 @@ public void _isindex_strike() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_strong() throws Exception { test("isindex", "strong"); } @@ -35049,7 +35611,7 @@ public void _isindex_strong() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_style() throws Exception { test("isindex", "style"); } @@ -35060,7 +35622,7 @@ public void _isindex_style() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_sub() throws Exception { test("isindex", "sub"); } @@ -35071,7 +35633,7 @@ public void _isindex_sub() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_summary() throws Exception { test("isindex", "summary"); } @@ -35082,7 +35644,7 @@ public void _isindex_summary() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_sup() throws Exception { test("isindex", "sup"); } @@ -35093,7 +35655,7 @@ public void _isindex_sup() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_svg() throws Exception { test("isindex", "svg"); } @@ -35104,7 +35666,7 @@ public void _isindex_svg() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_table() throws Exception { test("isindex", "table"); } @@ -35115,7 +35677,7 @@ public void _isindex_table() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_tbody() throws Exception { test("isindex", "tbody"); } @@ -35126,7 +35688,7 @@ public void _isindex_tbody() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_td() throws Exception { test("isindex", "td"); } @@ -35137,7 +35699,7 @@ public void _isindex_td() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_template() throws Exception { test("isindex", "template"); } @@ -35148,7 +35710,7 @@ public void _isindex_template() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_textarea() throws Exception { test("isindex", "textarea"); } @@ -35159,7 +35721,7 @@ public void _isindex_textarea() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_tfoot() throws Exception { test("isindex", "tfoot"); } @@ -35170,7 +35732,7 @@ public void _isindex_tfoot() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_th() throws Exception { test("isindex", "th"); } @@ -35181,7 +35743,7 @@ public void _isindex_th() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_thead() throws Exception { test("isindex", "thead"); } @@ -35192,7 +35754,7 @@ public void _isindex_thead() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_time() throws Exception { test("isindex", "time"); } @@ -35203,7 +35765,7 @@ public void _isindex_time() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_title() throws Exception { test("isindex", "title"); } @@ -35214,7 +35776,7 @@ public void _isindex_title() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_tr() throws Exception { test("isindex", "tr"); } @@ -35225,7 +35787,7 @@ public void _isindex_tr() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_track() throws Exception { test("isindex", "track"); } @@ -35236,7 +35798,7 @@ public void _isindex_track() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_tt() throws Exception { test("isindex", "tt"); } @@ -35247,7 +35809,7 @@ public void _isindex_tt() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_u() throws Exception { test("isindex", "u"); } @@ -35258,7 +35820,7 @@ public void _isindex_u() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_ul() throws Exception { test("isindex", "ul"); } @@ -35269,7 +35831,7 @@ public void _isindex_ul() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_var() throws Exception { test("isindex", "var"); } @@ -35280,7 +35842,7 @@ public void _isindex_var() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_video() throws Exception { test("isindex", "video"); } @@ -35291,7 +35853,7 @@ public void _isindex_video() throws Exception { @Test @Alerts(DEFAULT = "2", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "2") public void _isindex_wbr() throws Exception { test("isindex", "wbr"); } @@ -35302,7 +35864,7 @@ public void _isindex_wbr() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _isindex_xmp() throws Exception { test("isindex", "xmp"); } @@ -35414,7 +35976,7 @@ public void _kbd_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _kbd_isindex() throws Exception { test("kbd", "isindex"); } @@ -36876,7 +37438,7 @@ public void _label_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _label_isindex() throws Exception { test("label", "isindex"); } @@ -37060,7 +37622,7 @@ public void _layer_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _layer_isindex() throws Exception { test("layer", "isindex"); } @@ -37244,7 +37806,7 @@ public void _legend_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _legend_isindex() throws Exception { test("legend", "isindex"); } @@ -37428,7 +37990,7 @@ public void _li_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _li_isindex() throws Exception { test("li", "isindex"); } @@ -38899,7 +39461,7 @@ public void _listing_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _listing_isindex() throws Exception { test("listing", "isindex"); } @@ -39083,7 +39645,7 @@ public void _main_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _main_isindex() throws Exception { test("main", "isindex"); } @@ -39267,7 +39829,7 @@ public void _map_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _map_isindex() throws Exception { test("map", "isindex"); } @@ -39451,7 +40013,7 @@ public void _mark_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _mark_isindex() throws Exception { test("mark", "isindex"); } @@ -39635,7 +40197,7 @@ public void _marquee_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _marquee_isindex() throws Exception { test("marquee", "isindex"); } @@ -39819,7 +40381,7 @@ public void _menu_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _menu_isindex() throws Exception { test("menu", "isindex"); } @@ -40003,7 +40565,7 @@ public void _menuitem_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _menuitem_isindex() throws Exception { test("menuitem", "isindex"); } @@ -41465,7 +42027,7 @@ public void _meter_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _meter_isindex() throws Exception { test("meter", "isindex"); } @@ -41649,7 +42211,7 @@ public void _multicol_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _multicol_isindex() throws Exception { test("multicol", "isindex"); } @@ -41833,7 +42395,7 @@ public void _nav_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _nav_isindex() throws Exception { test("nav", "isindex"); } @@ -42017,7 +42579,7 @@ public void _nextid_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _nextid_isindex() throws Exception { test("nextid", "isindex"); } @@ -42201,7 +42763,7 @@ public void _nobr_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _nobr_isindex() throws Exception { test("nobr", "isindex"); } @@ -42292,7 +42854,11 @@ public void _nobr_wbr() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_area() throws Exception { test("noembed", "area"); } @@ -42302,7 +42868,11 @@ public void _noembed_area() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_base() throws Exception { test("noembed", "base"); } @@ -42312,7 +42882,11 @@ public void _noembed_base() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_basefont() throws Exception { test("noembed", "basefont"); } @@ -42322,7 +42896,11 @@ public void _noembed_basefont() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_bgsound() throws Exception { test("noembed", "bgsound"); } @@ -42332,7 +42910,11 @@ public void _noembed_bgsound() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_br() throws Exception { test("noembed", "br"); } @@ -42342,7 +42924,9 @@ public void _noembed_br() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented({CHROME, EDGE, IE}) + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + IE = "2") public void _noembed_command() throws Exception { test("noembed", "command"); } @@ -42352,7 +42936,11 @@ public void _noembed_command() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_embed() throws Exception { test("noembed", "embed"); } @@ -42362,7 +42950,11 @@ public void _noembed_embed() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_hr() throws Exception { test("noembed", "hr"); } @@ -42372,7 +42964,11 @@ public void _noembed_hr() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_image() throws Exception { test("noembed", "image"); } @@ -42382,7 +42978,11 @@ public void _noembed_image() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_img() throws Exception { test("noembed", "img"); } @@ -42392,7 +42992,11 @@ public void _noembed_img() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_input() throws Exception { test("noembed", "input"); } @@ -42402,7 +43006,11 @@ public void _noembed_input() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_keygen() throws Exception { test("noembed", "keygen"); } @@ -42412,7 +43020,11 @@ public void _noembed_keygen() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_link() throws Exception { test("noembed", "link"); } @@ -42422,7 +43034,11 @@ public void _noembed_link() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_meta() throws Exception { test("noembed", "meta"); } @@ -42432,7 +43048,11 @@ public void _noembed_meta() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_param() throws Exception { test("noembed", "param"); } @@ -42442,7 +43062,11 @@ public void _noembed_param() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_script() throws Exception { test("noembed", "script"); } @@ -42452,7 +43076,11 @@ public void _noembed_script() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_source() throws Exception { test("noembed", "source"); } @@ -42462,7 +43090,11 @@ public void _noembed_source() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_track() throws Exception { test("noembed", "track"); } @@ -42472,7 +43104,11 @@ public void _noembed_track() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _noembed_wbr() throws Exception { test("noembed", "wbr"); } @@ -42584,7 +43220,7 @@ public void _nolayer_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _nolayer_isindex() throws Exception { test("nolayer", "isindex"); } @@ -42768,7 +43404,7 @@ public void _object_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _object_isindex() throws Exception { test("object", "isindex"); } @@ -42952,7 +43588,7 @@ public void _ol_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _ol_isindex() throws Exception { test("ol", "isindex"); } @@ -43136,7 +43772,7 @@ public void _optgroup_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _optgroup_isindex() throws Exception { test("optgroup", "isindex"); } @@ -43320,7 +43956,7 @@ public void _option_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _option_isindex() throws Exception { test("option", "isindex"); } @@ -43522,7 +44158,7 @@ public void _output_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _output_isindex() throws Exception { test("output", "isindex"); } @@ -43725,7 +44361,8 @@ public void _p_details() throws Exception { @Alerts(DEFAULT = "1", FF = "0", FF78 = "0") - @NotYetImplemented({FF, FF78}) + @HtmlUnitNYI(FF = "1", + FF78 = "1") public void _p_dialog() throws Exception { test("p", "dialog"); } @@ -45504,7 +46141,7 @@ public void _picture_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _picture_isindex() throws Exception { test("picture", "isindex"); } @@ -45688,7 +46325,7 @@ public void _pre_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _pre_isindex() throws Exception { test("pre", "isindex"); } @@ -45872,7 +46509,7 @@ public void _progress_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _progress_isindex() throws Exception { test("progress", "isindex"); } @@ -46056,7 +46693,7 @@ public void _q_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _q_isindex() throws Exception { test("q", "isindex"); } @@ -46240,7 +46877,7 @@ public void _rp_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _rp_isindex() throws Exception { test("rp", "isindex"); } @@ -46286,7 +46923,11 @@ public void _rp_param() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "0", + EDGE = "0", + FF = "0", + FF78 = "0", + IE = "0") public void _rp_rt() throws Exception { test("rp", "rt"); } @@ -46434,7 +47075,7 @@ public void _rt_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _rt_isindex() throws Exception { test("rt", "isindex"); } @@ -46618,7 +47259,7 @@ public void _ruby_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _ruby_isindex() throws Exception { test("ruby", "isindex"); } @@ -46802,7 +47443,7 @@ public void _s_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _s_isindex() throws Exception { test("s", "isindex"); } @@ -46986,7 +47627,7 @@ public void _samp_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _samp_isindex() throws Exception { test("samp", "isindex"); } @@ -47188,7 +47829,7 @@ public void _section_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _section_isindex() throws Exception { test("section", "isindex"); } @@ -47270,7 +47911,11 @@ public void _section_wbr() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_area() throws Exception { test("select", "area"); } @@ -47280,7 +47925,11 @@ public void _select_area() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_base() throws Exception { test("select", "base"); } @@ -47290,7 +47939,11 @@ public void _select_base() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_basefont() throws Exception { test("select", "basefont"); } @@ -47300,7 +47953,11 @@ public void _select_basefont() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_bgsound() throws Exception { test("select", "bgsound"); } @@ -47310,7 +47967,11 @@ public void _select_bgsound() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_br() throws Exception { test("select", "br"); } @@ -47320,7 +47981,9 @@ public void _select_br() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented({CHROME, EDGE, IE}) + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + IE = "2") public void _select_command() throws Exception { test("select", "command"); } @@ -47330,7 +47993,11 @@ public void _select_command() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_embed() throws Exception { test("select", "embed"); } @@ -47340,7 +48007,11 @@ public void _select_embed() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_hr() throws Exception { test("select", "hr"); } @@ -47350,7 +48021,11 @@ public void _select_hr() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_image() throws Exception { test("select", "image"); } @@ -47360,7 +48035,11 @@ public void _select_image() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_img() throws Exception { test("select", "img"); } @@ -47370,7 +48049,11 @@ public void _select_img() throws Exception { */ @Test @Alerts("0") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_input() throws Exception { test("select", "input"); } @@ -47382,7 +48065,11 @@ public void _select_input() throws Exception { @Alerts(DEFAULT = "0", FF = "1", FF78 = "1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_keygen() throws Exception { test("select", "keygen"); } @@ -47392,7 +48079,11 @@ public void _select_keygen() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_link() throws Exception { test("select", "link"); } @@ -47402,7 +48093,11 @@ public void _select_link() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_meta() throws Exception { test("select", "meta"); } @@ -47412,7 +48107,11 @@ public void _select_meta() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_param() throws Exception { test("select", "param"); } @@ -47431,7 +48130,11 @@ public void _select_script() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "0", + EDGE = "0", + FF = "0", + FF78 = "0", + IE = "0") public void _select_section() throws Exception { test("select", "section"); } @@ -47450,7 +48153,11 @@ public void _select_select() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_source() throws Exception { test("select", "source"); } @@ -47460,7 +48167,11 @@ public void _select_source() throws Exception { */ @Test @Alerts("0") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "1", + EDGE = "1", + FF = "1", + FF78 = "1", + IE = "1") public void _select_textarea() throws Exception { test("select", "textarea"); } @@ -47470,7 +48181,11 @@ public void _select_textarea() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_track() throws Exception { test("select", "track"); } @@ -47480,7 +48195,11 @@ public void _select_track() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _select_wbr() throws Exception { test("select", "wbr"); } @@ -47592,7 +48311,7 @@ public void _slot_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _slot_isindex() throws Exception { test("slot", "isindex"); } @@ -47776,7 +48495,7 @@ public void _small_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _small_isindex() throws Exception { test("small", "isindex"); } @@ -49238,7 +49957,7 @@ public void _span_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _span_isindex() throws Exception { test("span", "isindex"); } @@ -49422,7 +50141,7 @@ public void _strike_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _strike_isindex() throws Exception { test("strike", "isindex"); } @@ -49606,7 +50325,7 @@ public void _strong_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _strong_isindex() throws Exception { test("strong", "isindex"); } @@ -49790,7 +50509,7 @@ public void _sub_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _sub_isindex() throws Exception { test("sub", "isindex"); } @@ -49974,7 +50693,7 @@ public void _summary_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _summary_isindex() throws Exception { test("summary", "isindex"); } @@ -50158,7 +50877,7 @@ public void _sup_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _sup_isindex() throws Exception { test("sup", "isindex"); } @@ -50555,7 +51274,11 @@ public void _svg_span() throws Exception { */ @Test @Alerts("0") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "1", + EDGE = "1", + FF = "1", + FF78 = "1", + IE = "1") public void _svg_strike() throws Exception { test("svg", "strike"); } @@ -50565,7 +51288,11 @@ public void _svg_strike() throws Exception { */ @Test @Alerts("0") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "1", + EDGE = "1", + FF = "1", + FF78 = "1", + IE = "1") public void _svg_strong() throws Exception { test("svg", "strong"); } @@ -50575,7 +51302,11 @@ public void _svg_strong() throws Exception { */ @Test @Alerts("0") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "1", + EDGE = "1", + FF = "1", + FF78 = "1", + IE = "1") public void _svg_sub() throws Exception { test("svg", "sub"); } @@ -50585,7 +51316,11 @@ public void _svg_sub() throws Exception { */ @Test @Alerts("0") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "1", + EDGE = "1", + FF = "1", + FF78 = "1", + IE = "1") public void _svg_sup() throws Exception { test("svg", "sup"); } @@ -50766,7 +51501,11 @@ public void _table_blockquote() throws Exception { */ @Test @Alerts("0") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "1", + EDGE = "1", + FF = "1", + FF78 = "1", + IE = "1") public void _table_button() throws Exception { test("table", "button"); } @@ -50985,7 +51724,11 @@ public void _table_footer() throws Exception { */ @Test @Alerts("2") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "1", + EDGE = "1", + FF = "1", + FF78 = "1", + IE = "1") public void _table_form() throws Exception { test("table", "form"); } @@ -51076,7 +51819,11 @@ public void _table_iframe() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _table_input() throws Exception { test("table", "input"); } @@ -51465,7 +52212,11 @@ public void _table_section() throws Exception { */ @Test @Alerts("0") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "1", + EDGE = "1", + FF = "1", + FF78 = "1", + IE = "1") public void _table_select() throws Exception { test("table", "select"); } @@ -51520,7 +52271,11 @@ public void _table_strong() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "0", + EDGE = "0", + FF = "0", + FF78 = "0", + IE = "0") public void _table_style() throws Exception { test("table", "style"); } @@ -51576,7 +52331,10 @@ public void _table_table() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "0") - @NotYetImplemented({CHROME, EDGE, FF, FF78}) + @HtmlUnitNYI(CHROME = "0", + EDGE = "0", + FF = "0", + FF78 = "0") public void _table_template() throws Exception { test("table", "template"); } @@ -51586,7 +52344,11 @@ public void _table_template() throws Exception { */ @Test @Alerts("0") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "1", + EDGE = "1", + FF = "1", + FF78 = "1", + IE = "1") public void _table_textarea() throws Exception { test("table", "textarea"); } @@ -54895,7 +55657,7 @@ public void _template_ins() throws Exception { @Test @Alerts(DEFAULT = "0", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _template_isindex() throws Exception { test("template", "isindex"); } @@ -59581,7 +60343,7 @@ public void _time_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _time_isindex() throws Exception { test("time", "isindex"); } @@ -59663,7 +60425,11 @@ public void _time_wbr() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_area() throws Exception { test("title", "area"); } @@ -59673,7 +60439,11 @@ public void _title_area() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_base() throws Exception { test("title", "base"); } @@ -59683,7 +60453,11 @@ public void _title_base() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_basefont() throws Exception { test("title", "basefont"); } @@ -59693,7 +60467,11 @@ public void _title_basefont() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_bgsound() throws Exception { test("title", "bgsound"); } @@ -59703,7 +60481,11 @@ public void _title_bgsound() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_br() throws Exception { test("title", "br"); } @@ -59713,7 +60495,9 @@ public void _title_br() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented({CHROME, EDGE, IE}) + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + IE = "2") public void _title_command() throws Exception { test("title", "command"); } @@ -59723,7 +60507,11 @@ public void _title_command() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_embed() throws Exception { test("title", "embed"); } @@ -59733,7 +60521,11 @@ public void _title_embed() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_hr() throws Exception { test("title", "hr"); } @@ -59743,7 +60535,11 @@ public void _title_hr() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_image() throws Exception { test("title", "image"); } @@ -59753,7 +60549,11 @@ public void _title_image() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_img() throws Exception { test("title", "img"); } @@ -59763,7 +60563,11 @@ public void _title_img() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_input() throws Exception { test("title", "input"); } @@ -59773,7 +60577,11 @@ public void _title_input() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_keygen() throws Exception { test("title", "keygen"); } @@ -59783,7 +60591,11 @@ public void _title_keygen() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_link() throws Exception { test("title", "link"); } @@ -59793,7 +60605,11 @@ public void _title_link() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "0", + EDGE = "0", + FF = "0", + FF78 = "0", + IE = "0") public void _title_meta() throws Exception { test("title", "meta"); } @@ -59803,7 +60619,11 @@ public void _title_meta() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_param() throws Exception { test("title", "param"); } @@ -59813,7 +60633,11 @@ public void _title_param() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_script() throws Exception { test("title", "script"); } @@ -59823,7 +60647,11 @@ public void _title_script() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_source() throws Exception { test("title", "source"); } @@ -59833,7 +60661,11 @@ public void _title_source() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "0", + EDGE = "0", + FF = "0", + FF78 = "0", + IE = "0") public void _title_style() throws Exception { test("title", "style"); } @@ -59843,7 +60675,11 @@ public void _title_style() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_track() throws Exception { test("title", "track"); } @@ -59853,7 +60689,11 @@ public void _title_track() throws Exception { */ @Test @Alerts("1") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "2", + EDGE = "2", + FF = "2", + FF78 = "2", + IE = "2") public void _title_wbr() throws Exception { test("title", "wbr"); } @@ -62521,7 +63361,7 @@ public void _tt_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _tt_isindex() throws Exception { test("tt", "isindex"); } @@ -62705,7 +63545,7 @@ public void _u_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _u_isindex() throws Exception { test("u", "isindex"); } @@ -62889,7 +63729,7 @@ public void _ul_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _ul_isindex() throws Exception { test("ul", "isindex"); } @@ -63073,7 +63913,7 @@ public void _var_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _var_isindex() throws Exception { test("var", "isindex"); } @@ -63257,7 +64097,7 @@ public void _video_input() throws Exception { @Test @Alerts(DEFAULT = "1", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "1") public void _video_isindex() throws Exception { test("video", "isindex"); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOf.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOf.java index d1e99e0a2..35e4056df 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOf.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOf.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -48,11 +48,12 @@ public abstract class HostParentOf extends WebDriverTestCase { * @throws Exception if an error occurs */ protected static Collection data(final Predicate predicate) throws Exception { - final List list = new ArrayList<>(); - final Set strings = TestCaseTest.getAllClassNames(); - for (final String parent : strings) { + final Set jsClassNames = TestCaseTest.getAllClassNames(); + + final List list = new ArrayList<>(jsClassNames.size() * jsClassNames.size() / 10); + for (final String parent : jsClassNames) { if (predicate.test(parent)) { - for (final String child : strings) { + for (final String child : jsClassNames) { list.add(new Object[] {parent, child}); } } @@ -95,22 +96,20 @@ protected void test(final String parent, final String child) throws Exception { + "\n" + "\n" + "-\n" + + "\n" + + "\n" + "\n" + + + " try {\n" + + " document.title = isParentOf(" + parent + ", " + child + ");\n" + + " } catch(e) { document.title = 'false'; }\n" + + "\n" + ""; ServerRestartCount_++; diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfATest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfATest.java index 35757e7cb..07ed175fa 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfATest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfATest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,11 +14,6 @@ */ package com.gargoylesoftware.htmlunit.general.huge; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.CHROME; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.EDGE; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF78; - import java.util.Collection; import org.junit.Test; @@ -27,7 +22,7 @@ import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; -import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; /** * Tests two Host classes, if one prototype is parent of another. @@ -135,7 +130,10 @@ public void _ArrayBuffer_ArrayBuffer() throws Exception { */ @Test @Alerts("false") - @NotYetImplemented({CHROME, EDGE, FF, FF78}) + @HtmlUnitNYI(CHROME = "true", + EDGE = "true", + FF = "true", + FF78 = "true") public void _Atomics_Atomics() throws Exception { test("Atomics", "Atomics"); } @@ -164,7 +162,10 @@ public void _Audio_Audio() throws Exception { @Test @Alerts(DEFAULT = "true", IE = "false") - @NotYetImplemented({CHROME, EDGE, FF, FF78}) + @HtmlUnitNYI(CHROME = "false", + EDGE = "false", + FF = "false", + FF78 = "false") public void _Audio_HTMLAudioElement() throws Exception { test("Audio", "HTMLAudioElement"); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfBTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfBTest.java index 9ea10157b..33bec2140 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfBTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfBTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfCTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfCTest.java index 2919304dc..403780875 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfCTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfCTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -363,9 +363,7 @@ public void _CryptoKey_CryptoKey() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") + @Alerts("false") public void _CSS_CSS() throws Exception { test("CSS", "CSS"); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfDTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfDTest.java index 67a060efa..72aabf1ba 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfDTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfDTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -570,17 +570,6 @@ public void _Element_HTMLCanvasElement() throws Exception { test("Element", "HTMLCanvasElement"); } - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") - public void _Element_HTMLContentElement() throws Exception { - test("Element", "HTMLContentElement"); - } - /** * @throws Exception if the test fails */ @@ -881,7 +870,6 @@ public void _Element_HTMLMenuElement() throws Exception { */ @Test @Alerts(DEFAULT = "false", - FF = "true", FF78 = "true") public void _Element_HTMLMenuItemElement() throws Exception { test("Element", "HTMLMenuItemElement"); @@ -1054,17 +1042,6 @@ public void _Element_HTMLSelectElement() throws Exception { test("Element", "HTMLSelectElement"); } - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") - public void _Element_HTMLShadowElement() throws Exception { - test("Element", "HTMLShadowElement"); - } - /** * @throws Exception if the test fails */ @@ -3018,17 +2995,6 @@ public void _EventTarget_HTMLCanvasElement() throws Exception { test("EventTarget", "HTMLCanvasElement"); } - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") - public void _EventTarget_HTMLContentElement() throws Exception { - test("EventTarget", "HTMLContentElement"); - } - /** * @throws Exception if the test fails */ @@ -3335,7 +3301,6 @@ public void _EventTarget_HTMLMenuElement() throws Exception { */ @Test @Alerts(DEFAULT = "false", - FF = "true", FF78 = "true") public void _EventTarget_HTMLMenuItemElement() throws Exception { test("EventTarget", "HTMLMenuItemElement"); @@ -3501,17 +3466,6 @@ public void _EventTarget_HTMLSelectElement() throws Exception { test("EventTarget", "HTMLSelectElement"); } - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") - public void _EventTarget_HTMLShadowElement() throws Exception { - test("EventTarget", "HTMLShadowElement"); - } - /** * @throws Exception if the test fails */ diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfFTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfFTest.java index 027e8d69b..06a3bed25 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfFTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfFTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfHTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfHTest.java index 8e899cd09..3ae86a44c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfHTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfHTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,11 +14,6 @@ */ package com.gargoylesoftware.htmlunit.general.huge; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.CHROME; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.EDGE; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF78; - import java.util.Collection; import org.junit.Test; @@ -27,7 +22,7 @@ import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; -import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; /** * Tests two Host classes, if one prototype is parent of another. @@ -218,7 +213,10 @@ public void _HTMLCanvasElement_HTMLCanvasElement() throws Exception { @Test @Alerts(DEFAULT = "false", IE = "true") - @NotYetImplemented({CHROME, EDGE, FF, FF78}) + @HtmlUnitNYI(CHROME = "true", + EDGE = "true", + FF = "true", + FF78 = "true") public void _HTMLCollection_HTMLAllCollection() throws Exception { test("HTMLCollection", "HTMLAllCollection"); } @@ -248,22 +246,14 @@ public void _HTMLCollection_HTMLFormControlsCollection() throws Exception { @Test @Alerts(DEFAULT = "true", IE = "false") - @NotYetImplemented({CHROME, EDGE, FF, FF78}) + @HtmlUnitNYI(CHROME = "false", + EDGE = "false", + FF = "false", + FF78 = "false") public void _HTMLCollection_HTMLOptionsCollection() throws Exception { test("HTMLCollection", "HTMLOptionsCollection"); } - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") - public void _HTMLContentElement_HTMLContentElement() throws Exception { - test("HTMLContentElement", "HTMLContentElement"); - } - /** * @throws Exception if the test fails */ @@ -481,17 +471,6 @@ public void _HTMLElement_HTMLCanvasElement() throws Exception { test("HTMLElement", "HTMLCanvasElement"); } - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") - public void _HTMLElement_HTMLContentElement() throws Exception { - test("HTMLElement", "HTMLContentElement"); - } - /** * @throws Exception if the test fails */ @@ -792,7 +771,6 @@ public void _HTMLElement_HTMLMenuElement() throws Exception { */ @Test @Alerts(DEFAULT = "false", - FF = "true", FF78 = "true") public void _HTMLElement_HTMLMenuItemElement() throws Exception { test("HTMLElement", "HTMLMenuItemElement"); @@ -965,17 +943,6 @@ public void _HTMLElement_HTMLSelectElement() throws Exception { test("HTMLElement", "HTMLSelectElement"); } - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") - public void _HTMLElement_HTMLShadowElement() throws Exception { - test("HTMLElement", "HTMLShadowElement"); - } - /** * @throws Exception if the test fails */ @@ -1430,7 +1397,6 @@ public void _HTMLMenuElement_HTMLMenuElement() throws Exception { */ @Test @Alerts(DEFAULT = "false", - FF = "true", FF78 = "true") public void _HTMLMenuItemElement_HTMLMenuItemElement() throws Exception { test("HTMLMenuItemElement", "HTMLMenuItemElement"); @@ -1623,17 +1589,6 @@ public void _HTMLSelectElement_HTMLSelectElement() throws Exception { test("HTMLSelectElement", "HTMLSelectElement"); } - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") - public void _HTMLShadowElement_HTMLShadowElement() throws Exception { - test("HTMLShadowElement", "HTMLShadowElement"); - } - /** * @throws Exception if the test fails */ diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfITest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfITest.java index e63c71f0e..634c81ec1 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfITest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfITest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,11 +14,6 @@ */ package com.gargoylesoftware.htmlunit.general.huge; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.CHROME; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.EDGE; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF78; - import java.util.Collection; import org.junit.Test; @@ -27,7 +22,7 @@ import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; -import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; /** * Tests two Host classes, if one prototype is parent of another. @@ -222,7 +217,8 @@ public void _IIRFilterNode_IIRFilterNode() throws Exception { */ @Test @Alerts("true") - @NotYetImplemented({CHROME, EDGE}) + @HtmlUnitNYI(CHROME = "false", + EDGE = "false") public void _Image_HTMLImageElement() throws Exception { // although Image != HTMLImageElement, they seem to be synonyms!!! test("Image", "HTMLImageElement"); @@ -296,7 +292,8 @@ public void _InputEvent_InputEvent() throws Exception { */ @Test @Alerts("false") - @NotYetImplemented({FF, FF78}) + @HtmlUnitNYI(FF = "true", + FF78 = "true") public void _InstallTrigger_InstallTrigger() throws Exception { test("InstallTrigger", "InstallTrigger"); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfNTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfNTest.java index 96cb765f2..9b3398dc7 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfNTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfNTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,7 +22,7 @@ import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; -import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; /** * Tests two Host classes, if one prototype is parent of another. @@ -296,18 +296,6 @@ public void _Node_HTMLCanvasElement() throws Exception { test("Node", "HTMLCanvasElement"); } - /** - * @throws Exception - * if the test fails - */ - @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") - public void _Node_HTMLContentElement() throws Exception { - test("Node", "HTMLContentElement"); - } - /** * @throws Exception * if the test fails @@ -651,7 +639,6 @@ public void _Node_HTMLMenuElement() throws Exception { */ @Test @Alerts(DEFAULT = "false", - FF = "true", FF78 = "true") public void _Node_HTMLMenuItemElement() throws Exception { test("Node", "HTMLMenuItemElement"); @@ -842,18 +829,6 @@ public void _Node_HTMLSelectElement() throws Exception { test("Node", "HTMLSelectElement"); } - /** - * @throws Exception - * if the test fails - */ - @Test - @Alerts(DEFAULT = "false", - CHROME = "true", - EDGE = "true") - public void _Node_HTMLShadowElement() throws Exception { - test("Node", "HTMLShadowElement"); - } - /** * @throws Exception if the test fails */ @@ -1855,7 +1830,11 @@ public void _Node_XMLDocument() throws Exception { */ @Test @Alerts("false") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "true", + EDGE = "true", + FF = "true", + FF78 = "true", + IE = "true") public void _NodeFilter_NodeFilter() throws Exception { test("NodeFilter", "NodeFilter"); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfPTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfPTest.java index d3d9770ba..a795687f0 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfPTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfPTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,12 +14,6 @@ */ package com.gargoylesoftware.htmlunit.general.huge; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.CHROME; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.EDGE; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF78; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE; - import java.util.Collection; import org.junit.Test; @@ -28,7 +22,7 @@ import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; -import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; /** * Tests two Host classes, if one prototype is parent of another. @@ -182,7 +176,7 @@ public void _PerformanceEntry_PerformanceMeasure() throws Exception { @Test @Alerts(DEFAULT = "true", IE = "false") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "true") public void _PerformanceEntry_PerformanceNavigationTiming() throws Exception { test("PerformanceEntry", "PerformanceNavigationTiming"); } @@ -265,7 +259,7 @@ public void _PerformanceObserverEntryList_PerformanceObserverEntryList() throws @Test @Alerts(DEFAULT = "true", IE = "false") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "true") public void _PerformanceResourceTiming_PerformanceNavigationTiming() throws Exception { test("PerformanceResourceTiming", "PerformanceNavigationTiming"); } @@ -642,7 +636,8 @@ public void _RTCDataChannelEvent_RTCDataChannelEvent() throws Exception { @Alerts(DEFAULT = "false", FF = "true", FF78 = "true") - @NotYetImplemented({FF, FF78}) + @HtmlUnitNYI(FF = "false", + FF78 = "false") public void _RTCIceCandidate_mozRTCIceCandidate() throws Exception { test("RTCIceCandidate", "mozRTCIceCandidate"); } @@ -665,7 +660,8 @@ public void _RTCIceCandidate_RTCIceCandidate() throws Exception { @Alerts(DEFAULT = "false", FF = "true", FF78 = "true") - @NotYetImplemented({FF, FF78}) + @HtmlUnitNYI(FF = "false", + FF78 = "false") public void _RTCPeerConnection_mozRTCPeerConnection() throws Exception { test("RTCPeerConnection", "mozRTCPeerConnection"); } @@ -687,7 +683,8 @@ public void _RTCPeerConnection_RTCPeerConnection() throws Exception { @Alerts(DEFAULT = "false", CHROME = "true", EDGE = "true") - @NotYetImplemented({CHROME, EDGE}) + @HtmlUnitNYI(CHROME = "false", + EDGE = "false") public void _RTCPeerConnection_webkitRTCPeerConnection() throws Exception { test("RTCPeerConnection", "webkitRTCPeerConnection"); } @@ -710,7 +707,8 @@ public void _RTCPeerConnectionIceEvent_RTCPeerConnectionIceEvent() throws Except @Alerts(DEFAULT = "false", FF = "true", FF78 = "true") - @NotYetImplemented({FF, FF78}) + @HtmlUnitNYI(FF = "false", + FF78 = "false") public void _RTCSessionDescription_mozRTCSessionDescription() throws Exception { test("RTCSessionDescription", "mozRTCSessionDescription"); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfS2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfS2Test.java new file mode 100644 index 000000000..4e3940874 --- /dev/null +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfS2Test.java @@ -0,0 +1,2743 @@ +/* + * Copyright (c) 2002-2021 Gargoyle Software Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.gargoylesoftware.htmlunit.general.huge; + +import java.util.Collection; + +import org.apache.commons.lang3.StringUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized.Parameters; + +import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner; +import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; + +/** + * Tests two Host classes, if one prototype is parent of another. + * + * This class handles all host names which starts by character 'S'. + * + * @author Ahmed Ashour + * @author Ronald Brill + */ +@RunWith(BrowserParameterizedRunner.class) +public class HostParentOfS2Test extends HostParentOf { + + /** + * Returns the parameterized data. + * @return the parameterized data + * @throws Exception if an error occurs + */ + @Parameters + public static Collection data() throws Exception { + return HostParentOf.data(input -> { + final char ch = Character.toUpperCase(input.charAt(0)); + return ch == 'S' && StringUtils.compareIgnoreCase(input, "SVGG") >= 0; + }); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _Screen_Screen() throws Exception { + test("Screen", "Screen"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _ScreenOrientation_ScreenOrientation() throws Exception { + test("ScreenOrientation", "ScreenOrientation"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _ScriptProcessorNode_ScriptProcessorNode() throws Exception { + test("ScriptProcessorNode", "ScriptProcessorNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SecurityPolicyViolationEvent_SecurityPolicyViolationEvent() throws Exception { + test("SecurityPolicyViolationEvent", "SecurityPolicyViolationEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _Selection_Selection() throws Exception { + test("Selection", "Selection"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + CHROME = "true", + EDGE = "true", + FF = "true", + FF78 = "true") + public void _ServiceWorker_ServiceWorker() throws Exception { + test("ServiceWorker", "ServiceWorker"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + CHROME = "true", + EDGE = "true", + FF = "true", + FF78 = "true") + public void _ServiceWorkerContainer_ServiceWorkerContainer() throws Exception { + test("ServiceWorkerContainer", "ServiceWorkerContainer"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + CHROME = "true", + EDGE = "true", + FF = "true", + FF78 = "true") + public void _ServiceWorkerRegistration_ServiceWorkerRegistration() throws Exception { + test("ServiceWorkerRegistration", "ServiceWorkerRegistration"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _Set_Set() throws Exception { + test("Set", "Set"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + CHROME = "true", + EDGE = "true") + public void _SharedArrayBuffer_SharedArrayBuffer() throws Exception { + test("SharedArrayBuffer", "SharedArrayBuffer"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _ShadowRoot_ShadowRoot() throws Exception { + test("ShadowRoot", "ShadowRoot"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SharedWorker_SharedWorker() throws Exception { + test("SharedWorker", "SharedWorker"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SourceBuffer_SourceBuffer() throws Exception { + test("SourceBuffer", "SourceBuffer"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SourceBufferList_SourceBufferList() throws Exception { + test("SourceBufferList", "SourceBufferList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "true", + FF78 = "true") + public void _SpeechSynthesis_SpeechSynthesis() throws Exception { + test("SpeechSynthesis", "SpeechSynthesis"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SpeechSynthesisErrorEvent_SpeechSynthesisErrorEvent() throws Exception { + test("SpeechSynthesisErrorEvent", "SpeechSynthesisErrorEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SpeechSynthesisEvent_SpeechSynthesisErrorEvent() throws Exception { + test("SpeechSynthesisEvent", "SpeechSynthesisErrorEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SpeechSynthesisEvent_SpeechSynthesisEvent() throws Exception { + test("SpeechSynthesisEvent", "SpeechSynthesisEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SpeechSynthesisUtterance_SpeechSynthesisUtterance() throws Exception { + test("SpeechSynthesisUtterance", "SpeechSynthesisUtterance"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + FF = "true", + FF78 = "true") + public void _SpeechSynthesisVoice_SpeechSynthesisVoice() throws Exception { + test("SpeechSynthesisVoice", "SpeechSynthesisVoice"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _StereoPannerNode_StereoPannerNode() throws Exception { + test("StereoPannerNode", "StereoPannerNode"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _Storage_Storage() throws Exception { + test("Storage", "Storage"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _StorageEvent_StorageEvent() throws Exception { + test("StorageEvent", "StorageEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _StorageManager_StorageManager() throws Exception { + test("StorageManager", "StorageManager"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _StyleMedia_StyleMedia() throws Exception { + test("StyleMedia", "StyleMedia"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _StyleSheet_CSSStyleSheet() throws Exception { + test("StyleSheet", "CSSStyleSheet"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _StyleSheet_StyleSheet() throws Exception { + test("StyleSheet", "StyleSheet"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _StyleSheetList_StyleSheetList() throws Exception { + test("StyleSheetList", "StyleSheetList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SubtleCrypto_SubtleCrypto() throws Exception { + test("SubtleCrypto", "SubtleCrypto"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGAElement_SVGAElement() throws Exception { + test("SVGAElement", "SVGAElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGAngle_SVGAngle() throws Exception { + test("SVGAngle", "SVGAngle"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGAnimatedAngle_SVGAnimatedAngle() throws Exception { + test("SVGAnimatedAngle", "SVGAnimatedAngle"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGAnimatedBoolean_SVGAnimatedBoolean() throws Exception { + test("SVGAnimatedBoolean", "SVGAnimatedBoolean"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGAnimatedEnumeration_SVGAnimatedEnumeration() throws Exception { + test("SVGAnimatedEnumeration", "SVGAnimatedEnumeration"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGAnimatedInteger_SVGAnimatedInteger() throws Exception { + test("SVGAnimatedInteger", "SVGAnimatedInteger"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGAnimatedLength_SVGAnimatedLength() throws Exception { + test("SVGAnimatedLength", "SVGAnimatedLength"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGAnimatedLengthList_SVGAnimatedLengthList() throws Exception { + test("SVGAnimatedLengthList", "SVGAnimatedLengthList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGAnimatedNumber_SVGAnimatedNumber() throws Exception { + test("SVGAnimatedNumber", "SVGAnimatedNumber"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGAnimatedNumberList_SVGAnimatedNumberList() throws Exception { + test("SVGAnimatedNumberList", "SVGAnimatedNumberList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGAnimatedPreserveAspectRatio_SVGAnimatedPreserveAspectRatio() throws Exception { + test("SVGAnimatedPreserveAspectRatio", "SVGAnimatedPreserveAspectRatio"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGAnimatedRect_SVGAnimatedRect() throws Exception { + test("SVGAnimatedRect", "SVGAnimatedRect"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGAnimatedString_SVGAnimatedString() throws Exception { + test("SVGAnimatedString", "SVGAnimatedString"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGAnimatedTransformList_SVGAnimatedTransformList() throws Exception { + test("SVGAnimatedTransformList", "SVGAnimatedTransformList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGAnimateElement_SVGAnimateElement() throws Exception { + test("SVGAnimateElement", "SVGAnimateElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGAnimateMotionElement_SVGAnimateMotionElement() throws Exception { + test("SVGAnimateMotionElement", "SVGAnimateMotionElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGAnimateTransformElement_SVGAnimateTransformElement() throws Exception { + test("SVGAnimateTransformElement", "SVGAnimateTransformElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGAnimationElement_SVGAnimateElement() throws Exception { + test("SVGAnimationElement", "SVGAnimateElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGAnimationElement_SVGAnimateMotionElement() throws Exception { + test("SVGAnimationElement", "SVGAnimateMotionElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGAnimationElement_SVGAnimateTransformElement() throws Exception { + test("SVGAnimationElement", "SVGAnimateTransformElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGAnimationElement_SVGAnimationElement() throws Exception { + test("SVGAnimationElement", "SVGAnimationElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGAnimationElement_SVGSetElement() throws Exception { + test("SVGAnimationElement", "SVGSetElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGCircleElement_SVGCircleElement() throws Exception { + test("SVGCircleElement", "SVGCircleElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGClipPathElement_SVGClipPathElement() throws Exception { + test("SVGClipPathElement", "SVGClipPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGComponentTransferFunctionElement_SVGComponentTransferFunctionElement() throws Exception { + test("SVGComponentTransferFunctionElement", "SVGComponentTransferFunctionElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGComponentTransferFunctionElement_SVGFEFuncAElement() throws Exception { + test("SVGComponentTransferFunctionElement", "SVGFEFuncAElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGComponentTransferFunctionElement_SVGFEFuncBElement() throws Exception { + test("SVGComponentTransferFunctionElement", "SVGFEFuncBElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGComponentTransferFunctionElement_SVGFEFuncGElement() throws Exception { + test("SVGComponentTransferFunctionElement", "SVGFEFuncGElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGComponentTransferFunctionElement_SVGFEFuncRElement() throws Exception { + test("SVGComponentTransferFunctionElement", "SVGFEFuncRElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGDefsElement_SVGDefsElement() throws Exception { + test("SVGDefsElement", "SVGDefsElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGDescElement_SVGDescElement() throws Exception { + test("SVGDescElement", "SVGDescElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGAElement() throws Exception { + test("SVGElement", "SVGAElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGElement_SVGAnimateElement() throws Exception { + test("SVGElement", "SVGAnimateElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGElement_SVGAnimateMotionElement() throws Exception { + test("SVGElement", "SVGAnimateMotionElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGElement_SVGAnimateTransformElement() throws Exception { + test("SVGElement", "SVGAnimateTransformElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGElement_SVGAnimationElement() throws Exception { + test("SVGElement", "SVGAnimationElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGCircleElement() throws Exception { + test("SVGElement", "SVGCircleElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGClipPathElement() throws Exception { + test("SVGElement", "SVGClipPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGComponentTransferFunctionElement() throws Exception { + test("SVGElement", "SVGComponentTransferFunctionElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGDefsElement() throws Exception { + test("SVGElement", "SVGDefsElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGDescElement() throws Exception { + test("SVGElement", "SVGDescElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGElement() throws Exception { + test("SVGElement", "SVGElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGEllipseElement() throws Exception { + test("SVGElement", "SVGEllipseElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEBlendElement() throws Exception { + test("SVGElement", "SVGFEBlendElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEColorMatrixElement() throws Exception { + test("SVGElement", "SVGFEColorMatrixElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEComponentTransferElement() throws Exception { + test("SVGElement", "SVGFEComponentTransferElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFECompositeElement() throws Exception { + test("SVGElement", "SVGFECompositeElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEConvolveMatrixElement() throws Exception { + test("SVGElement", "SVGFEConvolveMatrixElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEDiffuseLightingElement() throws Exception { + test("SVGElement", "SVGFEDiffuseLightingElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEDisplacementMapElement() throws Exception { + test("SVGElement", "SVGFEDisplacementMapElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEDistantLightElement() throws Exception { + test("SVGElement", "SVGFEDistantLightElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGElement_SVGFEDropShadowElement() throws Exception { + test("SVGElement", "SVGFEDropShadowElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEFloodElement() throws Exception { + test("SVGElement", "SVGFEFloodElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEFuncAElement() throws Exception { + test("SVGElement", "SVGFEFuncAElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEFuncBElement() throws Exception { + test("SVGElement", "SVGFEFuncBElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEFuncGElement() throws Exception { + test("SVGElement", "SVGFEFuncGElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEFuncRElement() throws Exception { + test("SVGElement", "SVGFEFuncRElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEGaussianBlurElement() throws Exception { + test("SVGElement", "SVGFEGaussianBlurElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEImageElement() throws Exception { + test("SVGElement", "SVGFEImageElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEMergeElement() throws Exception { + test("SVGElement", "SVGFEMergeElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEMergeNodeElement() throws Exception { + test("SVGElement", "SVGFEMergeNodeElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEMorphologyElement() throws Exception { + test("SVGElement", "SVGFEMorphologyElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEOffsetElement() throws Exception { + test("SVGElement", "SVGFEOffsetElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFEPointLightElement() throws Exception { + test("SVGElement", "SVGFEPointLightElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFESpecularLightingElement() throws Exception { + test("SVGElement", "SVGFESpecularLightingElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFESpotLightElement() throws Exception { + test("SVGElement", "SVGFESpotLightElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFETileElement() throws Exception { + test("SVGElement", "SVGFETileElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFETurbulenceElement() throws Exception { + test("SVGElement", "SVGFETurbulenceElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGFilterElement() throws Exception { + test("SVGElement", "SVGFilterElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGElement_SVGForeignObjectElement() throws Exception { + test("SVGElement", "SVGForeignObjectElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGGElement() throws Exception { + test("SVGElement", "SVGGElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGElement_SVGGeometryElement() throws Exception { + test("SVGElement", "SVGGeometryElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGGradientElement() throws Exception { + test("SVGElement", "SVGGradientElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGElement_SVGGraphicsElement() throws Exception { + test("SVGElement", "SVGGraphicsElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGImageElement() throws Exception { + test("SVGElement", "SVGImageElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGLinearGradientElement() throws Exception { + test("SVGElement", "SVGLinearGradientElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGLineElement() throws Exception { + test("SVGElement", "SVGLineElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGMarkerElement() throws Exception { + test("SVGElement", "SVGMarkerElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGMaskElement() throws Exception { + test("SVGElement", "SVGMaskElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGMetadataElement() throws Exception { + test("SVGElement", "SVGMetadataElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGElement_SVGMPathElement() throws Exception { + test("SVGElement", "SVGMPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGPathElement() throws Exception { + test("SVGElement", "SVGPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGPatternElement() throws Exception { + test("SVGElement", "SVGPatternElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGPolygonElement() throws Exception { + test("SVGElement", "SVGPolygonElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGPolylineElement() throws Exception { + test("SVGElement", "SVGPolylineElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGRadialGradientElement() throws Exception { + test("SVGElement", "SVGRadialGradientElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGRectElement() throws Exception { + test("SVGElement", "SVGRectElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGScriptElement() throws Exception { + test("SVGElement", "SVGScriptElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGElement_SVGSetElement() throws Exception { + test("SVGElement", "SVGSetElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGStopElement() throws Exception { + test("SVGElement", "SVGStopElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGStyleElement() throws Exception { + test("SVGElement", "SVGStyleElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGSVGElement() throws Exception { + test("SVGElement", "SVGSVGElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGSwitchElement() throws Exception { + test("SVGElement", "SVGSwitchElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGSymbolElement() throws Exception { + test("SVGElement", "SVGSymbolElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGTextContentElement() throws Exception { + test("SVGElement", "SVGTextContentElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGTextElement() throws Exception { + test("SVGElement", "SVGTextElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGTextPathElement() throws Exception { + test("SVGElement", "SVGTextPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGTextPositioningElement() throws Exception { + test("SVGElement", "SVGTextPositioningElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGTitleElement() throws Exception { + test("SVGElement", "SVGTitleElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGTSpanElement() throws Exception { + test("SVGElement", "SVGTSpanElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGUseElement() throws Exception { + test("SVGElement", "SVGUseElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGElement_SVGViewElement() throws Exception { + test("SVGElement", "SVGViewElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGEllipseElement_SVGEllipseElement() throws Exception { + test("SVGEllipseElement", "SVGEllipseElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEBlendElement_SVGFEBlendElement() throws Exception { + test("SVGFEBlendElement", "SVGFEBlendElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEColorMatrixElement_SVGFEColorMatrixElement() throws Exception { + test("SVGFEColorMatrixElement", "SVGFEColorMatrixElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEComponentTransferElement_SVGFEComponentTransferElement() throws Exception { + test("SVGFEComponentTransferElement", "SVGFEComponentTransferElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFECompositeElement_SVGFECompositeElement() throws Exception { + test("SVGFECompositeElement", "SVGFECompositeElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEConvolveMatrixElement_SVGFEConvolveMatrixElement() throws Exception { + test("SVGFEConvolveMatrixElement", "SVGFEConvolveMatrixElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEDiffuseLightingElement_SVGFEDiffuseLightingElement() throws Exception { + test("SVGFEDiffuseLightingElement", "SVGFEDiffuseLightingElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEDisplacementMapElement_SVGFEDisplacementMapElement() throws Exception { + test("SVGFEDisplacementMapElement", "SVGFEDisplacementMapElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEDistantLightElement_SVGFEDistantLightElement() throws Exception { + test("SVGFEDistantLightElement", "SVGFEDistantLightElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGFEDropShadowElement_SVGFEDropShadowElement() throws Exception { + test("SVGFEDropShadowElement", "SVGFEDropShadowElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEFloodElement_SVGFEFloodElement() throws Exception { + test("SVGFEFloodElement", "SVGFEFloodElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEFuncAElement_SVGFEFuncAElement() throws Exception { + test("SVGFEFuncAElement", "SVGFEFuncAElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEFuncBElement_SVGFEFuncBElement() throws Exception { + test("SVGFEFuncBElement", "SVGFEFuncBElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEFuncGElement_SVGFEFuncGElement() throws Exception { + test("SVGFEFuncGElement", "SVGFEFuncGElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEFuncRElement_SVGFEFuncRElement() throws Exception { + test("SVGFEFuncRElement", "SVGFEFuncRElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEGaussianBlurElement_SVGFEGaussianBlurElement() throws Exception { + test("SVGFEGaussianBlurElement", "SVGFEGaussianBlurElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEImageElement_SVGFEImageElement() throws Exception { + test("SVGFEImageElement", "SVGFEImageElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEMergeElement_SVGFEMergeElement() throws Exception { + test("SVGFEMergeElement", "SVGFEMergeElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEMergeNodeElement_SVGFEMergeNodeElement() throws Exception { + test("SVGFEMergeNodeElement", "SVGFEMergeNodeElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEMorphologyElement_SVGFEMorphologyElement() throws Exception { + test("SVGFEMorphologyElement", "SVGFEMorphologyElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEOffsetElement_SVGFEOffsetElement() throws Exception { + test("SVGFEOffsetElement", "SVGFEOffsetElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFEPointLightElement_SVGFEPointLightElement() throws Exception { + test("SVGFEPointLightElement", "SVGFEPointLightElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFESpecularLightingElement_SVGFESpecularLightingElement() throws Exception { + test("SVGFESpecularLightingElement", "SVGFESpecularLightingElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFESpotLightElement_SVGFESpotLightElement() throws Exception { + test("SVGFESpotLightElement", "SVGFESpotLightElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFETileElement_SVGFETileElement() throws Exception { + test("SVGFETileElement", "SVGFETileElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFETurbulenceElement_SVGFETurbulenceElement() throws Exception { + test("SVGFETurbulenceElement", "SVGFETurbulenceElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGFilterElement_SVGFilterElement() throws Exception { + test("SVGFilterElement", "SVGFilterElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGForeignObjectElement_SVGForeignObjectElement() throws Exception { + test("SVGForeignObjectElement", "SVGForeignObjectElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGGElement_SVGGElement() throws Exception { + test("SVGGElement", "SVGGElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGeometryElement_SVGCircleElement() throws Exception { + test("SVGGeometryElement", "SVGCircleElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGeometryElement_SVGEllipseElement() throws Exception { + test("SVGGeometryElement", "SVGEllipseElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGeometryElement_SVGGeometryElement() throws Exception { + test("SVGGeometryElement", "SVGGeometryElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGeometryElement_SVGLineElement() throws Exception { + test("SVGGeometryElement", "SVGLineElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGeometryElement_SVGPathElement() throws Exception { + test("SVGGeometryElement", "SVGPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGeometryElement_SVGPolygonElement() throws Exception { + test("SVGGeometryElement", "SVGPolygonElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGeometryElement_SVGPolylineElement() throws Exception { + test("SVGGeometryElement", "SVGPolylineElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGeometryElement_SVGRectElement() throws Exception { + test("SVGGeometryElement", "SVGRectElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGGradientElement_SVGGradientElement() throws Exception { + test("SVGGradientElement", "SVGGradientElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGGradientElement_SVGLinearGradientElement() throws Exception { + test("SVGGradientElement", "SVGLinearGradientElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGGradientElement_SVGRadialGradientElement() throws Exception { + test("SVGGradientElement", "SVGRadialGradientElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGAElement() throws Exception { + test("SVGGraphicsElement", "SVGAElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGCircleElement() throws Exception { + test("SVGGraphicsElement", "SVGCircleElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + CHROME = "true", + EDGE = "true") + @HtmlUnitNYI(CHROME = "false", + EDGE = "false") + public void _SVGGraphicsElement_SVGClipPathElement() throws Exception { + test("SVGGraphicsElement", "SVGClipPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGDefsElement() throws Exception { + test("SVGGraphicsElement", "SVGDefsElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGEllipseElement() throws Exception { + test("SVGGraphicsElement", "SVGEllipseElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGForeignObjectElement() throws Exception { + test("SVGGraphicsElement", "SVGForeignObjectElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGGElement() throws Exception { + test("SVGGraphicsElement", "SVGGElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGGeometryElement() throws Exception { + test("SVGGraphicsElement", "SVGGeometryElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGGraphicsElement() throws Exception { + test("SVGGraphicsElement", "SVGGraphicsElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGImageElement() throws Exception { + test("SVGGraphicsElement", "SVGImageElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGLineElement() throws Exception { + test("SVGGraphicsElement", "SVGLineElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGPathElement() throws Exception { + test("SVGGraphicsElement", "SVGPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGPolygonElement() throws Exception { + test("SVGGraphicsElement", "SVGPolygonElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGPolylineElement() throws Exception { + test("SVGGraphicsElement", "SVGPolylineElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGRectElement() throws Exception { + test("SVGGraphicsElement", "SVGRectElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGSVGElement() throws Exception { + test("SVGGraphicsElement", "SVGSVGElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGSwitchElement() throws Exception { + test("SVGGraphicsElement", "SVGSwitchElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGTextContentElement() throws Exception { + test("SVGGraphicsElement", "SVGTextContentElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGTextElement() throws Exception { + test("SVGGraphicsElement", "SVGTextElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGTextPathElement() throws Exception { + test("SVGGraphicsElement", "SVGTextPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGTextPositioningElement() throws Exception { + test("SVGGraphicsElement", "SVGTextPositioningElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGTSpanElement() throws Exception { + test("SVGGraphicsElement", "SVGTSpanElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGGraphicsElement_SVGUseElement() throws Exception { + test("SVGGraphicsElement", "SVGUseElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGImageElement_SVGImageElement() throws Exception { + test("SVGImageElement", "SVGImageElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGLength_SVGLength() throws Exception { + test("SVGLength", "SVGLength"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGLengthList_SVGLengthList() throws Exception { + test("SVGLengthList", "SVGLengthList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGLinearGradientElement_SVGLinearGradientElement() throws Exception { + test("SVGLinearGradientElement", "SVGLinearGradientElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGLineElement_SVGLineElement() throws Exception { + test("SVGLineElement", "SVGLineElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGMarkerElement_SVGMarkerElement() throws Exception { + test("SVGMarkerElement", "SVGMarkerElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGMaskElement_SVGMaskElement() throws Exception { + test("SVGMaskElement", "SVGMaskElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGMatrix_SVGMatrix() throws Exception { + test("SVGMatrix", "SVGMatrix"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGMetadataElement_SVGMetadataElement() throws Exception { + test("SVGMetadataElement", "SVGMetadataElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGMPathElement_SVGMPathElement() throws Exception { + test("SVGMPathElement", "SVGMPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGNumber_SVGNumber() throws Exception { + test("SVGNumber", "SVGNumber"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGNumberList_SVGNumberList() throws Exception { + test("SVGNumberList", "SVGNumberList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGPathElement_SVGPathElement() throws Exception { + test("SVGPathElement", "SVGPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSeg() throws Exception { + test("SVGPathSeg", "SVGPathSeg"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegArcAbs() throws Exception { + test("SVGPathSeg", "SVGPathSegArcAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegArcRel() throws Exception { + test("SVGPathSeg", "SVGPathSegArcRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegClosePath() throws Exception { + test("SVGPathSeg", "SVGPathSegClosePath"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegCurvetoCubicAbs() throws Exception { + test("SVGPathSeg", "SVGPathSegCurvetoCubicAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegCurvetoCubicRel() throws Exception { + test("SVGPathSeg", "SVGPathSegCurvetoCubicRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegCurvetoCubicSmoothAbs() throws Exception { + test("SVGPathSeg", "SVGPathSegCurvetoCubicSmoothAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegCurvetoCubicSmoothRel() throws Exception { + test("SVGPathSeg", "SVGPathSegCurvetoCubicSmoothRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegCurvetoQuadraticAbs() throws Exception { + test("SVGPathSeg", "SVGPathSegCurvetoQuadraticAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegCurvetoQuadraticRel() throws Exception { + test("SVGPathSeg", "SVGPathSegCurvetoQuadraticRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegCurvetoQuadraticSmoothAbs() throws Exception { + test("SVGPathSeg", "SVGPathSegCurvetoQuadraticSmoothAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegCurvetoQuadraticSmoothRel() throws Exception { + test("SVGPathSeg", "SVGPathSegCurvetoQuadraticSmoothRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegLinetoAbs() throws Exception { + test("SVGPathSeg", "SVGPathSegLinetoAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegLinetoHorizontalAbs() throws Exception { + test("SVGPathSeg", "SVGPathSegLinetoHorizontalAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegLinetoHorizontalRel() throws Exception { + test("SVGPathSeg", "SVGPathSegLinetoHorizontalRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegLinetoRel() throws Exception { + test("SVGPathSeg", "SVGPathSegLinetoRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegLinetoVerticalAbs() throws Exception { + test("SVGPathSeg", "SVGPathSegLinetoVerticalAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegLinetoVerticalRel() throws Exception { + test("SVGPathSeg", "SVGPathSegLinetoVerticalRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegMovetoAbs() throws Exception { + test("SVGPathSeg", "SVGPathSegMovetoAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSeg_SVGPathSegMovetoRel() throws Exception { + test("SVGPathSeg", "SVGPathSegMovetoRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegArcAbs_SVGPathSegArcAbs() throws Exception { + test("SVGPathSegArcAbs", "SVGPathSegArcAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegArcRel_SVGPathSegArcRel() throws Exception { + test("SVGPathSegArcRel", "SVGPathSegArcRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegClosePath_SVGPathSegClosePath() throws Exception { + test("SVGPathSegClosePath", "SVGPathSegClosePath"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegCurvetoCubicAbs_SVGPathSegCurvetoCubicAbs() throws Exception { + test("SVGPathSegCurvetoCubicAbs", "SVGPathSegCurvetoCubicAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegCurvetoCubicRel_SVGPathSegCurvetoCubicRel() throws Exception { + test("SVGPathSegCurvetoCubicRel", "SVGPathSegCurvetoCubicRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegCurvetoCubicSmoothAbs_SVGPathSegCurvetoCubicSmoothAbs() throws Exception { + test("SVGPathSegCurvetoCubicSmoothAbs", "SVGPathSegCurvetoCubicSmoothAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegCurvetoCubicSmoothRel_SVGPathSegCurvetoCubicSmoothRel() throws Exception { + test("SVGPathSegCurvetoCubicSmoothRel", "SVGPathSegCurvetoCubicSmoothRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegCurvetoQuadraticAbs_SVGPathSegCurvetoQuadraticAbs() throws Exception { + test("SVGPathSegCurvetoQuadraticAbs", "SVGPathSegCurvetoQuadraticAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegCurvetoQuadraticRel_SVGPathSegCurvetoQuadraticRel() throws Exception { + test("SVGPathSegCurvetoQuadraticRel", "SVGPathSegCurvetoQuadraticRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegCurvetoQuadraticSmoothAbs_SVGPathSegCurvetoQuadraticSmoothAbs() throws Exception { + test("SVGPathSegCurvetoQuadraticSmoothAbs", "SVGPathSegCurvetoQuadraticSmoothAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegCurvetoQuadraticSmoothRel_SVGPathSegCurvetoQuadraticSmoothRel() throws Exception { + test("SVGPathSegCurvetoQuadraticSmoothRel", "SVGPathSegCurvetoQuadraticSmoothRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegLinetoAbs_SVGPathSegLinetoAbs() throws Exception { + test("SVGPathSegLinetoAbs", "SVGPathSegLinetoAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegLinetoHorizontalAbs_SVGPathSegLinetoHorizontalAbs() throws Exception { + test("SVGPathSegLinetoHorizontalAbs", "SVGPathSegLinetoHorizontalAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegLinetoHorizontalRel_SVGPathSegLinetoHorizontalRel() throws Exception { + test("SVGPathSegLinetoHorizontalRel", "SVGPathSegLinetoHorizontalRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegLinetoRel_SVGPathSegLinetoRel() throws Exception { + test("SVGPathSegLinetoRel", "SVGPathSegLinetoRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegLinetoVerticalAbs_SVGPathSegLinetoVerticalAbs() throws Exception { + test("SVGPathSegLinetoVerticalAbs", "SVGPathSegLinetoVerticalAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegLinetoVerticalRel_SVGPathSegLinetoVerticalRel() throws Exception { + test("SVGPathSegLinetoVerticalRel", "SVGPathSegLinetoVerticalRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + CHROME = "false", + EDGE = "false") + public void _SVGPathSegList_SVGPathSegList() throws Exception { + test("SVGPathSegList", "SVGPathSegList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegMovetoAbs_SVGPathSegMovetoAbs() throws Exception { + test("SVGPathSegMovetoAbs", "SVGPathSegMovetoAbs"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGPathSegMovetoRel_SVGPathSegMovetoRel() throws Exception { + test("SVGPathSegMovetoRel", "SVGPathSegMovetoRel"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGPatternElement_SVGPatternElement() throws Exception { + test("SVGPatternElement", "SVGPatternElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGPoint_SVGPoint() throws Exception { + test("SVGPoint", "SVGPoint"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGPointList_SVGPointList() throws Exception { + test("SVGPointList", "SVGPointList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGPolygonElement_SVGPolygonElement() throws Exception { + test("SVGPolygonElement", "SVGPolygonElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGPolylineElement_SVGPolylineElement() throws Exception { + test("SVGPolylineElement", "SVGPolylineElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGPreserveAspectRatio_SVGPreserveAspectRatio() throws Exception { + test("SVGPreserveAspectRatio", "SVGPreserveAspectRatio"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGRadialGradientElement_SVGRadialGradientElement() throws Exception { + test("SVGRadialGradientElement", "SVGRadialGradientElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGRect_SVGRect() throws Exception { + test("SVGRect", "SVGRect"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGRectElement_SVGRectElement() throws Exception { + test("SVGRectElement", "SVGRectElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGScriptElement_SVGScriptElement() throws Exception { + test("SVGScriptElement", "SVGScriptElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _SVGSetElement_SVGSetElement() throws Exception { + test("SVGSetElement", "SVGSetElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGStopElement_SVGStopElement() throws Exception { + test("SVGStopElement", "SVGStopElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGStringList_SVGStringList() throws Exception { + test("SVGStringList", "SVGStringList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGStyleElement_SVGStyleElement() throws Exception { + test("SVGStyleElement", "SVGStyleElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGSVGElement_SVGSVGElement() throws Exception { + test("SVGSVGElement", "SVGSVGElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGSwitchElement_SVGSwitchElement() throws Exception { + test("SVGSwitchElement", "SVGSwitchElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGSymbolElement_SVGSymbolElement() throws Exception { + test("SVGSymbolElement", "SVGSymbolElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGTextContentElement_SVGTextContentElement() throws Exception { + test("SVGTextContentElement", "SVGTextContentElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGTextContentElement_SVGTextElement() throws Exception { + test("SVGTextContentElement", "SVGTextElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGTextContentElement_SVGTextPathElement() throws Exception { + test("SVGTextContentElement", "SVGTextPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGTextContentElement_SVGTextPositioningElement() throws Exception { + test("SVGTextContentElement", "SVGTextPositioningElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGTextContentElement_SVGTSpanElement() throws Exception { + test("SVGTextContentElement", "SVGTSpanElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGTextElement_SVGTextElement() throws Exception { + test("SVGTextElement", "SVGTextElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGTextPathElement_SVGTextPathElement() throws Exception { + test("SVGTextPathElement", "SVGTextPathElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGTextPositioningElement_SVGTextElement() throws Exception { + test("SVGTextPositioningElement", "SVGTextElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGTextPositioningElement_SVGTextPositioningElement() throws Exception { + test("SVGTextPositioningElement", "SVGTextPositioningElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGTextPositioningElement_SVGTSpanElement() throws Exception { + test("SVGTextPositioningElement", "SVGTSpanElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGTitleElement_SVGTitleElement() throws Exception { + test("SVGTitleElement", "SVGTitleElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGTransform_SVGTransform() throws Exception { + test("SVGTransform", "SVGTransform"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGTransformList_SVGTransformList() throws Exception { + test("SVGTransformList", "SVGTransformList"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGTSpanElement_SVGTSpanElement() throws Exception { + test("SVGTSpanElement", "SVGTSpanElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + CHROME = "true", + EDGE = "true") + @HtmlUnitNYI(FF = "true", + FF78 = "true", + IE = "true") + public void _SVGUnitTypes_SVGUnitTypes() throws Exception { + test("SVGUnitTypes", "SVGUnitTypes"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGUseElement_SVGUseElement() throws Exception { + test("SVGUseElement", "SVGUseElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("true") + public void _SVGViewElement_SVGViewElement() throws Exception { + test("SVGViewElement", "SVGViewElement"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + IE = "true") + public void _SVGZoomEvent_SVGZoomEvent() throws Exception { + test("SVGZoomEvent", "SVGZoomEvent"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "true", + IE = "false") + public void _Symbol_Symbol() throws Exception { + test("Symbol", "Symbol"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "false", + CHROME = "true", + EDGE = "true") + public void _SyncManager_SyncManager() throws Exception { + test("SyncManager", "SyncManager"); + } +} diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfSTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfSTest.java index 7b8e3d24d..90ba422a7 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfSTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfSTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,21 +14,16 @@ */ package com.gargoylesoftware.htmlunit.general.huge; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.CHROME; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.EDGE; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF78; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE; - import java.util.Collection; +import org.apache.commons.lang3.StringUtils; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized.Parameters; import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; -import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; /** * Tests two Host classes, if one prototype is parent of another. @@ -50,7 +45,7 @@ public class HostParentOfSTest extends HostParentOf { public static Collection data() throws Exception { return HostParentOf.data(input -> { final char ch = Character.toUpperCase(input.charAt(0)); - return ch == 'S'; + return ch == 'S' && StringUtils.compareIgnoreCase(input, "SVGG") < 0; }); } @@ -185,8 +180,7 @@ public void _SharedWorker_SharedWorker() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "true", - IE = "false") + @Alerts("true") public void _SourceBuffer_SourceBuffer() throws Exception { test("SourceBuffer", "SourceBuffer"); } @@ -195,8 +189,7 @@ public void _SourceBuffer_SourceBuffer() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "true", - IE = "false") + @Alerts("true") public void _SourceBufferList_SourceBufferList() throws Exception { test("SourceBufferList", "SourceBufferList"); } @@ -1680,7 +1673,8 @@ public void _SVGGraphicsElement_SVGCircleElement() throws Exception { @Alerts(DEFAULT = "false", CHROME = "true", EDGE = "true") - @NotYetImplemented({CHROME, EDGE}) + @HtmlUnitNYI(CHROME = "false", + EDGE = "false") public void _SVGGraphicsElement_SVGClipPathElement() throws Exception { test("SVGGraphicsElement", "SVGClipPathElement"); } @@ -2691,7 +2685,9 @@ public void _SVGTSpanElement_SVGTSpanElement() throws Exception { @Alerts(DEFAULT = "false", CHROME = "true", EDGE = "true") - @NotYetImplemented({FF, FF78, IE}) + @HtmlUnitNYI(FF = "true", + FF78 = "true", + IE = "true") public void _SVGUnitTypes_SVGUnitTypes() throws Exception { test("SVGUnitTypes", "SVGUnitTypes"); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfTTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfTTest.java index 0f2a7c886..f1095cd3b 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfTTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfTTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,8 +14,6 @@ */ package com.gargoylesoftware.htmlunit.general.huge; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE; - import java.util.Collection; import org.junit.Test; @@ -24,7 +22,7 @@ import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; -import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; /** * Tests two Host classes, if one prototype is parent of another. @@ -440,7 +438,7 @@ public void _URIError_URIError() throws Exception { @Test @Alerts(DEFAULT = "true", IE = "false") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "true") public void _URL_URL() throws Exception { test("URL", "URL"); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfWTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfWTest.java index 5db520961..6880999ea 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfWTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/general/huge/HostParentOfWTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,12 +14,6 @@ */ package com.gargoylesoftware.htmlunit.general.huge; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.CHROME; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.EDGE; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF78; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE; - import java.util.Collection; import org.junit.Test; @@ -28,7 +22,7 @@ import com.gargoylesoftware.htmlunit.BrowserParameterizedRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; -import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; /** * Tests two Host classes, if one prototype is parent of another. @@ -271,7 +265,10 @@ public void _WebGLVertexArrayObject_WebGLVertexArrayObject() throws Exception { EDGE = "true", FF = "true", FF78 = "true") - @NotYetImplemented({CHROME, EDGE, FF, FF78}) + @HtmlUnitNYI(CHROME = "false", + EDGE = "false", + FF = "false", + FF78 = "false") public void _WebKitCSSMatrix_DOMMatrix() throws Exception { test("WebKitCSSMatrix", "DOMMatrix"); } @@ -293,7 +290,8 @@ public void _WebKitCSSMatrix_WebKitCSSMatrix() throws Exception { @Alerts(DEFAULT = "false", CHROME = "true", EDGE = "true") - @NotYetImplemented({CHROME, EDGE}) + @HtmlUnitNYI(CHROME = "false", + EDGE = "false") public void _webkitMediaStream_MediaStream() throws Exception { test("webkitMediaStream", "MediaStream"); } @@ -338,7 +336,8 @@ public void _WebKitMutationObserver_WebKitMutationObserver() throws Exception { @Alerts(DEFAULT = "false", CHROME = "true", EDGE = "true") - @NotYetImplemented({CHROME, EDGE}) + @HtmlUnitNYI(CHROME = "false", + EDGE = "false") public void _webkitRTCPeerConnection_RTCPeerConnection() throws Exception { test("webkitRTCPeerConnection", "RTCPeerConnection"); } @@ -495,7 +494,7 @@ public void _XMLHttpRequest_XMLHttpRequest() throws Exception { @Test @Alerts(DEFAULT = "true", IE = "false") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "true") public void _XMLHttpRequestEventTarget_XMLHttpRequest() throws Exception { test("XMLHttpRequestEventTarget", "XMLHttpRequest"); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/AttributesTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/AttributesTest.java index e4f6184cc..841fbcb7a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/AttributesTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/AttributesTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -78,7 +78,7 @@ public static Test suite() throws Exception { "HtmlBlockQuote", "HtmlBody", "HtmlBold", "HtmlBreak", "HtmlButton", "HtmlCanvas", "HtmlCaption", "HtmlCenter", "HtmlCitation", "HtmlCode", "HtmlCommand", "DomComment", - "HtmlContent", "HtmlData", "HtmlDataList", + "HtmlData", "HtmlDataList", "HtmlDefinition", "HtmlDefinitionDescription", "HtmlDeletedText", "HtmlDetails", "HtmlDialog", "HtmlDirectory", "HtmlDivision", "HtmlDefinitionList", diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/BaseFrameElement2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/BaseFrameElement2Test.java index 827a34b41..6643a65f0 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/BaseFrameElement2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/BaseFrameElement2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/BaseFrameElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/BaseFrameElementTest.java index 4137768e4..35648f2ed 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/BaseFrameElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/BaseFrameElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/ClickableElement2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/ClickableElement2Test.java index 31cdb016d..3d69ecd40 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/ClickableElement2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/ClickableElement2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/ClickableElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/ClickableElementTest.java index ccf922114..cbb850eaa 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/ClickableElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/ClickableElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactoryTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactoryTest.java index 9939390ae..511ecafd5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactoryTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DefaultElementFactoryTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DisabledElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DisabledElementTest.java index 2ed38a51e..9d777f52d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DisabledElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DisabledElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomAttrTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomAttrTest.java index 14d310a0f..f3395619a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomAttrTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomAttrTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomCommentTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomCommentTest.java index 245dfd8af..398508fa8 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomCommentTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomCommentTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomDocumentFragmentTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomDocumentFragmentTest.java index 97f6194b4..ffb08459a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomDocumentFragmentTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomDocumentFragmentTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomElement2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomElement2Test.java index 7e191d0e0..ecf99cc7a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomElement2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomElement2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomElementTest.java index aff5c2161..0a60b0e24 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNamespaceNodeTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNamespaceNodeTest.java index 98dcabaf6..0cf4606a7 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNamespaceNodeTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNamespaceNodeTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNode2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNode2Test.java index 24123b8e4..eb30a9216 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNode2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNode2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeIterator2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeIterator2Test.java index 818750727..7580efb61 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeIterator2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeIterator2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeIteratorTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeIteratorTest.java index 1153e21cc..f93074ecf 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeIteratorTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeIteratorTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeListTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeListTest.java index bac31272b..89976830e 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeListTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeListTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeTest.java index ba9e89a09..e30e179b4 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomNodeTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -341,7 +341,7 @@ public void getByXPath() throws Exception { final List results = page.getByXPath("//title"); assertEquals(1, results.size()); final HtmlTitle title = (HtmlTitle) results.get(0); - assertEquals("my title", title.asText()); + assertEquals("my title", title.asNormalizedText()); final HtmlHead head = (HtmlHead) title.getParentNode(); assertEquals(results, head.getByXPath("//title")); @@ -438,7 +438,7 @@ public void getFirstByXPath() throws Exception { final HtmlPage page = loadPage(htmlContent); final HtmlTitle title = page.getFirstByXPath("//title"); - assertEquals("my title", title.asText()); + assertEquals("my title", title.asNormalizedText()); final HtmlHead head = (HtmlHead) title.getParentNode(); assertSame(title, head.getFirstByXPath("//title")); @@ -495,7 +495,7 @@ public void getDescendants_remove() throws Exception { + "
a
b
a
c
a
d
\n" + ""; final HtmlPage page = loadPage(html); - assertEquals("abacad", page.asText().replaceAll("\\s", "")); + assertEquals("abacad", page.asNormalizedText().replaceAll("\\s", "")); final DescendantElementsIterator iterator = (DescendantElementsIterator) page.getDocumentElement().getHtmlElementDescendants().iterator(); assertEquals("", iterator.nextNode().getId()); @@ -504,7 +504,7 @@ public void getDescendants_remove() throws Exception { iterator.remove(); assertEquals("d", iterator.nextNode().getId()); assertFalse(iterator.hasNext()); - assertEquals("d", page.asText().replaceAll("\\s", "")); + assertEquals("d", page.asNormalizedText().replaceAll("\\s", "")); } static class DomChangeListenerTestImpl implements DomChangeListener { diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomTextTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomTextTest.java index fb5e6c840..42b1fcbb8 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomTextTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomTextTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomTreeWalkerTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomTreeWalkerTest.java index ee9b4fa30..484fe03a7 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomTreeWalkerTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/DomTreeWalkerTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/FocusableElement2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/FocusableElement2Test.java index 7428001a4..a29fddd8f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/FocusableElement2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/FocusableElement2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -51,11 +51,11 @@ public void shutDownRealBrowsers() throws Exception { */ @Test @Alerts(DEFAULT = {"body", "active: body", "onload", "active: body", - "onfocus:[object Window]", "active: body"}, + "onfocus:[object Window]", "active: body"}, CHROME = {"body", "active: body", "onload", "active: body"}, EDGE = {"body", "active: body", "onload", "active: body"}, IE = {"body", "active: null", "onfocusin:body", "active: body", "onload", "active: body", - "onfocus:[object Window]", "active: body"}) + "onfocus:[object Window]", "active: body"}) @HtmlUnitNYI(FF = {"body", "active: body", "onload", "active: body"}, FF78 = {"body", "active: body", "onload", "active: body"}, IE = {"body", "active: body", "onload", "active: body"}) @@ -87,11 +87,11 @@ public void bodyLoad() throws Exception { */ @Test @Alerts(DEFAULT = {"onfocus:[object Window]", "active: focusId", - "before", "active: focusId", "after", "active: focusId"}, + "before", "active: focusId", "after", "active: focusId"}, CHROME = {"before", "active: focusId", "after", "active: focusId"}, EDGE = {"before", "active: focusId", "after", "active: focusId"}, IE = {"onfocusin:focusId", "active: focusId", "onfocus:[object Window]", "active: focusId", - "before", "active: focusId", "after", "active: focusId"}) + "before", "active: focusId", "after", "active: focusId"}) @HtmlUnitNYI(FF = {"before", "active: focusId", "after", "active: focusId"}, FF78 = {"before", "active: focusId", "after", "active: focusId"}, IE = {"before", "active: focusId", "onfocusout:focusId", "active: focusId", "after", "active: focusId"}) @@ -125,11 +125,11 @@ public void body() throws Exception { */ @Test @Alerts(DEFAULT = {"onfocus:[object Window]", "active: body", - "before", "active: body", "after", "active: body"}, + "before", "active: body", "after", "active: body"}, CHROME = {"before", "active: body", "after", "active: body"}, EDGE = {"before", "active: body", "after", "active: body"}, IE = {"onfocusin:body", "active: body", "onfocus:[object Window]", "active: body", - "before", "active: body", "after", "active: body"}) + "before", "active: body", "after", "active: body"}) @HtmlUnitNYI(FF = {"before", "active: body", "after", "active: body"}, FF78 = {"before", "active: body", "after", "active: body"}, IE = {"before", "active: body", "after", "active: body"}) @@ -162,48 +162,48 @@ public void bodySwitchFromBodyToNotFocusable() throws Exception { */ @Test @Alerts(DEFAULT = {"onfocus:[object Window]", "active: body", - "before", "active: body", - "onfocusF:focusId", "active: focusId", "onfocusinF:focusId", - "active: focusId", "onfocusin:focusId", "active: focusId", - "onblurF:focusId", "active: body", "onfocusoutF:focusId", - "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "before", "active: body", + "onfocusF:focusId", "active: focusId", "onfocusinF:focusId", + "active: focusId", "onfocusin:focusId", "active: focusId", + "onblurF:focusId", "active: body", "onfocusoutF:focusId", + "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, CHROME = {"before", "active: body", - "onfocusF:focusId", "active: focusId", "onfocusinF:focusId", - "active: focusId", "onfocusin:focusId", "active: focusId", - "onblurF:focusId", "active: body", "onfocusoutF:focusId", - "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocusF:focusId", "active: focusId", "onfocusinF:focusId", + "active: focusId", "onfocusin:focusId", "active: focusId", + "onblurF:focusId", "active: body", "onfocusoutF:focusId", + "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, EDGE = {"before", "active: body", - "onfocusF:focusId", "active: focusId", "onfocusinF:focusId", - "active: focusId", "onfocusin:focusId", "active: focusId", - "onblurF:focusId", "active: body", "onfocusoutF:focusId", - "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocusF:focusId", "active: focusId", "onfocusinF:focusId", + "active: focusId", "onfocusin:focusId", "active: focusId", + "onblurF:focusId", "active: body", "onfocusoutF:focusId", + "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, IE = {"onfocusin:body", "active: body", "onfocus:[object Window]", "active: body", - "before", "active: body", "onfocusout:body", "active: focusId", - "onfocusinF:focusId", "active: focusId", "onfocusin:focusId", - "active: focusId", "onfocusoutF:focusId", "active: body", - "onfocusout:focusId", "active: body", "onfocusin:body", "active: body", "after", "active: body", - "onfocusF:focusId", "active: body", "onblurF:focusId", "active: body"}) + "before", "active: body", "onfocusout:body", "active: focusId", + "onfocusinF:focusId", "active: focusId", "onfocusin:focusId", + "active: focusId", "onfocusoutF:focusId", "active: body", + "onfocusout:focusId", "active: body", "onfocusin:body", "active: body", "after", "active: body", + "onfocusF:focusId", "active: body", "onblurF:focusId", "active: body"}) @HtmlUnitNYI(FF = {"before", "active: body", - "onfocusF:focusId", "active: focusId", "onfocusinF:focusId", - "active: focusId", "onfocusin:focusId", "active: focusId", - "onblurF:focusId", "active: body", "onfocusoutF:focusId", - "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocusF:focusId", "active: focusId", "onfocusinF:focusId", + "active: focusId", "onfocusin:focusId", "active: focusId", + "onblurF:focusId", "active: body", "onfocusoutF:focusId", + "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, FF78 = {"before", "active: body", - "onfocusF:focusId", "active: focusId", "onfocusinF:focusId", - "active: focusId", "onfocusin:focusId", "active: focusId", - "onblurF:focusId", "active: body", "onfocusoutF:focusId", - "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocusF:focusId", "active: focusId", "onfocusinF:focusId", + "active: focusId", "onfocusin:focusId", "active: focusId", + "onblurF:focusId", "active: body", "onfocusoutF:focusId", + "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, IE = {"before", "active: body", "onfocusout:body", "active: body", - "onfocusinF:focusId", "active: body", "onfocusin:focusId", - "active: body", "onfocusF:focusId", "active: focusId", - "onfocusoutF:focusId", "active: body", "onfocusout:focusId", - "active: body", "onblurF:focusId", "active: body", - "after", "active: body"}) + "onfocusinF:focusId", "active: body", "onfocusin:focusId", + "active: body", "onfocusF:focusId", "active: focusId", + "onfocusoutF:focusId", "active: body", "onfocusout:focusId", + "active: body", "onblurF:focusId", "active: body", + "after", "active: body"}) // TODO FF & FF68 fail due to wrong body vs. window event handling public void bodySwitchFromBodyToFocusable() throws Exception { final String html = @@ -233,12 +233,12 @@ public void bodySwitchFromBodyToFocusable() throws Exception { */ @Test @Alerts(DEFAULT = {"onfocus:[object Window]", "active: body", - "before", "active: body", "onfocusin:focusId1", "active: focusId1", "after", "active: focusId1"}, + "before", "active: body", "onfocusin:focusId1", "active: focusId1", "after", "active: focusId1"}, CHROME = {"before", "active: body", "onfocusin:focusId1", "active: focusId1", "after", "active: focusId1"}, EDGE = {"before", "active: body", "onfocusin:focusId1", "active: focusId1", "after", "active: focusId1"}, IE = {"onfocusin:body", "active: body", "onfocus:[object Window]", "active: body", - "before", "active: body", "onfocusout:body", "active: focusId1", - "onfocusin:focusId1", "active: focusId1", "after", "active: focusId1"}) + "before", "active: body", "onfocusout:body", "active: focusId1", + "onfocusin:focusId1", "active: focusId1", "after", "active: focusId1"}) @HtmlUnitNYI(FF = {"before", "active: body", "onfocusin:focusId1", "active: focusId1", "after", "active: focusId1"}, FF78 = {"before", "active: body", "onfocusin:focusId1", "active: focusId1", "after", "active: focusId1"}, IE = {"before", "active: body", "onfocusout:body", "active: body", "onfocusin:focusId1", @@ -254,34 +254,34 @@ public void bodySwitchFromFocusableToNotFocusable() throws Exception { */ @Test @Alerts(DEFAULT = {"onfocus:[object Window]", "active: body", "before", "active: body", - "onfocusin:focusId1", "active: focusId1", - "onfocusout:focusId1", "active: body", "onfocusin:focusId2", "active: focusId2", - "after", "active: focusId2"}, + "onfocusin:focusId1", "active: focusId1", + "onfocusout:focusId1", "active: body", "onfocusin:focusId2", "active: focusId2", + "after", "active: focusId2"}, CHROME = {"before", "active: body", - "onfocusin:focusId1", "active: focusId1", - "onfocusout:focusId1", "active: body", "onfocusin:focusId2", "active: focusId2", - "after", "active: focusId2"}, + "onfocusin:focusId1", "active: focusId1", + "onfocusout:focusId1", "active: body", "onfocusin:focusId2", "active: focusId2", + "after", "active: focusId2"}, EDGE = {"before", "active: body", - "onfocusin:focusId1", "active: focusId1", - "onfocusout:focusId1", "active: body", "onfocusin:focusId2", "active: focusId2", - "after", "active: focusId2"}, + "onfocusin:focusId1", "active: focusId1", + "onfocusout:focusId1", "active: body", "onfocusin:focusId2", "active: focusId2", + "after", "active: focusId2"}, IE = {"onfocusin:body", "active: body", "onfocus:[object Window]", "active: body", - "before", "active: body", "onfocusout:body", "active: focusId1", - "onfocusin:focusId1", "active: focusId1", "onfocusout:focusId1", "active: focusId2", - "onfocusin:focusId2", "active: focusId2", - "after", "active: focusId2"}) + "before", "active: body", "onfocusout:body", "active: focusId1", + "onfocusin:focusId1", "active: focusId1", "onfocusout:focusId1", "active: focusId2", + "onfocusin:focusId2", "active: focusId2", + "after", "active: focusId2"}) @HtmlUnitNYI(FF = {"before", "active: body", - "onfocusin:focusId1", "active: focusId1", - "onfocusout:focusId1", "active: body", "onfocusin:focusId2", "active: focusId2", - "after", "active: focusId2"}, + "onfocusin:focusId1", "active: focusId1", + "onfocusout:focusId1", "active: body", "onfocusin:focusId2", "active: focusId2", + "after", "active: focusId2"}, FF78 = {"before", "active: body", - "onfocusin:focusId1", "active: focusId1", - "onfocusout:focusId1", "active: body", "onfocusin:focusId2", "active: focusId2", - "after", "active: focusId2"}, + "onfocusin:focusId1", "active: focusId1", + "onfocusout:focusId1", "active: body", "onfocusin:focusId2", "active: focusId2", + "after", "active: focusId2"}, IE = {"before", "active: body", "onfocusout:body", "active: body", - "onfocusin:focusId1", "active: body", - "onfocusout:focusId1", "active: body", "onfocusin:focusId2", "active: body", - "after", "active: focusId2"}) + "onfocusin:focusId1", "active: body", + "onfocusout:focusId1", "active: body", "onfocusin:focusId2", "active: body", + "after", "active: focusId2"}) // TODO FF & FF68 fail due to wrong body vs. window event handling public void bodySwitchFromFocusableToFocusable() throws Exception { testBodySwitchWithCallFocusAndBlur("\n" @@ -334,19 +334,19 @@ public void notFocusableWithTabIndexEmpty() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "between", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", + "between", "active: focusId", + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, IE = {"before", "active: body", - "onfocusin:focusId", "active: focusId", "between", "active: focusId", - "onfocusout:focusId", "active: body", "after", "active: body", - "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusin:focusId", "active: focusId", "between", "active: focusId", + "onfocusout:focusId", "active: body", "after", "active: body", + "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", - "between", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", - "after", "active: body"}) + "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", + "between", "active: focusId", + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", + "after", "active: body"}) public void notFocusableWithTabIndexNegative() throws Exception { testWithCallFocusAndBlur("
div
"); } @@ -356,19 +356,19 @@ public void notFocusableWithTabIndexNegative() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "between", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", + "between", "active: focusId", + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, IE = {"before", "active: body", - "onfocusin:focusId", "active: focusId", "between", "active: focusId", - "onfocusout:focusId", "active: body", "after", "active: body", - "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusin:focusId", "active: focusId", "between", "active: focusId", + "onfocusout:focusId", "active: body", "after", "active: body", + "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", - "between", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", - "after", "active: body"}) + "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", + "between", "active: focusId", + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", + "after", "active: body"}) public void notFocusableWithTabIndexZero() throws Exception { testWithCallFocusAndBlur("
div
"); } @@ -378,19 +378,19 @@ public void notFocusableWithTabIndexZero() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "between", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", + "between", "active: focusId", + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, IE = {"before", "active: body", - "onfocusin:focusId", "active: focusId", "between", "active: focusId", - "onfocusout:focusId", "active: body", "after", "active: body", - "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusin:focusId", "active: focusId", "between", "active: focusId", + "onfocusout:focusId", "active: body", "after", "active: body", + "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", - "between", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", - "after", "active: body"}) + "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", + "between", "active: focusId", + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", + "after", "active: body"}) public void notFocusableWithTabIndexPositive() throws Exception { testWithCallFocusAndBlur("
div
"); } @@ -427,19 +427,19 @@ public void notFocusableWithTabIndexHidden() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "between", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", + "between", "active: focusId", + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, IE = {"before", "active: body", - "onfocusin:focusId", "active: focusId", "between", "active: focusId", - "onfocusout:focusId", "active: body", "after", "active: body", - "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusin:focusId", "active: focusId", "between", "active: focusId", + "onfocusout:focusId", "active: body", "after", "active: body", + "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", - "between", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", - "after", "active: body"}) + "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", + "between", "active: focusId", + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", + "after", "active: body"}) public void anchor() throws Exception { testWithCallFocusAndBlur("link"); } @@ -449,19 +449,19 @@ public void anchor() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "between", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", + "between", "active: focusId", + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, IE = {"before", "active: body", - "onfocusin:focusId", "active: focusId", "between", "active: focusId", - "onfocusout:focusId", "active: body", "after", "active: body", - "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusin:focusId", "active: focusId", "between", "active: focusId", + "onfocusout:focusId", "active: body", "after", "active: body", + "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", - "between", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", - "after", "active: body"}) + "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", + "between", "active: focusId", + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", + "after", "active: body"}) public void anchorWithEmptyHref() throws Exception { testWithCallFocusAndBlur("link"); } @@ -480,19 +480,19 @@ public void anchorWithoutHref() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "between", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", + "between", "active: focusId", + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, IE = {"before", "active: body", - "onfocusin:focusId", "active: focusId", "between", "active: focusId", - "onfocusout:focusId", "active: body", "after", "active: body", - "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusin:focusId", "active: focusId", "between", "active: focusId", + "onfocusout:focusId", "active: body", "after", "active: body", + "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", - "between", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", - "after", "active: body"}) + "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", + "between", "active: focusId", + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", + "after", "active: body"}) public void area() throws Exception { testWithCallFocusAndBlur("" + "button"); } @@ -574,19 +574,19 @@ public void button() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "between", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", + "between", "active: focusId", + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, IE = {"before", "active: body", - "onfocusin:focusId", "active: focusId", "between", "active: focusId", - "onfocusout:focusId", "active: body", "after", "active: body", - "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusin:focusId", "active: focusId", "between", "active: focusId", + "onfocusout:focusId", "active: body", "after", "active: body", + "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", - "between", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", - "after", "active: body"}) + "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", + "between", "active: focusId", + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", + "after", "active: body"}) public void input() throws Exception { testWithCallFocusAndBlur(""); } @@ -605,12 +605,12 @@ public void inputHidden() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocusT:textId", "active: textId", "onfocusinT:textId", "active: textId", - "between", "active: textId", "after", "active: textId"}, + "onfocusT:textId", "active: textId", "onfocusinT:textId", "active: textId", + "between", "active: textId", "after", "active: textId"}, IE = {"before", "active: body", "between", "active: body", "after", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusinT:textId", "active: body", "onfocusT:textId", "active: textId", - "between", "active: textId", "after", "active: textId"}) + "onfocusinT:textId", "active: body", "onfocusT:textId", "active: textId", + "between", "active: textId", "after", "active: textId"}) public void labelFor() throws Exception { testWithCallFocusAndBlur(""); @@ -631,12 +631,12 @@ public void labelForDisabled() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocusT:textId", "active: textId", "onfocusinT:textId", "active: textId", - "between", "active: textId", "after", "active: textId"}, + "onfocusT:textId", "active: textId", "onfocusinT:textId", "active: textId", + "between", "active: textId", "after", "active: textId"}, IE = {"before", "active: body", "between", "active: body", "after", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusinT:textId", "active: body", "onfocusT:textId", "active: textId", - "between", "active: textId", "after", "active: textId"}) + "onfocusinT:textId", "active: body", "onfocusT:textId", "active: textId", + "between", "active: textId", "after", "active: textId"}) public void labelForReadonly() throws Exception { testWithCallFocusAndBlur("" + ""); @@ -677,12 +677,12 @@ public void labelForHidden() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocusT:textId", "active: textId", "onfocusinT:textId", "active: textId", - "between", "active: textId", "after", "active: textId"}, + "onfocusT:textId", "active: textId", "onfocusinT:textId", "active: textId", + "between", "active: textId", "after", "active: textId"}, IE = {"before", "active: body", "between", "active: body", "after", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusinT:textId", "active: body", "onfocusT:textId", "active: textId", - "between", "active: textId", "after", "active: textId"}) + "onfocusinT:textId", "active: body", "onfocusT:textId", "active: textId", + "between", "active: textId", "after", "active: textId"}) public void labelNotDisplayedFor() throws Exception { testWithCallFocusAndBlur("" + ""); @@ -693,12 +693,12 @@ public void labelNotDisplayedFor() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocusT:textId", "active: textId", "onfocusinT:textId", "active: textId", - "between", "active: textId", "after", "active: textId"}, + "onfocusT:textId", "active: textId", "onfocusinT:textId", "active: textId", + "between", "active: textId", "after", "active: textId"}, IE = {"before", "active: body", "between", "active: body", "after", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusinT:textId", "active: body", "onfocusT:textId", "active: textId", - "between", "active: textId", "after", "active: textId"}) + "onfocusinT:textId", "active: body", "onfocusT:textId", "active: textId", + "between", "active: textId", "after", "active: textId"}) public void labelNotVisibleFor() throws Exception { testWithCallFocusAndBlur("" + ""); @@ -709,12 +709,12 @@ public void labelNotVisibleFor() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocusT:textId", "active: textId", "onfocusinT:textId", "active: textId", - "between", "active: textId", "after", "active: textId"}, + "onfocusT:textId", "active: textId", "onfocusinT:textId", "active: textId", + "between", "active: textId", "after", "active: textId"}, IE = {"before", "active: body", "between", "active: body", "after", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusinT:textId", "active: body", "onfocusT:textId", "active: textId", - "between", "active: textId", "after", "active: textId"}) + "onfocusinT:textId", "active: body", "onfocusT:textId", "active: textId", + "between", "active: textId", "after", "active: textId"}) public void labelHiddenFor() throws Exception { testWithCallFocusAndBlur("" + ""); @@ -725,14 +725,14 @@ public void labelHiddenFor() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocusT:textId", "active: textId", "onfocusinT:textId", - "active: textId", "onfocusin:textId", "active: textId", - "between", "active: textId", "after", "active: textId"}, + "onfocusT:textId", "active: textId", "onfocusinT:textId", + "active: textId", "onfocusin:textId", "active: textId", + "between", "active: textId", "after", "active: textId"}, IE = {"before", "active: body", "between", "active: body", "after", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusinT:textId", "active: body", "onfocusin:textId", - "active: body", "onfocusT:textId", "active: textId", - "between", "active: textId", "after", "active: textId"}) + "onfocusinT:textId", "active: body", "onfocusin:textId", + "active: body", "onfocusT:textId", "active: textId", + "between", "active: textId", "after", "active: textId"}) public void labelNested() throws Exception { testWithCallFocusAndBlur(""); @@ -753,14 +753,14 @@ public void labelNestedDisabled() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocusT:textId", "active: textId", "onfocusinT:textId", - "active: textId", "onfocusin:textId", "active: textId", - "between", "active: textId", "after", "active: textId"}, + "onfocusT:textId", "active: textId", "onfocusinT:textId", + "active: textId", "onfocusin:textId", "active: textId", + "between", "active: textId", "after", "active: textId"}, IE = {"before", "active: body", "between", "active: body", "after", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusinT:textId", "active: body", "onfocusin:textId", - "active: body", "onfocusT:textId", "active: textId", - "between", "active: textId", "after", "active: textId"}) + "onfocusinT:textId", "active: body", "onfocusin:textId", + "active: body", "onfocusT:textId", "active: textId", + "between", "active: textId", "after", "active: textId"}) public void labelNestedReadonly() throws Exception { testWithCallFocusAndBlur(""); @@ -850,19 +850,19 @@ public void option() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "between", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", + "between", "active: focusId", + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, IE = {"before", "active: body", - "onfocusin:focusId", "active: focusId", "between", "active: focusId", - "onfocusout:focusId", "active: body", "after", "active: body", - "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusin:focusId", "active: focusId", "between", "active: focusId", + "onfocusout:focusId", "active: body", "after", "active: body", + "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", - "between", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", - "after", "active: body"}) + "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", + "between", "active: focusId", + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", + "after", "active: body"}) public void select() throws Exception { testWithCallFocusAndBlur(""); } @@ -872,19 +872,19 @@ public void select() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "between", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", + "between", "active: focusId", + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, IE = {"before", "active: body", - "onfocusin:focusId", "active: focusId", "between", "active: focusId", - "onfocusout:focusId", "active: body", "after", "active: body", - "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusin:focusId", "active: focusId", "between", "active: focusId", + "onfocusout:focusId", "active: body", "after", "active: body", + "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", - "between", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", - "after", "active: body"}) + "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", + "between", "active: focusId", + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", + "after", "active: body"}) public void textArea() throws Exception { testWithCallFocusAndBlur(""); } @@ -903,19 +903,19 @@ public void focusableDisabled() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "between", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", + "between", "active: focusId", + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, IE = {"before", "active: body", - "onfocusin:focusId", "active: focusId", "between", "active: focusId", - "onfocusout:focusId", "active: body", "after", "active: body", - "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusin:focusId", "active: focusId", "between", "active: focusId", + "onfocusout:focusId", "active: body", "after", "active: body", + "onfocus:focusId", "active: body", "onblur:focusId", "active: body"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", - "between", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", - "after", "active: body"}) + "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", + "between", "active: focusId", + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", + "after", "active: body"}) public void focusableReadonly() throws Exception { testWithCallFocusAndBlur(""); } @@ -980,15 +980,15 @@ private void testWithCallFocusAndBlur(String snippet) throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", - "after", "active: focusId1"}, + "onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", + "after", "active: focusId1"}, IE = {"before", "active: body", - "onfocusin1:focusId1", "active: focusId1", - "after", "active: focusId1", - "onfocus1:focusId1", "active: focusId1"}) + "onfocusin1:focusId1", "active: focusId1", + "after", "active: focusId1", + "onfocus1:focusId1", "active: focusId1"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", - "after", "active: focusId1"}) + "onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", + "after", "active: focusId1"}) public void switchFromFocusableToNotFocusable() throws Exception { testSwitchWithCallFocusAndBlur("\n" + "
div
"); @@ -999,21 +999,21 @@ public void switchFromFocusableToNotFocusable() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", - "onblur1:focusId1", "active: body", "onfocusout1:focusId1", "active: body", - "onfocus2:focusId2", "active: focusId2", "onfocusin2:focusId2", "active: focusId2", - "after", "active: focusId2"}, + "onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", + "onblur1:focusId1", "active: body", "onfocusout1:focusId1", "active: body", + "onfocus2:focusId2", "active: focusId2", "onfocusin2:focusId2", "active: focusId2", + "after", "active: focusId2"}, IE = {"before", "active: body", - "onfocusin1:focusId1", "active: focusId1", "onfocusout1:focusId1", "active: focusId2", - "onfocusin2:focusId2", "active: focusId2", - "after", "active: focusId2", - "onfocus1:focusId1", "active: focusId2", "onblur1:focusId1", "active: focusId2", - "onfocus2:focusId2", "active: focusId2"}) + "onfocusin1:focusId1", "active: focusId1", "onfocusout1:focusId1", "active: focusId2", + "onfocusin2:focusId2", "active: focusId2", + "after", "active: focusId2", + "onfocus1:focusId1", "active: focusId2", "onblur1:focusId1", "active: focusId2", + "onfocus2:focusId2", "active: focusId2"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", - "onfocusout1:focusId1", "active: body", "onfocusin2:focusId2", "active: body", - "onblur1:focusId1", "active: body", "onfocus2:focusId2", "active: focusId2", - "after", "active: focusId2"}) + "onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", + "onfocusout1:focusId1", "active: body", "onfocusin2:focusId2", "active: body", + "onblur1:focusId1", "active: body", "onfocus2:focusId2", "active: focusId2", + "after", "active: focusId2"}) public void switchFromFocusableToFocusable() throws Exception { testSwitchWithCallFocusAndBlur("\n" + ""); @@ -1024,15 +1024,15 @@ public void switchFromFocusableToFocusable() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", - "after", "active: focusId1"}, + "onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", + "after", "active: focusId1"}, IE = {"before", "active: body", - "onfocusin1:focusId1", "active: focusId1", - "after", "active: focusId1", - "onfocus1:focusId1", "active: focusId1"}) + "onfocusin1:focusId1", "active: focusId1", + "after", "active: focusId1", + "onfocus1:focusId1", "active: focusId1"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", - "after", "active: focusId1"}) + "onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", + "after", "active: focusId1"}) public void switchFromFocusableToFocusableDisabled() throws Exception { testSwitchWithCallFocusAndBlur("\n" + ""); @@ -1043,21 +1043,21 @@ public void switchFromFocusableToFocusableDisabled() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", - "onblur1:focusId1", "active: body", "onfocusout1:focusId1", "active: body", - "onfocus2:focusId2", "active: focusId2", "onfocusin2:focusId2", "active: focusId2", - "after", "active: focusId2"}, + "onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", + "onblur1:focusId1", "active: body", "onfocusout1:focusId1", "active: body", + "onfocus2:focusId2", "active: focusId2", "onfocusin2:focusId2", "active: focusId2", + "after", "active: focusId2"}, IE = {"before", "active: body", - "onfocusin1:focusId1", "active: focusId1", "onfocusout1:focusId1", "active: focusId2", - "onfocusin2:focusId2", "active: focusId2", - "after", "active: focusId2", - "onfocus1:focusId1", "active: focusId2", "onblur1:focusId1", "active: focusId2", - "onfocus2:focusId2", "active: focusId2"}) + "onfocusin1:focusId1", "active: focusId1", "onfocusout1:focusId1", "active: focusId2", + "onfocusin2:focusId2", "active: focusId2", + "after", "active: focusId2", + "onfocus1:focusId1", "active: focusId2", "onblur1:focusId1", "active: focusId2", + "onfocus2:focusId2", "active: focusId2"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", - "onfocusout1:focusId1", "active: body", "onfocusin2:focusId2", "active: body", - "onblur1:focusId1", "active: body", "onfocus2:focusId2", "active: focusId2", - "after", "active: focusId2"}) + "onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", + "onfocusout1:focusId1", "active: body", "onfocusin2:focusId2", "active: body", + "onblur1:focusId1", "active: body", "onfocus2:focusId2", "active: focusId2", + "after", "active: focusId2"}) public void switchFromFocusableToFocusableReadonly() throws Exception { testSwitchWithCallFocusAndBlur("\n" + ""); @@ -1068,15 +1068,15 @@ public void switchFromFocusableToFocusableReadonly() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", - "after", "active: focusId1"}, + "onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", + "after", "active: focusId1"}, IE = {"before", "active: body", - "onfocusin1:focusId1", "active: focusId1", - "after", "active: focusId1", - "onfocus1:focusId1", "active: focusId1"}) + "onfocusin1:focusId1", "active: focusId1", + "after", "active: focusId1", + "onfocus1:focusId1", "active: focusId1"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", - "after", "active: focusId1"}) + "onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", + "after", "active: focusId1"}) public void switchFromFocusableToFocusableNotDisplayed() throws Exception { testSwitchWithCallFocusAndBlur("\n" + ""); @@ -1087,15 +1087,15 @@ public void switchFromFocusableToFocusableNotDisplayed() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", - "after", "active: focusId1"}, + "onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", + "after", "active: focusId1"}, IE = {"before", "active: body", - "onfocusin1:focusId1", "active: focusId1", - "after", "active: focusId1", - "onfocus1:focusId1", "active: focusId1"}) + "onfocusin1:focusId1", "active: focusId1", + "after", "active: focusId1", + "onfocus1:focusId1", "active: focusId1"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", - "after", "active: focusId1"}) + "onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", + "after", "active: focusId1"}) public void switchFromFocusableToFocusableNotVisible() throws Exception { testSwitchWithCallFocusAndBlur("\n" + ""); @@ -1106,15 +1106,15 @@ public void switchFromFocusableToFocusableNotVisible() throws Exception { */ @Test @Alerts(DEFAULT = {"before", "active: body", - "onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", - "after", "active: focusId1"}, + "onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", + "after", "active: focusId1"}, IE = {"before", "active: body", - "onfocusin1:focusId1", "active: focusId1", - "after", "active: focusId1", - "onfocus1:focusId1", "active: focusId1"}) + "onfocusin1:focusId1", "active: focusId1", + "after", "active: focusId1", + "onfocus1:focusId1", "active: focusId1"}) @HtmlUnitNYI(IE = {"before", "active: body", - "onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", - "after", "active: focusId1"}) + "onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", + "after", "active: focusId1"}) public void switchFromFocusableToFocusableHidden() throws Exception { testSwitchWithCallFocusAndBlur("\n" + ""); @@ -1161,25 +1161,25 @@ public void jsClickOnNotFocusable() throws Exception { @Test @Alerts({"before", "active: body", "after", "active: body"}) @HtmlUnitNYI(CHROME = {"before", "active: body", - "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, EDGE = {"before", "active: body", - "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, FF = {"before", "active: body", - "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, FF78 = {"before", "active: body", - "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", - "after", "active: body"}, + "onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body", + "after", "active: body"}, IE = {"before", "active: body", - "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", - "after", "active: body"}) + "onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body", + "after", "active: body"}) // FIXME click for either divs or inputs seems broken... :( public void jsClickOnNotFocusableWithTabIndex() throws Exception { testWithCallClick("
div
"); @@ -1234,11 +1234,11 @@ public void clickOnNotFocusable() throws Exception { */ @Test @Alerts(DEFAULT = {"onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body"}, + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body"}, IE = {"onfocusin:focusId", "active: focusId", "onfocus:focusId", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body"}) @HtmlUnitNYI(IE = {"onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body"}) public void clickOnNotFocusableWithTabIndex() throws Exception { testWithClick("
div
"); } @@ -1248,11 +1248,11 @@ public void clickOnNotFocusableWithTabIndex() throws Exception { */ @Test @Alerts(DEFAULT = {"onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body"}, + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body"}, IE = {"onfocusin:focusId", "active: focusId", "onfocus:focusId", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body"}) @HtmlUnitNYI(IE = {"onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body"}) public void clickOnFocusable() throws Exception { testWithClick(""); } @@ -1270,11 +1270,11 @@ public void clickOnFocusableDisabled() throws Exception { */ @Test @Alerts(DEFAULT = {"onfocus:focusId", "active: focusId", "onfocusin:focusId", "active: focusId", - "onblur:focusId", "active: body", "onfocusout:focusId", "active: body"}, + "onblur:focusId", "active: body", "onfocusout:focusId", "active: body"}, IE = {"onfocusin:focusId", "active: focusId", "onfocus:focusId", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body"}) @HtmlUnitNYI(IE = {"onfocusin:focusId", "active: body", "onfocus:focusId", "active: focusId", - "onfocusout:focusId", "active: body", "onblur:focusId", "active: body"}) + "onfocusout:focusId", "active: body", "onblur:focusId", "active: body"}) public void clickOnFocusableReadonly() throws Exception { testWithClick(""); } @@ -1284,11 +1284,11 @@ public void clickOnFocusableReadonly() throws Exception { */ @Test @Alerts(DEFAULT = {"onfocusT:textId", "active: textId", "onfocusinT:textId", "active: textId", - "onblurT:textId", "active: body", "onfocusoutT:textId", "active: body"}, + "onblurT:textId", "active: body", "onfocusoutT:textId", "active: body"}, IE = {"onfocusinT:textId", "active: textId", "onfocusT:textId", "active: textId", - "onfocusoutT:textId", "active: body", "onblurT:textId", "active: body"}) + "onfocusoutT:textId", "active: body", "onblurT:textId", "active: body"}) @HtmlUnitNYI(IE = {"onfocusinT:textId", "active: body", "onfocusT:textId", "active: textId", - "onfocusoutT:textId", "active: body", "onblurT:textId", "active: body"}) + "onfocusoutT:textId", "active: body", "onblurT:textId", "active: body"}) public void clickOnLabelFor() throws Exception { testWithClick(""); @@ -1299,17 +1299,17 @@ public void clickOnLabelFor() throws Exception { */ @Test @Alerts(DEFAULT = {"onfocusT:textId", "active: textId", "onfocusinT:textId", - "active: textId", "onfocusin:textId", "active: textId", - "onblurT:textId", "active: body", "onfocusoutT:textId", - "active: body", "onfocusout:textId", "active: body"}, + "active: textId", "onfocusin:textId", "active: textId", + "onblurT:textId", "active: body", "onfocusoutT:textId", + "active: body", "onfocusout:textId", "active: body"}, IE = {"onfocusinT:textId", "active: textId", "onfocusin:textId", - "active: textId", "onfocusT:textId", "active: textId", - "onfocusoutT:textId", "active: body", "onfocusout:textId", - "active: body", "onblurT:textId", "active: body"}) + "active: textId", "onfocusT:textId", "active: textId", + "onfocusoutT:textId", "active: body", "onfocusout:textId", + "active: body", "onblurT:textId", "active: body"}) @HtmlUnitNYI(IE = {"onfocusinT:textId", "active: body", "onfocusin:textId", - "active: body", "onfocusT:textId", "active: textId", - "onfocusoutT:textId", "active: body", "onfocusout:textId", - "active: body", "onblurT:textId", "active: body"}) + "active: body", "onfocusT:textId", "active: textId", + "onfocusoutT:textId", "active: body", "onfocusout:textId", + "active: body", "onblurT:textId", "active: body"}) public void clickOnLabelNested() throws Exception { testWithClick(""); @@ -1344,14 +1344,14 @@ private void testWithClick(String snippet) throws Exception { */ @Test @Alerts(DEFAULT = {"onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", - "onblur1:focusId1", "active: body", "onfocusout1:focusId1", "active: body", - "onfocus2:focusId2", "active: focusId2", "onfocusin2:focusId2", "active: focusId2"}, + "onblur1:focusId1", "active: body", "onfocusout1:focusId1", "active: body", + "onfocus2:focusId2", "active: focusId2", "onfocusin2:focusId2", "active: focusId2"}, IE = {"onfocusin1:focusId1", "active: focusId1", "onfocus1:focusId1", "active: focusId1", - "onfocusout1:focusId1", "active: focusId2", "onfocusin2:focusId2", "active: focusId2", - "onblur1:focusId1", "active: focusId2", "onfocus2:focusId2", "active: focusId2"}) + "onfocusout1:focusId1", "active: focusId2", "onfocusin2:focusId2", "active: focusId2", + "onblur1:focusId1", "active: focusId2", "onfocus2:focusId2", "active: focusId2"}) @HtmlUnitNYI(IE = {"onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", - "onfocusout1:focusId1", "active: body", "onfocusin2:focusId2", "active: body", - "onblur1:focusId1", "active: body", "onfocus2:focusId2", "active: focusId2"}) + "onfocusout1:focusId1", "active: body", "onfocusin2:focusId2", "active: body", + "onblur1:focusId1", "active: body", "onfocus2:focusId2", "active: focusId2"}) public void clickFromFocusableToFocusable() throws Exception { testSwitchWithClick("\n" + ""); @@ -1362,9 +1362,9 @@ public void clickFromFocusableToFocusable() throws Exception { */ @Test @Alerts(DEFAULT = {"onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", - "onblur1:focusId1", "active: body", "onfocusout1:focusId1", "active: body"}, + "onblur1:focusId1", "active: body", "onfocusout1:focusId1", "active: body"}, IE = {"onfocusin1:focusId1", "active: focusId1", "onfocus1:focusId1", "active: focusId1", - "onfocusout1:focusId1", "active: body", "onblur1:focusId1", "active: body"}) + "onfocusout1:focusId1", "active: body", "onblur1:focusId1", "active: body"}) @HtmlUnitNYI(CHROME = {"onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1"}, EDGE = {"onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1"}, FF = {"onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1"}, @@ -1380,14 +1380,14 @@ public void clickFromFocusableToFocusableDisabled() throws Exception { */ @Test @Alerts(DEFAULT = {"onfocus1:focusId1", "active: focusId1", "onfocusin1:focusId1", "active: focusId1", - "onblur1:focusId1", "active: body", "onfocusout1:focusId1", "active: body", - "onfocus2:focusId2", "active: focusId2", "onfocusin2:focusId2", "active: focusId2"}, + "onblur1:focusId1", "active: body", "onfocusout1:focusId1", "active: body", + "onfocus2:focusId2", "active: focusId2", "onfocusin2:focusId2", "active: focusId2"}, IE = {"onfocusin1:focusId1", "active: focusId1", "onfocus1:focusId1", "active: focusId1", - "onfocusout1:focusId1", "active: focusId2", "onfocusin2:focusId2", "active: focusId2", - "onblur1:focusId1", "active: focusId2", "onfocus2:focusId2", "active: focusId2"}) + "onfocusout1:focusId1", "active: focusId2", "onfocusin2:focusId2", "active: focusId2", + "onblur1:focusId1", "active: focusId2", "onfocus2:focusId2", "active: focusId2"}) @HtmlUnitNYI(IE = {"onfocusin1:focusId1", "active: body", "onfocus1:focusId1", "active: focusId1", - "onfocusout1:focusId1", "active: body", "onfocusin2:focusId2", "active: body", - "onblur1:focusId1", "active: body", "onfocus2:focusId2", "active: focusId2"}) + "onfocusout1:focusId1", "active: body", "onfocusin2:focusId2", "active: body", + "onblur1:focusId1", "active: body", "onfocus2:focusId2", "active: focusId2"}) public void clickFromFocusableToFocusableReadonly() throws Exception { testSwitchWithClick("\n" + ""); @@ -1417,7 +1417,7 @@ private void testSwitchWithClick(String snippet) throws Exception { assertTitle(driver, String.join(";", getExpectedAlerts()) + (getExpectedAlerts().length > 0 ? ";" : "")); } - private String logger() { + private static String logger() { return " function log(x, e) {\n" + " document.title += x + (e ? ':' + (e.target.id ? e.target.id : e.target) : '') + ';';\n" + " document.title += 'active: ' " @@ -1425,7 +1425,7 @@ private String logger() { + " }\n"; } - private String logEvents(final String aSuffix) { + private static String logEvents(final String aSuffix) { return "onblur=\"log('onblur" + aSuffix + "', event)\" " + "onfocusin=\"log('onfocusin" + aSuffix + "', event)\" " + "onfocusout=\"log('onfocusout" + aSuffix + "', event)\" " diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/FocusableElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/FocusableElementTest.java index 8c3c25366..947457ecc 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/FocusableElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/FocusableElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlAnchor2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlAnchor2Test.java index ba12078c7..c129093f9 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlAnchor2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlAnchor2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,24 +16,36 @@ import static org.apache.commons.lang3.StringUtils.right; +import java.awt.image.BufferedImage; +import java.io.InputStream; import java.net.URL; import java.util.ArrayList; import java.util.Collections; +import java.util.LinkedList; import java.util.List; -import java.util.Map; + +import javax.imageio.ImageIO; +import javax.imageio.stream.ImageInputStream; import org.junit.Test; import org.junit.runner.RunWith; import com.gargoylesoftware.htmlunit.BrowserRunner; +import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; +import com.gargoylesoftware.htmlunit.attachment.AttachmentHandler; import com.gargoylesoftware.htmlunit.CollectingAlertHandler; import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.HttpMethod; import com.gargoylesoftware.htmlunit.MockWebConnection; +import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.SimpleWebTestCase; import com.gargoylesoftware.htmlunit.TopLevelWindow; +import com.gargoylesoftware.htmlunit.UnexpectedPage; import com.gargoylesoftware.htmlunit.WebClient; +import com.gargoylesoftware.htmlunit.WebResponse; import com.gargoylesoftware.htmlunit.WebWindow; +import com.gargoylesoftware.htmlunit.util.MimeType; /** * Tests for {@link HtmlAnchor}. @@ -357,34 +369,6 @@ public void openLinkInNewWindow() throws Exception { .getEnclosingWindow()); } - /** - * Tests the 'Referer' HTTP header. - * @throws Exception on test failure - */ - @Test - public void click_refererHeader() throws Exception { - final String firstContent - = "Page A\n" - + "link\n" - + ""; - final String secondContent - = "Page B\n" - + "\n" - + ""; - - final WebClient client = getWebClient(); - final MockWebConnection conn = new MockWebConnection(); - conn.setResponse(URL_FIRST, firstContent); - conn.setResponse(URL_SECOND, secondContent); - client.setWebConnection(conn); - final HtmlPage firstPage = client.getPage(URL_FIRST); - final HtmlAnchor a = firstPage.getHtmlElementById("link"); - a.click(); - - final Map lastAdditionalHeaders = conn.getLastAdditionalHeaders(); - assertEquals(URL_FIRST.toString(), lastAdditionalHeaders.get(HttpHeader.REFERER)); - } - /** * Links with an href and a non-false returning onclick that opens a new window should still * open the href in the first window. @@ -777,7 +761,439 @@ public void asText_getTextContent() throws Exception { final HtmlPage page = loadPage(html); final HtmlAnchor anchor = page.getHtmlElementById("a2"); - assertEquals("Last Name, First Name", anchor.asText()); + assertEquals("Last Name, First Name", anchor.asNormalizedText()); assertEquals("\n Last Name, First Name\n ", anchor.getTextContent()); } + + /** + * Not testable with Selenium. + * + * @exception Exception If the test fails + */ + @Test + @Alerts(DEFAULT = {"1", "First"}, + IE = {"0", "First"}) + @HtmlUnitNYI(IE = {"1", "First"}) + public void clickWithDownloadAttribute() throws Exception { + final String html = "\n" + + "\n" + + " First\n" + + "\n" + + "\n" + + " Click Me\n" + + ""; + + getMockWebConnection().setResponse(URL_SECOND, "Second"); + final int windowsSize = getWebClient().getWebWindows().size(); + final HtmlPage page = loadPage(html); + + page.getElementById("clickMe").click(); + + assertEquals("Should have opened a new window", + windowsSize + Integer.parseInt(getExpectedAlerts()[0]), getWebClient().getWebWindows().size()); + assertEquals("Should not have navigated away", getExpectedAlerts()[1], page.getTitleText()); + } + + /** + * Not testable with Selenium. + * + * @exception Exception If the test fails + */ + @Test + @Alerts(DEFAULT = {"1", "First"}, + IE = {"0", "First"}) + @HtmlUnitNYI(IE = {"1", "First"}) + public void clickWithDownloadAttributeFromJs() throws Exception { + final String html = "\n" + + "\n" + + " First\n" + + " \n" + + "\n" + + "\n" + + " Click Me\n" + + ""; + + getMockWebConnection().setResponse(URL_SECOND, "Second"); + + final int windowsSize = getWebClient().getWebWindows().size(); + final HtmlPage page = loadPage(html); + + assertEquals("Should have opened a new window", + windowsSize + Integer.parseInt(getExpectedAlerts()[0]), getWebClient().getWebWindows().size()); + assertEquals("Should not have navigated away", getExpectedAlerts()[1], page.getTitleText()); + } + + /** + * Not testable with Selenium. + * + * @exception Exception If the test fails + */ + @Test + @Alerts(DEFAULT = {"1", "First", + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAAL" + + "GPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1l" + + "bnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C" + + "7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI" + + "97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg=="}, + IE = {"0", "First", + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAAL" + + "GPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1l" + + "bnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C" + + "7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI" + + "97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg=="}) + @HtmlUnitNYI(IE = {"1", "First", + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAAL" + + "GPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1l" + + "bnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C" + + "7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI" + + "97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg=="}) + public void clickWithDownloadAttributeDataUrl() throws Exception { + final String html = "\n" + + "\n" + + " First\n" + + "\n" + + "\n" + + " Click Me\n" + + ""; + + getMockWebConnection().setResponse(URL_SECOND, "Second"); + final int windowsSize = getWebClient().getWebWindows().size(); + final HtmlPage page = loadPage(html); + + page.getElementById("clickMe").click(); + + assertEquals("Should have opened a new window", + windowsSize + Integer.parseInt(getExpectedAlerts()[0]), getWebClient().getWebWindows().size()); + assertEquals("Should not have navigated away", getExpectedAlerts()[1], page.getTitleText()); + + final WebWindow dataWindow = getWebClient().getWebWindows().get(getWebClient().getWebWindows().size() - 1); + final Page dataPage = dataWindow.getEnclosedPage(); + assertTrue("Should be an UnexpectedPage", dataPage instanceof UnexpectedPage); + + try (InputStream resultInputStream = ((UnexpectedPage) dataPage).getInputStream()) { + final ImageInputStream resultImageIS = ImageIO.createImageInputStream(resultInputStream); + final BufferedImage resultBufferedIIS = ImageIO.read(resultImageIS); + compareImages(getExpectedAlerts()[2], null, resultBufferedIIS); + } + } + + /** + * @throws Exception if the test fails + */ + @Test + public void click_unexpectedPage() throws Exception { + final String html + = "\n" + + "\n" + + " link\n" + + "\n" + + ""; + + getMockWebConnection().setResponse(URL_SECOND, "{name: \"Test\"};", MimeType.APPLICATION_JSON); + + final HtmlPage page = loadPage(html); + assertEquals(1, getWebClient().getWebWindows().size()); + + page.getElementById("link").click(); + assertEquals(1, getWebClient().getWebWindows().size()); + assertTrue(page.getEnclosingWindow().getEnclosedPage() instanceof UnexpectedPage); + } + + /** + * @throws Exception if the test fails + */ + @Test + public void click_unexpectedPageAttachmentHandlerDoesNotHandleContentType() throws Exception { + final String html + = "\n" + + "\n" + + " link\n" + + "\n" + + ""; + + getMockWebConnection().setResponse(URL_SECOND, "{name: \"Test\"};", MimeType.APPLICATION_JSON); + + final LinkedList pages = new LinkedList(); + getWebClient().setAttachmentHandler(new AttachmentHandler() { + + @Override + public void handleAttachment(final Page page) { + pages.add(page); + } + }); + + try { + final HtmlPage page = loadPage(html); + assertEquals(1, getWebClient().getWebWindows().size()); + + page.getElementById("link").click(); + + assertEquals(1, getWebClient().getWebWindows().size()); + assertTrue(getWebClient().getCurrentWindow().getEnclosedPage() instanceof UnexpectedPage); + + assertEquals(0, pages.size()); + } + finally { + getWebClient().setAttachmentHandler(null); + } + } + + + /** + * @throws Exception if the test fails + */ + @Test + public void click_unexpectedPageAttachmentHandlerHandleContentType() throws Exception { + final String html + = "\n" + + "\n" + + " link\n" + + "\n" + + ""; + + getMockWebConnection().setResponse(URL_SECOND, "{name: \"Test\"};", MimeType.APPLICATION_JSON); + + final LinkedList pages = new LinkedList(); + getWebClient().setAttachmentHandler(new AttachmentHandler() { + + @Override + public boolean isAttachment(final WebResponse response) { + return MimeType.APPLICATION_JSON + .equalsIgnoreCase(response.getResponseHeaderValue(HttpHeader.CONTENT_TYPE)); + } + + @Override + public void handleAttachment(final Page page) { + pages.add(page); + } + }); + + try { + final HtmlPage page = loadPage(html); + assertEquals(1, getWebClient().getWebWindows().size()); + + page.getElementById("link").click(); + + final WebWindow newWindow = getWebClient().getWebWindows().get(getWebClient().getWebWindows().size() - 1); + assertTrue(newWindow.getEnclosedPage() instanceof UnexpectedPage); + + assertEquals(1, pages.size()); + } + finally { + getWebClient().setAttachmentHandler(null); + } + } + + /** + * @throws Exception if the test fails + */ + @Test + public void click_unexpectedPageAttachmentHandlerHandleResponseDoesNotHandleContentType() throws Exception { + final String html + = "\n" + + "\n" + + " link\n" + + "\n" + + ""; + + getMockWebConnection().setResponse(URL_SECOND, "{name: \"Test\"};", MimeType.APPLICATION_JSON); + + final LinkedList pages = new LinkedList(); + getWebClient().setAttachmentHandler(new AttachmentHandler() { + + @Override + public boolean handleAttachment(final WebResponse response) { + pages.add(response); + return true; + } + + @Override + public void handleAttachment(final Page page) { + throw new IllegalAccessError("handleAttachment(Page) called"); + } + }); + + try { + final HtmlPage page = loadPage(html); + assertEquals(1, getWebClient().getWebWindows().size()); + + page.getElementById("link").click(); + assertEquals(1, getWebClient().getWebWindows().size()); + assertTrue(page.getEnclosingWindow().getEnclosedPage() instanceof UnexpectedPage); + + assertEquals(0, pages.size()); + } + finally { + getWebClient().setAttachmentHandler(null); + } + } + + /** + * @throws Exception if the test fails + */ + @Test + public void click_unexpectedPageAttachmentHandlerHandleResponseHandlesContentType() throws Exception { + final String html + = "\n" + + "\n" + + " link\n" + + "\n" + + ""; + + getMockWebConnection().setResponse(URL_SECOND, "{name: \"Test\"};", MimeType.APPLICATION_JSON); + + final LinkedList pages = new LinkedList(); + getWebClient().setAttachmentHandler(new AttachmentHandler() { + + @Override + public boolean isAttachment(final WebResponse response) { + return MimeType.APPLICATION_JSON + .equalsIgnoreCase(response.getResponseHeaderValue(HttpHeader.CONTENT_TYPE)); + } + + @Override + public boolean handleAttachment(final WebResponse response) { + pages.add(response); + return true; + } + + @Override + public void handleAttachment(final Page page) { + throw new IllegalAccessError("handleAttachment(Page) called"); + } + }); + + try { + final HtmlPage page = loadPage(html); + assertEquals(1, getWebClient().getWebWindows().size()); + + page.getElementById("link").click(); + assertEquals(1, getWebClient().getWebWindows().size()); + assertTrue(page.getEnclosingWindow().getEnclosedPage() == page); + + assertEquals(1, pages.size()); + } + finally { + getWebClient().setAttachmentHandler(null); + } + } + + /** + * @throws Exception if the test fails + */ + @Test + public void click_unexpectedPageDownloadAttribute() throws Exception { + final String html + = "\n" + + "\n" + + " link\n" + + "\n" + + ""; + + getMockWebConnection().setResponse(URL_SECOND, "{name: \"Test\"};", MimeType.APPLICATION_JSON); + + final HtmlPage page = loadPage(html); + assertEquals(1, getWebClient().getWebWindows().size()); + + page.getElementById("link").click(); + assertEquals(2, getWebClient().getWebWindows().size()); + + final WebWindow newWindow = getWebClient().getWebWindows().get(getWebClient().getWebWindows().size() - 1); + assertTrue(newWindow.getEnclosedPage() instanceof UnexpectedPage); + } + + /** + * @throws Exception if the test fails + */ + @Test + public void click_unexpectedPageDownloadAttributeAttachmentHandler() throws Exception { + final String html + = "\n" + + "\n" + + " link\n" + + "\n" + + ""; + + getMockWebConnection().setResponse(URL_SECOND, "{name: \"Test\"};", MimeType.APPLICATION_JSON); + + final LinkedList pages = new LinkedList(); + getWebClient().setAttachmentHandler(new AttachmentHandler() { + @Override + public void handleAttachment(final Page page) { + pages.add(page); + } + }); + + try { + final HtmlPage page = loadPage(html); + assertEquals(1, getWebClient().getWebWindows().size()); + + page.getElementById("link").click(); + assertEquals(2, getWebClient().getWebWindows().size()); + + final WebWindow newWindow = getWebClient().getWebWindows().get(getWebClient().getWebWindows().size() - 1); + assertTrue(newWindow.getEnclosedPage() instanceof UnexpectedPage); + + assertEquals(1, pages.size()); + assertTrue(pages.get(0) instanceof UnexpectedPage); + } + finally { + getWebClient().setAttachmentHandler(null); + } + } + + /** + * @throws Exception if the test fails + */ + @Test + public void click_unexpectedPageDownloadAttributeAttachmentHandlerHandleResponse() throws Exception { + final String html + = "\n" + + "\n" + + " link\n" + + "\n" + + ""; + + getMockWebConnection().setResponse(URL_SECOND, "{name: \"Test\"};", MimeType.APPLICATION_JSON); + + final LinkedList pages = new LinkedList(); + getWebClient().setAttachmentHandler(new AttachmentHandler() { + @Override + public boolean handleAttachment(final WebResponse response) { + pages.add(response); + return true; + } + + @Override + public void handleAttachment(final Page page) { + throw new IllegalAccessError("handleAttachment(Page) called"); + } + }); + + try { + final HtmlPage page = loadPage(html); + assertEquals(1, getWebClient().getWebWindows().size()); + + page.getElementById("link").click(); + assertEquals(1, getWebClient().getWebWindows().size()); + assertTrue(page.getEnclosingWindow().getEnclosedPage() == page); + + assertEquals(1, pages.size()); + } + finally { + getWebClient().setAttachmentHandler(null); + } + } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlAnchorTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlAnchorTest.java index c27138779..87e1d8db4 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlAnchorTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlAnchorTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import java.net.URLEncoder; import java.util.Collections; import java.util.List; +import java.util.Map; import org.apache.commons.io.IOUtils; import org.junit.Test; @@ -35,6 +36,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; import com.gargoylesoftware.htmlunit.BrowserRunner.BuggyWebDriver; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.HttpMethod; import com.gargoylesoftware.htmlunit.MockWebConnection; import com.gargoylesoftware.htmlunit.WebDriverTestCase; @@ -737,4 +739,76 @@ public void ctrlClick() throws Exception { windowsSize + Integer.parseInt(getExpectedAlerts()[0]), driver.getWindowHandles().size()); assertEquals("Should not have navigated away", getExpectedAlerts()[1], driver.getTitle()); } + + /** + * Tests the 'Referer' HTTP header. + * @throws Exception on test failure + */ + @Test + @Alerts("§§URL§§index.html?test") + public void click_refererHeader() throws Exception { + final String firstContent + = "Page A\n" + + "link\n" + + ""; + final String secondContent + = "Page B\n" + + "\n" + + ""; + + expandExpectedAlertsVariables(URL_FIRST); + + final URL indexUrl = new URL(URL_FIRST.toString() + "index.html"); + + getMockWebConnection().setResponse(indexUrl, firstContent); + getMockWebConnection().setResponse(URL_SECOND, secondContent); + + final WebDriver driver = loadPage2(firstContent, new URL(URL_FIRST.toString() + "index.html?test#ref")); + driver.findElement(By.id("link")).click(); + + assertEquals(2, getMockWebConnection().getRequestCount()); + + final Map lastAdditionalHeaders = getMockWebConnection().getLastAdditionalHeaders(); + assertEquals(getExpectedAlerts()[0], lastAdditionalHeaders.get(HttpHeader.REFERER)); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("§§URL§§index.html?test") + public void controlClick_refererHeader() throws Exception { + final String firstContent + = "Page A\n" + + "\n" + + " link\n" + + "\n" + + ""; + final String secondContent + = "Page B\n" + + "\n" + + ""; + + expandExpectedAlertsVariables(URL_FIRST); + + final URL indexUrl = new URL(URL_FIRST.toString() + "index.html"); + + getMockWebConnection().setResponse(indexUrl, firstContent); + getMockWebConnection().setResponse(URL_SECOND, secondContent); + + final WebDriver driver = loadPage2(firstContent, new URL(URL_FIRST.toString() + "index.html?test#ref")); + new Actions(driver) + .keyDown(Keys.CONTROL) + .click(driver.findElement(By.id("link"))) + .keyUp(Keys.CONTROL) + .build().perform(); + + Thread.sleep(DEFAULT_WAIT_TIME / 10); + + assertEquals(2, getMockWebConnection().getRequestCount()); + + final Map lastAdditionalHeaders = getMockWebConnection().getLastAdditionalHeaders(); + assertEquals(getExpectedAlerts()[0], lastAdditionalHeaders.get(HttpHeader.REFERER)); + } + } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlApplet2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlApplet2Test.java index 334901ee6..ac52d6486 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlApplet2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlApplet2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -42,8 +42,8 @@ public class HtmlApplet2Test extends WebDriverTestCase { @Alerts(DEFAULT = {"[object HTMLUnknownElement]", "[object HTMLCollection]", "0", "undefined"}, IE = {"[object HTMLAppletElement]", "[object HTMLCollection]", "1", "[object HTMLAppletElement]"}) @BuggyWebDriver(IE = {"The page you are viewing uses Java. More information on Java support " - + "is available from the Microsoft website.", - "[object HTMLAppletElement]", "[object HTMLCollection]", "1", "[object HTMLAppletElement]"}) + + "is available from the Microsoft website.", + "[object HTMLAppletElement]", "[object HTMLCollection]", "1", "[object HTMLAppletElement]"}) public void simpleScriptable() throws Exception { final String html = "\n" + "\n" + "\n" @@ -450,7 +452,7 @@ public void defaultChecked() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -615,23 +617,24 @@ public void defaultState() throws Exception { public void defaultValues() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -641,7 +644,7 @@ public void defaultValues() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -652,27 +655,28 @@ public void defaultValues() throws Exception { public void defaultValuesAfterClone() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -682,7 +686,7 @@ public void defaultValuesAfterClone() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -694,26 +698,27 @@ public void defaultValuesAfterClone() throws Exception { public void resetByClick() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -723,7 +728,7 @@ public void resetByClick() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -735,26 +740,27 @@ public void resetByClick() throws Exception { public void resetByJS() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -763,7 +769,7 @@ public void resetByJS() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -774,19 +780,20 @@ public void resetByJS() throws Exception { public void defaultValue() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -795,7 +802,7 @@ public void defaultValue() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -808,8 +815,9 @@ public void defaultValue() throws Exception { public void clickShouldTriggerOnchange() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" + "
\n" - + " Check me\n" + + " Check me\n" + " \n" + "
\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -834,20 +842,21 @@ public void clickShouldTriggerOnchange() throws Exception { public void checkedAttribute() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -865,7 +874,7 @@ public void checkedAttribute() throws Exception { driver.findElement(By.id("c3")).click(); driver.findElement(By.id("clickMe")).click(); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -873,48 +882,49 @@ public void checkedAttribute() throws Exception { */ @Test @Alerts({"false", "null", "true", "null", "false", "null", "true", "", "false", "", "true", "", - "true", "yes", "false", "yes", "true", "yes"}) + "true", "yes", "false", "yes", "true", "yes"}) public void checkedAttributeJS() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -925,7 +935,7 @@ public void checkedAttributeJS() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -933,36 +943,37 @@ public void checkedAttributeJS() throws Exception { */ @Test @Alerts({"false", "null", "false", "null", "true", "", "true", "", - "true", "yes", "true", "yes"}) + "true", "yes", "true", "yes"}) public void defaultCheckedAttribute() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -973,7 +984,7 @@ public void defaultCheckedAttribute() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -985,9 +996,10 @@ public void minMaxStep() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -998,6 +1010,6 @@ public void minMaxStep() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlCheckBoxInputTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlCheckBoxInputTest.java index ec916f399..b73f90714 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlCheckBoxInputTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlCheckBoxInputTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlColorInput2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlColorInput2Test.java index 050ad0b53..e2ba9b504 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlColorInput2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlColorInput2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlColorInputTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlColorInputTest.java index 2911182cb..26d2e23f2 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlColorInputTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlColorInputTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateInput2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateInput2Test.java index 4c48097ed..0976ad37a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateInput2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateInput2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateInputTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateInputTest.java index 57ea5e46c..bc91151b3 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateInputTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateInputTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateTimeInput2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateTimeInput2Test.java index a073f42e3..4f302d13a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateTimeInput2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateTimeInput2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateTimeLocalInputTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateTimeLocalInputTest.java index 7d2947c92..188f3942a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateTimeLocalInputTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDateTimeLocalInputTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionDescriptionTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionDescriptionTest.java index bd89bdb02..c25b8ce29 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionDescriptionTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionDescriptionTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionListTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionListTest.java index f476ca433..76d21450b 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionListTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDefinitionListTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDirectoryTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDirectoryTest.java index aca99dce3..fc8b05fc3 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDirectoryTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDirectoryTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDivision2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDivision2Test.java index 486db0bc0..1cee6bda5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDivision2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDivision2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDivisionTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDivisionTest.java index b0802830e..9c466abab 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDivisionTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlDivisionTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlElement2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlElement2Test.java index a38e1e5a7..bbd5ec8a9 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlElement2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlElement2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlElementTest.java index 17aa41d0f..10f7a9f70 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlEmailInput2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlEmailInput2Test.java index 4eb8377b3..178f1656d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlEmailInput2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlEmailInput2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlEmailInputTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlEmailInputTest.java index bf8ebd7b5..e0ab539ae 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlEmailInputTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlEmailInputTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlEmbedTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlEmbedTest.java index 9abc398d6..5d0480c08 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlEmbedTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlEmbedTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlFieldSetTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlFieldSetTest.java index 1e67e0fae..cc11a143d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlFieldSetTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlFieldSetTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlFileInput2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlFileInput2Test.java index d17967f1d..ac8dfbc7d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlFileInput2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlFileInput2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,6 +27,8 @@ import java.net.URI; import java.net.URL; import java.net.URLDecoder; +import java.text.Normalizer; +import java.text.Normalizer.Form; import java.util.HashMap; import java.util.Locale; import java.util.Map; @@ -532,6 +534,39 @@ public void mutiple() throws Exception { assertTrue(response.contains("Second")); } + + /** + * @throws Exception if the test fails + */ + @Test + public void webkitdirectory() throws Exception { + final Map> servlets = new HashMap<>(); + servlets.put("/upload1", MultipleWebkitdirectoryServlet.class); + servlets.put("/upload2", PrintRequestServlet.class); + startWebServer("./", null, servlets); + + final String filename1 = "HtmlFileInputTest_one.txt"; + final File dir = new File("src/test/resources/pjl-comp-filter"); + assertTrue(dir.exists()); + assertTrue(dir.isDirectory()); + + final WebClient client = getWebClient(); + final HtmlPage firstPage = client.getPage(URL_FIRST + "upload1"); + + final HtmlForm form = firstPage.getForms().get(0); + final HtmlFileInput fileInput = form.getInputByName("myInput"); + fileInput.setDirectory(dir); + + final HtmlSubmitInput submitInput = form.getInputByValue("Upload"); + final HtmlPage secondPage = submitInput.click(); + + final String response = secondPage.getWebResponse().getContentAsString(); + + assertTrue(response.contains("index.html")); + assertTrue(response.contains("web.xml")); + assertTrue(response.contains("pjl-comp-filter-1.8.1.jar")); + } + /** * Servlet for '/upload1'. */ @@ -553,6 +588,27 @@ protected void doGet(final HttpServletRequest request, final HttpServletResponse } } + /** + * Servlet for '/upload1'. + */ + public static class MultipleWebkitdirectoryServlet extends HttpServlet { + + /** + * {@inheritDoc} + */ + @Override + protected void doGet(final HttpServletRequest request, final HttpServletResponse response) + throws ServletException, IOException { + response.setCharacterEncoding(UTF_8.name()); + response.setContentType(MimeType.TEXT_HTML); + response.getWriter().write("\n" + + "
\n" + + "Name:
\n" + + "\n" + + "
\n"); + } + } + /** * Prints request content to the response. */ @@ -570,7 +626,8 @@ protected void doPost(final HttpServletRequest request, final HttpServletRespons final BufferedReader reader = request.getReader(); String line; while ((line = reader.readLine()) != null) { - writer.write(line); + final String normalized = Normalizer.normalize(line, Form.NFD); + writer.write(normalized); } } } @@ -605,7 +662,7 @@ public void onchangeMultiple() throws Exception { */ @Test @Alerts({"C:\\fakepath\\pom.xml-Hello world-Hello world", - ""}) + ""}) public void value() throws Exception { final String html = "\n" @@ -628,8 +685,39 @@ public void value() throws Exception { page.getHtmlElementById("f").setFiles(pom); page.getElementById("clickMe").click(); Thread.sleep(100); - final String[] expectedAlerts = getExpectedAlerts(); - expectedAlerts[0] = expectedAlerts[0].replace("§§PATH§§", pom.getAbsolutePath()); - assertEquals(expectedAlerts, getCollectedAlerts(page)); + assertEquals(getExpectedAlerts(), getCollectedAlerts(page)); + } + + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts({"C:\\fakepath\\index.html-Hello world-Hello world", + ""}) + public void valueWebkitdirectory() throws Exception { + final String html = + "\n" + + "\n" + + "\n" + + "\n" + + " \n" + + " \n" + + ""; + + final File dir = new File("src/test/resources/pjl-comp-filter"); + System.out.println(dir.getAbsolutePath()); + + final HtmlPage page = loadPage(html); + page.getHtmlElementById("f").setDirectory(dir); + page.getElementById("clickMe").click(); + Thread.sleep(100); + assertEquals(getExpectedAlerts(), getCollectedAlerts(page)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlFileInputTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlFileInputTest.java index ab8cb014d..e6afa1454 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlFileInputTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlFileInputTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -681,11 +681,11 @@ public void defaultValuesAfterClone() throws Exception { */ @Test @Alerts(DEFAULT = {"-initial-initial", "-initial-initial", - "exception", "-initial-initial", "-initial-initial", - "-newDefault-newDefault", "-newDefault-newDefault"}, + "exception", "-initial-initial", "-initial-initial", + "-newDefault-newDefault", "-newDefault-newDefault"}, IE = {"-initial-initial", "-initial-initial", - "-initial-initial", "-initial-initial", - "-newDefault-newDefault", "-newDefault-newDefault"}) + "-initial-initial", "-initial-initial", + "-newDefault-newDefault", "-newDefault-newDefault"}) public void resetByClick() throws Exception { final String html = "foo\n" + "\n" + + "\n" + + "\n" + + " \n" + + "\n" + + ""; + + final int startCount = getMockWebConnection().getRequestCount(); + final int expectedRequestCount = Integer.parseInt(getExpectedAlerts()[1]); + + expandExpectedAlertsVariables(URL_SECOND); + setExpectedAlerts(getExpectedAlerts()[0]); + loadPageWithAlerts2(html); + + assertEquals(expectedRequestCount, getMockWebConnection().getRequestCount() - startCount); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"§§URL§§abcd/img.gif", "2"}) + @HtmlUnitNYI(CHROME = {"§§URL§§abcd/img.gif", "1"}, + EDGE = {"§§URL§§abcd/img.gif", "1"}, + FF = {"§§URL§§abcd/img.gif", "1"}, + FF78 = {"§§URL§§abcd/img.gif", "1"}, + IE = {"§§URL§§abcd/img.gif", "1"}) + public void resolveImageRelative() throws Exception { + try (InputStream is = getClass().getClassLoader().getResourceAsStream("testfiles/tiny-gif.img")) { + final byte[] directBytes = IOUtils.toByteArray(is); + final URL urlImage = new URL(URL_FIRST, "abcd/img.gif"); + final List emptyList = Collections.emptyList(); + getMockWebConnection().setResponse(urlImage, directBytes, 200, "ok", "image/gif", emptyList); + } + + final String html + = "\n" + + "\n" + + "\n" + + "\n" + + " \n" + + "\n" + + ""; + + final int startCount = getMockWebConnection().getRequestCount(); + final int expectedRequestCount = Integer.parseInt(getExpectedAlerts()[1]); + + expandExpectedAlertsVariables(URL_FIRST); + setExpectedAlerts(getExpectedAlerts()[0]); + loadPageWithAlerts2(html); + + assertEquals(expectedRequestCount, getMockWebConnection().getRequestCount() - startCount); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"§§URL§§", "1"}) + public void resolveImageEmptySource() throws Exception { + try (InputStream is = getClass().getClassLoader().getResourceAsStream("testfiles/tiny-gif.img")) { + final byte[] directBytes = IOUtils.toByteArray(is); + final URL urlImage = new URL(URL_SECOND, "abcd/img.gif"); + final List emptyList = Collections.emptyList(); + getMockWebConnection().setResponse(urlImage, directBytes, 200, "ok", "image/gif", emptyList); + } + + final String html + = "\n" + + "\n" + + "\n" + + "\n" + + " \n" + + "\n" + + ""; + + final int startCount = getMockWebConnection().getRequestCount(); + final int expectedRequestCount = Integer.parseInt(getExpectedAlerts()[1]); + + expandExpectedAlertsVariables(URL_FIRST); + setExpectedAlerts(getExpectedAlerts()[0]); + loadPageWithAlerts2(html); + + assertEquals(expectedRequestCount, getMockWebConnection().getRequestCount() - startCount); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"", "1"}) + public void resolveImageNoSource() throws Exception { + try (InputStream is = getClass().getClassLoader().getResourceAsStream("testfiles/tiny-gif.img")) { + final byte[] directBytes = IOUtils.toByteArray(is); + final URL urlImage = new URL(URL_SECOND, "abcd/img.gif"); + final List emptyList = Collections.emptyList(); + getMockWebConnection().setResponse(urlImage, directBytes, 200, "ok", "image/gif", emptyList); + } + + final String html + = "\n" + + "\n" + + "\n" + + "\n" + + " \n" + + "\n" + + ""; + + final int startCount = getMockWebConnection().getRequestCount(); + final int expectedRequestCount = Integer.parseInt(getExpectedAlerts()[1]); + + expandExpectedAlertsVariables(URL_FIRST); + setExpectedAlerts(getExpectedAlerts()[0]); + loadPageWithAlerts2(html); + + assertEquals(expectedRequestCount, getMockWebConnection().getRequestCount() - startCount); + } + /** * @throws Exception if the test fails */ @@ -408,6 +567,88 @@ public void lineBreaksInUrl() throws Exception { loadPageWithAlerts2(html); } + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"", "§§URL§§abcd/img.gif"}) + public void setSrc() throws Exception { + final String html + = "\n" + + "\n" + + "\n" + + "\n" + + " \n" + + "\n" + + ""; + + expandExpectedAlertsVariables(URL_FIRST); + loadPageWithAlerts2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"", "§§URL§§abcd/img.gif", "1", "2"}) + @HtmlUnitNYI(CHROME = {"", "§§URL§§abcd/img.gif", "1", "1"}, + EDGE = {"", "§§URL§§abcd/img.gif", "1", "1"}, + FF = {"", "§§URL§§abcd/img.gif", "1", "1"}, + FF78 = {"", "§§URL§§abcd/img.gif", "1", "1"}, + IE = {"", "§§URL§§abcd/img.gif", "1", "1"}) + public void resolveImageOnChange() throws Exception { + try (InputStream is = getClass().getClassLoader().getResourceAsStream("testfiles/tiny-gif.img")) { + final byte[] directBytes = IOUtils.toByteArray(is); + final URL urlImage = new URL(URL_FIRST, "abcd/img.gif"); + final List emptyList = Collections.emptyList(); + getMockWebConnection().setResponse(urlImage, directBytes, 200, "ok", "image/gif", emptyList); + } + + final String html + = "\n" + + "\n" + + "\n" + + "\n" + + " \n" + + " \n" + + "\n" + + ""; + + final int startCount = getMockWebConnection().getRequestCount(); + final int expectedRequestCount = Integer.parseInt(getExpectedAlerts()[2]); + final int expectedRequestCount2 = Integer.parseInt(getExpectedAlerts()[3]); + + expandExpectedAlertsVariables(URL_FIRST); + final String secondUrl = getExpectedAlerts()[1]; + + setExpectedAlerts(getExpectedAlerts()[0]); + final WebDriver driver = loadPageWithAlerts2(html); + assertEquals(expectedRequestCount, getMockWebConnection().getRequestCount() - startCount); + + driver.findElement(By.id("myUpdate")).click(); + verifyAlerts(driver, secondUrl); + + Thread.sleep(400); // CHROME processes the image async + assertEquals(expectedRequestCount2, getMockWebConnection().getRequestCount() - startCount); + } + /** * @throws Exception if the test fails */ diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlImageTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlImageTest.java index 434a098bf..ca0228630 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlImageTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlImageTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInlineFrame2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInlineFrame2Test.java index 9267691d8..76e57146c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInlineFrame2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInlineFrame2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE; import java.net.URL; +import java.util.Map; import org.junit.Test; import org.junit.runner.RunWith; @@ -29,6 +30,7 @@ import org.openqa.selenium.htmlunit.HtmlUnitDriver; import com.gargoylesoftware.htmlunit.BrowserRunner; +import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; import com.gargoylesoftware.htmlunit.MockWebConnection; @@ -267,4 +269,40 @@ public void createIframeFromStrictFunction() throws Exception { loadPageWithAlerts2(html); } + + /** + * Check for the right referrer header. + * + * @throws Exception if the test fails + */ + @Test + @Alerts("§§URL§§index.html?test") + public void referrer() throws Exception { + final String framesContent = "\n" + + "Top Page\n" + + "\n" + + " \n" + + "\n" + + ""; + + final String iFrame = "\n" + + "\n" + + "Body\n" + + ""; + + expandExpectedAlertsVariables(URL_FIRST); + + final URL indexUrl = new URL(URL_FIRST.toString() + "index.html"); + final URL iFrameUrl = new URL(URL_FIRST.toString() + "iframe.html"); + + getMockWebConnection().setResponse(indexUrl, framesContent); + getMockWebConnection().setResponse(iFrameUrl, iFrame); + + loadPage2(framesContent, new URL(URL_FIRST.toString() + "index.html?test#ref")); + Thread.sleep(DEFAULT_WAIT_TIME / 10); + assertEquals(2, getMockWebConnection().getRequestCount()); + + final Map lastAdditionalHeaders = getMockWebConnection().getLastAdditionalHeaders(); + assertEquals(getExpectedAlerts()[0], lastAdditionalHeaders.get(HttpHeader.REFERER)); + } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInlineFrameTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInlineFrameTest.java index 2c56a76b5..2a7d21cdc 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInlineFrameTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInlineFrameTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInput2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInput2Test.java index edb5be4cc..25ad98e1f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInput2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInput2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInputTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInputTest.java index b07262a2b..facca3a5c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInputTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInputTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInsertedTextTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInsertedTextTest.java index ea4c46684..9c3194973 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInsertedTextTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlInsertedTextTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndex2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndex2Test.java index b96a10a27..4211f1794 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndex2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndex2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndexTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndexTest.java index 94e6d5537..a50962f0a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndexTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndexTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlItalicTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlItalicTest.java index 0a1f55ab1..4395fec82 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlItalicTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlItalicTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlLabel2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlLabel2Test.java index dffb2a6b2..978da0888 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlLabel2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlLabel2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlLabelTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlLabelTest.java index 581ec157c..1381fe7ef 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlLabelTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlLabelTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -775,11 +775,11 @@ public void clickForHidden() throws Exception { */ @Test @Alerts(DEFAULT = {"labelclick:label1", "parentclick:label1", "textfocus:text1", - "textclick:text1", "parentclick:text1"}, + "textclick:text1", "parentclick:text1"}, IE = {"labelclick:label1", "parentclick:label1", "textclick:text1", - "parentclick:text1", "textfocus:text1"}) + "parentclick:text1", "textfocus:text1"}) @HtmlUnitNYI(IE = {"labelclick:label1", "parentclick:label1", "textfocus:text1", - "textclick:text1", "parentclick:text1"}) + "textclick:text1", "parentclick:text1"}) public void clickForEventBubbling() throws Exception { final String html = "
\n" + "\n" + "\n" + ""; - final WebDriver driver = loadPageWithAlerts2(html); + final WebDriver driver = loadPageVerifyTitle2(html); if (driver instanceof HtmlUnitDriver) { final HtmlPage page = (HtmlPage) getWebWindowOf((HtmlUnitDriver) driver).getEnclosedPage(); assertTrue(HtmlLink.class.isInstance(page.getHtmlElementById("myId"))); @@ -112,7 +115,7 @@ public void isDisplayed() throws Exception { + "\n" + ""; - final WebDriver driver = loadPageWithAlerts2(html); + final WebDriver driver = loadPage2(html); final boolean displayed = driver.findElement(By.id("l")).isDisplayed(); assertFalse(displayed); } @@ -211,15 +214,18 @@ private void onLoadOnError(final String attribs) throws Exception { final String html = "\n" + "\n" + + " \n" + " \n" + + " onload='log(\"onLoad\")' onerror='log(\"onError\")'>\n" + "\n" - + "\n" + + "\n" + "\n" + ""; getMockWebConnection().setDefaultResponse("Error: not found", 404, "Not Found", MimeType.TEXT_HTML); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -439,14 +445,41 @@ public void testReloadAfterRemovalFromCache() throws Exception { public void polymerImportCheck() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("§§URL§§index.html?test") + public void getResponse_referer() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + ""; + + expandExpectedAlertsVariables(URL_FIRST); + + final URL indexUrl = new URL(URL_FIRST.toString() + "index.html"); + + getMockWebConnection().setResponse(indexUrl, html); + getMockWebConnection().setResponse(URL_SECOND, ""); + + loadPage2(html, new URL(URL_FIRST.toString() + "index.html?test#ref")); + + assertEquals(2, getMockWebConnection().getRequestCount()); + + final Map lastAdditionalHeaders = getMockWebConnection().getLastAdditionalHeaders(); + assertEquals(getExpectedAlerts()[0], lastAdditionalHeaders.get(HttpHeader.REFERER)); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlLinkTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlLinkTest.java index 074d5d7da..d47afcdb6 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlLinkTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlLinkTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,9 +21,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; -import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.SimpleWebTestCase; -import com.gargoylesoftware.htmlunit.WebResponse; /** * Tests for {@link HtmlLink}. @@ -34,24 +32,6 @@ @RunWith(BrowserRunner.class) public class HtmlLinkTest extends SimpleWebTestCase { - /** - * @throws Exception if the test fails - */ - @Test - public void getResponse_referer() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + ""; - - final HtmlPage page = loadPage(html); - - final HtmlLink link = page.getFirstByXPath("//link"); - final WebResponse respCss = link.getWebResponse(true); - assertEquals(page.getUrl().toExternalForm(), - respCss.getWebRequest().getAdditionalHeaders().get(HttpHeader.REFERER)); - } - /** * @throws Exception if an error occurs */ diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlListItemTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlListItemTest.java index 39217e4bc..eba83282d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlListItemTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlListItemTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMapTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMapTest.java index f2d7ce11d..b8fe0c337 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMapTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMapTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMenuTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMenuTest.java index dccd3167a..386f23204 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMenuTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMenuTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMetaTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMetaTest.java index 1bf312d45..108974e08 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMetaTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMetaTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlModificationTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlModificationTest.java index 1d538732e..00e363066 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlModificationTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlModificationTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMonthInput2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMonthInput2Test.java index e383d1109..f4abe5cd3 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMonthInput2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMonthInput2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMonthInputTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMonthInputTest.java index ba1b008cc..ce1d4d120 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMonthInputTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlMonthInputTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoFrames2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoFrames2Test.java index 6e932e180..033895099 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoFrames2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoFrames2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoFramesTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoFramesTest.java index 723ca063b..313500ec6 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoFramesTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoFramesTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoScript2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoScript2Test.java index a321e81ab..c0505356c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoScript2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoScript2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoScriptTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoScriptTest.java index dda9e101b..754eafcb1 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoScriptTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNoScriptTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInput2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInput2Test.java index cf6439ada..716db0387 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInput2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInput2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInputTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInputTest.java index 303551742..6049f80e5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInputTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlNumberInputTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,7 @@ import org.openqa.selenium.By; import org.openqa.selenium.InvalidElementStateException; import org.openqa.selenium.JavascriptException; +import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; @@ -30,6 +31,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.WebDriverTestCase; import com.gargoylesoftware.htmlunit.util.MimeType; @@ -38,6 +40,7 @@ * * @author Ronald Brill * @author Anton Demydenko + * @author Raik Bieniek */ @RunWith(BrowserRunner.class) public class HtmlNumberInputTest extends WebDriverTestCase { @@ -48,7 +51,7 @@ public class HtmlNumberInputTest extends WebDriverTestCase { */ @Test @Alerts("") - public void getVisibleText() throws Exception { + public void getVisibleTextInteger() throws Exception { final String htmlContent = "\n" + "\n" @@ -69,13 +72,39 @@ public void getVisibleText() throws Exception { } /** + * Verifies getVisibleText(). * @throws Exception if the test fails */ @Test - public void type() throws Exception { - final String html = ""; + @Alerts("") + public void getVisibleTextDouble() throws Exception { + final String htmlContent + = "\n" + + "\n" + + "\n" + + "
\n" + + " \n" + + "
\n" + + ""; + + final WebDriver driver = loadPage2(htmlContent); + final String text = driver.findElement(By.id("tester")).getText(); + assertEquals(getExpectedAlerts()[0], text); + + if (driver instanceof HtmlUnitDriver) { + final HtmlPage page = (HtmlPage) getWebWindowOf((HtmlUnitDriver) driver).getEnclosedPage(); + assertEquals(getExpectedAlerts()[0], page.getBody().getVisibleText()); + } + } + + /** + * @throws Exception if the test fails + */ + @Test + public void typeInteger() throws Exception { + final String html = ""; final WebDriver driver = loadPage2(html); - final WebElement t = driver.findElement(By.id("t")); + final WebElement t = driver.findElement(By.id("inpt")); t.sendKeys("123"); assertEquals("123", t.getAttribute("value")); t.sendKeys(Keys.BACK_SPACE); @@ -88,6 +117,242 @@ public void type() throws Exception { assertEquals("", t.getAttribute("value")); } + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"123", "true"}) + public void typeIntegerValid() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + " \n" + + " \n" + + "\n" + + ""; + final WebDriver driver = loadPage2(html); + + final WebElement input = driver.findElement(By.id("inpt")); + final WebElement check = driver.findElement(By.id("check")); + + input.sendKeys("123"); + assertEquals(getExpectedAlerts()[0], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[1], driver.getTitle()); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"12", "true", "123", "false"}) + public void typeIntegerTooLarge() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + " \n" + + " \n" + + "\n" + + ""; + final WebDriver driver = loadPage2(html); + + final WebElement input = driver.findElement(By.id("inpt")); + final WebElement check = driver.findElement(By.id("check")); + + input.sendKeys("12"); + assertEquals(getExpectedAlerts()[0], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[1], driver.getTitle()); + + input.sendKeys("3"); + assertEquals(getExpectedAlerts()[2], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[3], driver.getTitle()); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"12", "false", "123", "true"}) + public void typeIntegerTooSmall() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + " \n" + + " \n" + + "\n" + + ""; + final WebDriver driver = loadPage2(html); + + final WebElement input = driver.findElement(By.id("inpt")); + final WebElement check = driver.findElement(By.id("check")); + + input.sendKeys("12"); + assertEquals(getExpectedAlerts()[0], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[1], driver.getTitle()); + + input.sendKeys("3"); + assertEquals(getExpectedAlerts()[2], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[3], driver.getTitle()); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"1", "1--null-true", "1", "1--null-true", "1.2", "1.2--null-false"}, + FF = {"1", "1--null-true", "", "--null-false", "1.2", "1.2--null-false"}, + IE = {"1", "1--null-true", "1.", "1.--null-true", "1.2", "1.2--null-false"}) + @HtmlUnitNYI(CHROME = {"1", "1--null-true", "1.", "1.--null-true", "1.2", "1.2--null-false"}, + EDGE = {"1", "1--null-true", "1.", "1.--null-true", "1.2", "1.2--null-false"}, + FF = {"1", "1--null-true", "1.", "--null-false", "1.2", "1.2--null-false"}, + FF78 = {"1", "1--null-true", "1.", "1.--null-true", "1.2", "1.2--null-false"}) + public void typeIntegerWithDot() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + " \n" + + " \n" + + "\n" + + ""; + final WebDriver driver = loadPage2(html); + + final WebElement input = driver.findElement(By.id("inpt")); + final WebElement check = driver.findElement(By.id("check")); + + input.sendKeys("1"); + assertEquals(getExpectedAlerts()[0], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[1], driver.getTitle()); + + input.sendKeys("."); + assertEquals(getExpectedAlerts()[2], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[3], driver.getTitle()); + + input.sendKeys("2"); + assertEquals(getExpectedAlerts()[4], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[5], driver.getTitle()); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"", "--null-false", "-12", "-12--null-true", "-123", "-123--null-false"}, + IE = {"", "--null-true", "12", "12--null-true", "123", "123--null-true"}) + @HtmlUnitNYI(CHROME = {"-", "--null-false", "-12", "-12--null-true", "-123", "-123--null-false"}, + EDGE = {"-", "--null-false", "-12", "-12--null-true", "-123", "-123--null-false"}, + FF = {"-", "--null-false", "-12", "-12--null-true", "-123", "-123--null-false"}, + FF78 = {"-", "--null-false", "-12", "-12--null-true", "-123", "-123--null-false"}, + IE = {"-", "--null-false", "-12", "-12--null-true", "-123", "-123--null-false"}) + public void typeIntegerNegativeValid() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + " \n" + + " \n" + + "\n" + + ""; + final WebDriver driver = loadPage2(html); + + final WebElement input = driver.findElement(By.id("inpt")); + final WebElement check = driver.findElement(By.id("check")); + + input.sendKeys("-"); + assertEquals(getExpectedAlerts()[0], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[1], driver.getTitle()); + + input.sendKeys("12"); + assertEquals(getExpectedAlerts()[2], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[3], driver.getTitle()); + + input.sendKeys("3"); + assertEquals(getExpectedAlerts()[4], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[5], driver.getTitle()); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"", "--null-false", "-12", "-12--null-false"}, + IE = {"", "--null-true", "12", "12--null-true"}) + @HtmlUnitNYI(CHROME = {"-", "--null-false", "-12", "-12--null-false"}, + EDGE = {"-", "--null-false", "-12", "-12--null-false"}, + FF = {"-", "--null-false", "-12", "-12--null-false"}, + FF78 = {"-", "--null-false", "-12", "-12--null-false"}, + IE = {"-", "--null-false", "-12", "-12--null-false"}) + public void typeIntegerNegativeInvalid() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + " \n" + + " \n" + + "\n" + + ""; + final WebDriver driver = loadPage2(html); + + final WebElement input = driver.findElement(By.id("inpt")); + final WebElement check = driver.findElement(By.id("check")); + + input.sendKeys("-"); + assertEquals(getExpectedAlerts()[0], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[1], driver.getTitle()); + + input.sendKeys("12"); + assertEquals(getExpectedAlerts()[2], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[3], driver.getTitle()); + } + /** * @throws Exception if the test fails */ @@ -130,7 +395,8 @@ public void typeDoesNotChangeValueAttribute() throws Exception { + "\n" + "\n" + " \n" - + " \n" + ""; @@ -139,11 +405,11 @@ public void typeDoesNotChangeValueAttribute() throws Exception { final WebElement check = driver.findElement(By.id("check")); check.click(); - verifyAlerts(driver, getExpectedAlerts()[0]); + assertEquals(getExpectedAlerts()[0], driver.getTitle()); t.sendKeys("abc"); check.click(); - verifyAlerts(driver, getExpectedAlerts()[1]); + assertEquals(getExpectedAlerts()[1], driver.getTitle()); } /** @@ -156,7 +422,8 @@ public void typeDoesNotChangeValueAttributeWithInitialValue() throws Exception { + "\n" + "\n" + " \n" - + " \n" + ""; @@ -165,11 +432,11 @@ public void typeDoesNotChangeValueAttributeWithInitialValue() throws Exception { final WebElement check = driver.findElement(By.id("check")); check.click(); - verifyAlerts(driver, getExpectedAlerts()[0]); + assertEquals(getExpectedAlerts()[0], driver.getTitle()); t.sendKeys("987"); check.click(); - verifyAlerts(driver, getExpectedAlerts()[1]); + assertEquals(getExpectedAlerts()[1], driver.getTitle()); } /** @@ -232,10 +499,16 @@ public void preventDefault_OnKeyPress() throws Exception { @Test public void typeOnChange() throws Exception { final String html = - "\n" - + "\n" + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + "\n" + ""; @@ -248,7 +521,7 @@ public void typeOnChange() throws Exception { // trigger lost focus driver.findElement(By.id("b")).click(); final String[] expectedAlerts1 = {"foo", "change", "boo", "blur"}; - assertEquals(expectedAlerts1, getCollectedAlerts(driver, 4)); + verifyTitle2(driver, expectedAlerts1); // set only the focus but change nothing p.click(); @@ -256,8 +529,8 @@ public void typeOnChange() throws Exception { // trigger lost focus driver.findElement(By.id("b")).click(); - final String[] expectedAlerts2 = {"boo", "blur"}; - assertEquals(expectedAlerts2, getCollectedAlerts(driver, 2)); + final String[] expectedAlerts2 = {"foo", "change", "boo", "blur", "boo", "blur"}; + verifyTitle2(driver, expectedAlerts2); } /** @@ -267,22 +540,25 @@ public void typeOnChange() throws Exception { public void setValueOnChange() throws Exception { final String html = "\n" - + "\n" + + "\n" + + "\n" + + "\n" + "\n" + " \n" + + " onChange='log(\"foo\");log(event.type);'>\n" + " \n" + " \n" + ""; final WebDriver driver = loadPage2(html); driver.findElement(By.id("set")).click(); - - assertEquals(Collections.emptyList(), getCollectedAlerts(driver)); + verifyTitle2(driver, new String[]{}); // trigger lost focus driver.findElement(By.id("b")).click(); - assertEquals(Collections.emptyList(), getCollectedAlerts(driver)); + verifyTitle2(driver, new String[]{}); } /** @@ -292,10 +568,14 @@ public void setValueOnChange() throws Exception { public void setDefaultValueOnChange() throws Exception { final String html = "\n" - + "\n" + + "" + + "\n" + + "\n" + "\n" + " \n" + + " onChange='log(\"foo\");log(event.type);'>\n" + " \n" + " \n" @@ -303,43 +583,181 @@ public void setDefaultValueOnChange() throws Exception { final WebDriver driver = loadPage2(html); driver.findElement(By.id("set")).click(); - - assertEquals(Collections.emptyList(), getCollectedAlerts(driver)); + verifyTitle2(driver, new String[]{}); // trigger lost focus driver.findElement(By.id("b")).click(); - assertEquals(Collections.emptyList(), getCollectedAlerts(driver)); + verifyTitle2(driver, new String[]{}); } /** * @throws Exception if the test fails */ @Test - @Alerts({"--null", "--null", "--null"}) + @Alerts({"--null-true", "--null-true", "--null-true"}) public void defaultValues() throws Exception { - final String html = "foo\n" + final String html = "\n" + "\n" - + "\n" + + "\n" + + "\n" + "
\n" - + " \n" + + " \n" + "
\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); + } + + @Test + @Alerts(DEFAULT = {"8-8-8-true", "-abc-abc-true", "---true", + "99999999999999999999999999999-99999999999999999999999999999" + + "-99999999999999999999999999999-true"}, + IE = {"8-8-8-true", "---true", "---true", + "99999999999999999999999999999-99999999999999999999999999999-99999999999999999999999999999-true"}) + @HtmlUnitNYI(IE = {"8-8-8-true", "-abc-abc-true", "---true", + "99999999999999999999999999999-99999999999999999999999999999" + + "-99999999999999999999999999999-true"}) + public void defaultValuesInvalidValue() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + @Test + @Alerts({"8-8-8-true", "7-7-7-false", "6-6-6-false"}) + public void defaultValuesIntegerValueOutside() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + " \n" + + " \n" + + " \n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + @Test + @Alerts({"8-8-8-true", "7-7-7-false", "7.13-7.13-7.13-false"}) + public void defaultValuesInvalid() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + " \n" + + " \n" + + " \n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); } /** @@ -348,32 +766,33 @@ public void defaultValues() throws Exception { @Test @Alerts({"--null", "--null", "--null"}) public void defaultValuesAfterClone() throws Exception { - final String html = "foo\n" + final String html = "\n" + "\n" + "\n" + "
\n" - + " \n" + + " \n" + "
\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -384,26 +803,27 @@ public void defaultValuesAfterClone() throws Exception { "5678-1234-1234", "5678-1234-1234", "5678-2345-2345", "5678-2345-2345"}) public void resetByClick() throws Exception { - final String html = "foo\n" + final String html = "\n" + "\n" + "\n" @@ -413,7 +833,7 @@ public void resetByClick() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -424,26 +844,27 @@ public void resetByClick() throws Exception { "5678-1234-1234", "5678-1234-1234", "5678-2345-2345", "5678-2345-2345"}) public void resetByJS() throws Exception { - final String html = "foo\n" + final String html = "\n" + "\n" + "\n" @@ -452,43 +873,439 @@ public void resetByJS() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** * @throws Exception if the test fails */ @Test - @Alerts({"1234-1234-1234", "2345-2345-2345", - "3456-2345-2345", "3456-9876-9876", - "3456-44-44"}) + @Alerts({"1234-1234-1234-true", "2345-2345-2345-true", + "3456-2345-2345-true", "3456-9876-9876-true", + "3456-44-44-true"}) public void value() throws Exception { - final String html = "foo\n" + final String html = "\n" + "\n" + + "\n" + + "
\n" + + " \n" + + "
\n" + + ""; - + " text.defaultValue = '2345';\n" - + " alert(text.value + '-' + text.defaultValue + '-' + text.getAttribute('value'));\n" + loadPageVerifyTitle2(html); + } - + " text.value = '3456';\n" - + " alert(text.value + '-' + text.defaultValue + '-' + text.getAttribute('value'));\n" - + " text.setAttribute('value', '9876');\n" - + " alert(text.value + '-' + text.defaultValue + '-' + text.getAttribute('value'));\n" + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"123-123-123-true", "2-2-2-false", "20000-2-2-false", "20000-9-9-false"}, + IE = {"123-123-123-true", "2-2-2-true", "20000-2-2-false", "20000-9-9-false"}) + @HtmlUnitNYI(IE = {"123-123-123-true", "2-2-2-false", "20000-2-2-false", "20000-9-9-false"}) + public void valueOutside() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "
\n" + + " \n" + + "
\n" + + ""; + + loadPageVerifyTitle2(html); + } - + " text.defaultValue = '44';\n" - + " alert(text.value + '-' + text.defaultValue + '-' + text.getAttribute('value'));\n" + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"12-12-12-true", "12312", "12312-12-12-false"}) + public void typeValueOutside() throws Exception { + final String html = "\n" + + "\n" + "\n" + "
\n" - + " \n" + + " \n" + + " \n" + "
\n" + ""; - loadPageWithAlerts2(html); + final WebDriver driver = loadPage2(html); + assertEquals(getExpectedAlerts()[0], driver.getTitle()); + + final WebElement t = driver.findElement(By.id("testId")); + t.sendKeys(Keys.HOME); + t.sendKeys("123"); + assertEquals(getExpectedAlerts()[1], t.getAttribute("value")); + + driver.findElement(By.id("testBtn")).click(); + assertEquals(getExpectedAlerts()[2], driver.getTitle()); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"2-2-2-false", "42", "42-2-2-false"}) + public void typeValueNotReachableByStep() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "
\n" + + " \n" + + " \n" + + "
\n" + + ""; + + final WebDriver driver = loadPage2(html); + assertEquals(getExpectedAlerts()[0], driver.getTitle()); + + final WebElement t = driver.findElement(By.id("testId")); + t.sendKeys(Keys.HOME); + t.sendKeys("4"); + assertEquals(getExpectedAlerts()[1], t.getAttribute("value")); + + driver.findElement(By.id("testBtn")).click(); + assertEquals(getExpectedAlerts()[2], driver.getTitle()); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"2.1-2.1-2.1-false", "42.1", "42.1-2.1-2.1-false"}) + public void typeValueNotReachableByStepDouble() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "
\n" + + " \n" + + " \n" + + "
\n" + + ""; + + final WebDriver driver = loadPage2(html); + assertEquals(getExpectedAlerts()[0], driver.getTitle()); + + final WebElement t = driver.findElement(By.id("testId")); + t.sendKeys(Keys.HOME); + t.sendKeys("4"); + assertEquals(getExpectedAlerts()[1], t.getAttribute("value")); + + driver.findElement(By.id("testBtn")).click(); + assertEquals(getExpectedAlerts()[2], driver.getTitle()); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"--null-true", "4", "4--null-true", "4", "4--null-true"}, + FF = {"--null-true", "4", "4--null-true", "", "--null-false"}, + FF78 = {"--null-true", "4", "4--null-true", "", "--null-false"}, + IE = {"--null-true", "4", "4--null-true", "4a", "4a--null-true"}) + @HtmlUnitNYI(FF = {"--null-true", "4", "4--null-true", "4a", "--null-false"}, + FF78 = {"--null-true", "4", "4--null-true", "4a", "--null-false"}, + IE = {"--null-true", "4", "4--null-true", "4a", "--null-false"}) + public void typeInvalidChars() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "
\n" + + " \n" + + " \n" + + "
\n" + + ""; + + final WebDriver driver = loadPage2(html); + assertEquals(getExpectedAlerts()[0], driver.getTitle()); + + final WebElement t = driver.findElement(By.id("testId")); + t.sendKeys(Keys.END, "4"); + assertEquals(getExpectedAlerts()[1], t.getAttribute("value")); + + driver.findElement(By.id("testBtn")).click(); + assertEquals(getExpectedAlerts()[2], driver.getTitle()); + + t.sendKeys(Keys.END, "a"); + assertEquals(getExpectedAlerts()[3], t.getAttribute("value")); + + driver.findElement(By.id("testBtn")).click(); + assertEquals(getExpectedAlerts()[4], driver.getTitle()); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"120", "120-0-0-true", "", "-0-0-true", "", "-0-0-true"}, + FF = {"120", "120-0-0-true", "", "-0-0-true", "", "-0-0-false"}, + FF78 = {"120", "120-0-0-true", "", "-0-0-true", "", "-0-0-false"}, + IE = {"012", "012-0-0-true", "", "-0-0-true", "", "-0-0-true"}) + @HtmlUnitNYI(FF = {"120", "120-0-0-true", "", "-0-0-true", "abc", "-0-0-false"}, + FF78 = {"120", "120-0-0-true", "", "-0-0-true", "abc", "-0-0-false"}, + IE = {"120", "120-0-0-true", "", "-0-0-true", "abc", "-0-0-false"}) + public void typeCharsAndClear() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + " \n" + + " \n" + + "\n" + + ""; + final WebDriver driver = loadPage2(html); + + final WebElement input = driver.findElement(By.id("inpt")); + final WebElement check = driver.findElement(By.id("check")); + + input.sendKeys("12"); + assertEquals(getExpectedAlerts()[0], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[1], driver.getTitle()); + + input.clear(); + assertEquals(getExpectedAlerts()[2], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[3], driver.getTitle()); + + input.sendKeys("abc"); + assertEquals(getExpectedAlerts()[4], input.getAttribute("value")); + check.click(); + assertEquals(getExpectedAlerts()[5], driver.getTitle()); + } + + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "-0-0-true", + FF = "-0-0-false", + FF78 = "-0-0-false") + @HtmlUnitNYI(IE = "-0-0-false") + public void issue321() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + " \n" + + " \n" + + "\n" + + ""; + final WebDriver driver = loadPage2(html); + + final WebElement input = driver.findElement(By.id("inpt")); + + input.clear(); + input.sendKeys("abc"); + ((JavascriptExecutor) driver).executeScript("test();"); + verifyTitle2(driver, getExpectedAlerts()); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"13-13-13-true", "15-15-15-false", "17-15-15-false", "17-19-19-false"}, + IE = {"13-13-13-true", "15-15-15-true", "17-15-15-false", "17-19-19-false"}) + @HtmlUnitNYI(IE = {"13-13-13-true", "15-15-15-false", "17-15-15-false", "17-19-19-false"}) + public void valueNotReachableByStep() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "
\n" + + " \n" + + "
\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"1.3-1.3-1.3-true", "1.5-1.5-1.5-false", "1.7-1.5-1.5-false", "1.7-1.9-1.9-false"}, + IE = {"1.3-1.3-1.3-true", "1.5-1.5-1.5-true", "1.7-1.5-1.5-false", "1.7-1.9-1.9-false"}) + @HtmlUnitNYI(IE = {"1.3-1.3-1.3-true", "1.5-1.5-1.5-false", "1.7-1.5-1.5-false", "1.7-1.9-1.9-false"}) + public void valueNotReachableByStepDouble() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "
\n" + + " \n" + + "
\n" + + ""; + + loadPageVerifyTitle2(html); } /** @@ -499,14 +1316,15 @@ public void value() throws Exception { FF = "7", FF78 = "7") public void textLength() throws Exception { - final String html = "foo\n" + final String html = "\n" + "\n" @@ -516,7 +1334,7 @@ public void textLength() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -528,22 +1346,24 @@ public void selection() throws Exception { final String html = "\n" + "\n" + "\n" - + " \n" + + " \n" + ""; - loadPageWithAlerts2(html); + + loadPageVerifyTitle2(html); } /** @@ -551,7 +1371,7 @@ public void selection() throws Exception { */ @Test @Alerts(DEFAULT = {"null,null", "null,null", "exception", - "null,null", "exception", "null,null"}, + "null,null", "exception", "null,null"}, IE = {"0,0", "0,0", "3,3", "3,10"}) public void selection2_1() throws Exception { selection2(3, 10); @@ -562,7 +1382,7 @@ public void selection2_1() throws Exception { */ @Test @Alerts(DEFAULT = {"null,null", "null,null", "exception", - "null,null", "exception", "null,null"}, + "null,null", "exception", "null,null"}, IE = {"0,0", "0,0", "0,0", "0,11"}) public void selection2_2() throws Exception { selection2(-3, 15); @@ -573,7 +1393,7 @@ public void selection2_2() throws Exception { */ @Test @Alerts(DEFAULT = {"null,null", "null,null", "exception", - "null,null", "exception", "null,null"}, + "null,null", "exception", "null,null"}, IE = {"0,0", "0,0", "10,10", "5,5"}) public void selection2_3() throws Exception { selection2(10, 5); @@ -584,34 +1404,36 @@ private void selection2(final int selectionStart, final int selectionEnd) throws + "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + + loadPageVerifyTitle2(html); } /** @@ -625,30 +1447,32 @@ public void selectionOnUpdate() throws Exception { + "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + + loadPageVerifyTitle2(html); } /** @@ -719,9 +1543,10 @@ public void minMaxStep() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -732,7 +1557,7 @@ public void minMaxStep() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -763,10 +1588,11 @@ public void maxValidation() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -776,7 +1602,7 @@ public void maxValidation() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } @Test @@ -785,10 +1611,11 @@ public void minValidation() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -798,6 +1625,6 @@ public void minValidation() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlObject2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlObject2Test.java index f7ed5597b..5b1e517ce 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlObject2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlObject2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlObjectTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlObjectTest.java index 4d12f6ff8..ba5ffe18a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlObjectTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlObjectTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOption2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOption2Test.java index fbfe05ed1..fc8bf446b 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOption2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOption2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,10 +14,6 @@ */ package com.gargoylesoftware.htmlunit.html; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.CHROME; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.EDGE; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE; - import java.util.Arrays; import java.util.List; @@ -31,7 +27,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; import com.gargoylesoftware.htmlunit.BrowserRunner.BuggyWebDriver; -import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.WebDriverTestCase; /** @@ -49,14 +45,19 @@ public class HtmlOption2Test extends WebDriverTestCase { */ @Test @Alerts(DEFAULT = {"option1", "", "Number Three", "Number 4", - "option1\nNumber Three\nNumber 4"}, - CHROME = {"option1", " ", "Number Three", "Number 4", - " option1\n \n Number Three\n Number 4\n "}, - EDGE = {"option1", " ", "Number Three", "Number 4", - " option1\n \n Number Three\n Number 4\n "}, + "option1\nNumber Three\nNumber 4"}, + CHROME = {"option1", "", "Number Three", "Number 4", + " option1\n Number Three\n Number 4\n "}, + EDGE = {"option1", "", "Number Three", "Number 4", + " option1\n Number Three\n Number 4\n "}, + IE = {"option1", "", "Number Three", "Number 4", + "option1 Number Three Number 4"}) + @HtmlUnitNYI(CHROME = {"option1", "", "Number Three", "Number 4", + "option1\nNumber Three\nNumber 4"}, + EDGE = {"option1", "", "Number Three", "Number 4", + "option1\nNumber Three\nNumber 4"}, IE = {"option1", "", "Number Three", "Number 4", - "option1 Number Three Number 4"}) - @NotYetImplemented({CHROME, EDGE, IE}) + "option1\nNumber Three\nNumber 4"}) public void getVisibleText() throws Exception { final String htmlContent = "\n" diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOptionGroup2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOptionGroup2Test.java index c9626eeec..fc8874393 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOptionGroup2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOptionGroup2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOptionGroupTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOptionGroupTest.java index 3dcce45f8..19dda98c8 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOptionGroupTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOptionGroupTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOptionTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOptionTest.java index 4026ccb0e..c4d92b46e 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOptionTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOptionTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOrderedList2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOrderedList2Test.java index 8c54064f6..6d6e3b6b4 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOrderedList2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOrderedList2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOrderedListTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOrderedListTest.java index 2ef34a4fe..b1b2e3fea 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOrderedListTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlOrderedListTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPage2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPage2Test.java index 317ebb000..9d0d812ad 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPage2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPage2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -58,111 +58,6 @@ public class HtmlPage2Test extends SimpleWebTestCase { @Rule public final TemporaryFolder tmpFolderProvider_ = new TemporaryFolder(); - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("25") - public void loadExternalJavaScript() throws Exception { - final String html = - "\n" - + "\n" - + "\n" - + ""; - - final String js = "function squared(n) {return n * n}"; - - final WebClient webClient = getWebClient(); - final MockWebConnection webConnection = new MockWebConnection(); - - webConnection.setResponse(URL_FIRST, html); - webConnection.setResponse(new URL(URL_FIRST, "js.js"), js); - webClient.setWebConnection(webConnection); - - final List collectedAlerts = new ArrayList<>(); - webClient.setAlertHandler(new CollectingAlertHandler(collectedAlerts)); - - webClient.getPage(URL_FIRST); - assertEquals(getExpectedAlerts(), collectedAlerts); - } - - /** - * Differs from {@link #loadExternalJavaScript()} by the absolute reference of the javascript source. - * @throws Exception if the test fails - */ - @Test - @Alerts("25") - public void loadExternalJavaScript_absolute() throws Exception { - final String html = - "\n" - + "\n" - + "\n" - + ""; - - final String js = "function squared(n) {return n * n}"; - - final WebClient webClient = getWebClient(); - final MockWebConnection webConnection = new MockWebConnection(); - - webConnection.setResponse(URL_FIRST, html); - webConnection.setResponse(URL_SECOND, js); - webClient.setWebConnection(webConnection); - - final List collectedAlerts = new ArrayList<>(); - webClient.setAlertHandler(new CollectingAlertHandler(collectedAlerts)); - - webClient.getPage(URL_FIRST); - assertEquals(getExpectedAlerts(), collectedAlerts); - } - /** * @throws Exception if the test fails */ diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPage3Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPage3Test.java index 72da10996..0b81bc9cd 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPage3Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPage3Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,7 +19,9 @@ import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE; import static java.nio.charset.StandardCharsets.ISO_8859_1; +import java.net.URL; import java.util.List; +import java.util.Map; import org.junit.Assert; import org.junit.Test; @@ -32,6 +34,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.WebDriverTestCase; import com.gargoylesoftware.htmlunit.util.MimeType; @@ -39,6 +42,7 @@ * Tests for {@link HtmlPage}. * * @author Ahmed Ashour + * @author Marc Guillemot * @author Ronald Brill * @author Frank Danek * @author Joerg Werner @@ -393,7 +397,7 @@ public void basePathWhitespaceOnly() throws Exception { */ @Test @Alerts({"[object SVGSVGElement]", "http://www.w3.org/2000/svg", - "[object SVGRectElement]", "http://www.w3.org/2000/svg"}) + "[object SVGRectElement]", "http://www.w3.org/2000/svg"}) public void htmlPageEmbeddedSvgWithoutNamespace() throws Exception { final String content = "\n" @@ -514,4 +518,103 @@ public void readyStateInDOMContentLoaded() throws Exception { loadPageWithAlerts2(html); } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("25") + public void loadExternalJavaScript() throws Exception { + final String html = + "\n" + + "\n" + + "\n" + + ""; + + final String js = "function squared(n) {return n * n}"; + + getMockWebConnection().setResponse(URL_FIRST, html); + getMockWebConnection().setResponse(new URL(URL_FIRST, "js.js"), js); + + loadPageWithAlerts2(URL_FIRST); + + assertEquals(2, getMockWebConnection().getRequestCount()); + + final Map lastAdditionalHeaders = getMockWebConnection().getLastAdditionalHeaders(); + assertNull(lastAdditionalHeaders.get(HttpHeader.REFERER)); + } + + /** + * Differs from {@link #loadExternalJavaScript()} by the absolute reference of the javascript source. + * @throws Exception if the test fails + */ + @Test + @Alerts("25") + public void loadExternalJavaScript_absolute() throws Exception { + final String html = + "\n" + + "\n" + + "\n" + + ""; + + final String js = "function squared(n) {return n * n}"; + + getMockWebConnection().setResponse(URL_FIRST, html); + getMockWebConnection().setResponse(URL_SECOND, js); + + loadPageWithAlerts2(URL_FIRST); + + assertEquals(2, getMockWebConnection().getRequestCount()); + + final Map lastAdditionalHeaders = getMockWebConnection().getLastAdditionalHeaders(); + assertNull(lastAdditionalHeaders.get(HttpHeader.REFERER)); + } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPage4Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPage4Test.java index 5d01df3fd..ca8a95d92 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPage4Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPage4Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPageTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPageTest.java index a1a0fcee2..46bf4c3b4 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPageTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPageTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -79,13 +79,6 @@ public class HtmlPageTest extends SimpleWebTestCase { public static final String STANDARDS_MODE_PREFIX_ = "\n"; - /** List of all HTML tags.*/ - public static final List HTML_TAGS_ = new ArrayList<>(DefaultElementFactory.SUPPORTED_TAGS_); - - static { - HTML_TAGS_.add(HtmlInput.TAG_NAME); - } - /** * @throws Exception if the test fails */ diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlParagraphTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlParagraphTest.java index c36a962a9..75210a037 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlParagraphTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlParagraphTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlParameterTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlParameterTest.java index a0fc5588f..9b933c198 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlParameterTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlParameterTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPasswordInput2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPasswordInput2Test.java index c88b3efc2..a51cddfb5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPasswordInput2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPasswordInput2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPasswordInputTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPasswordInputTest.java index 31b09068a..81774768f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPasswordInputTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPasswordInputTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPreformattedText2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPreformattedText2Test.java index 540eade18..907b16f75 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPreformattedText2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPreformattedText2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPreformattedTextTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPreformattedTextTest.java index 07b9eea73..7e5b789f5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPreformattedTextTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlPreformattedTextTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlProgressTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlProgressTest.java index 0557724e2..88a87af0d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlProgressTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlProgressTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlQuoteTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlQuoteTest.java index 551dd88ef..efebca292 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlQuoteTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlQuoteTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRadioButtonInput2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRadioButtonInput2Test.java index b67e83ebd..d350c584e 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRadioButtonInput2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRadioButtonInput2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -350,6 +350,7 @@ private void performTest(final boolean checked, + "\n" + "\n" + " \n" + "\n" @@ -427,7 +428,7 @@ private void performTest(final boolean checked, + "
\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -441,19 +442,20 @@ public void defaultChecked() throws Exception { + "\n" + "\n" + " \n" + "\n" @@ -463,7 +465,7 @@ public void defaultChecked() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -477,19 +479,20 @@ public void defaultChecked_notchecked() throws Exception { + "\n" + "\n" + " \n" + "\n" @@ -499,7 +502,7 @@ public void defaultChecked_notchecked() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -515,12 +518,13 @@ public void checkedOnXmlResponse() throws Exception { HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" + ""; @@ -532,7 +536,7 @@ public void checkedOnXmlResponse() throws Exception { + ""; getMockWebConnection().setDefaultResponse(xml, MimeType.TEXT_XML); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -700,23 +704,24 @@ public void defaultState() throws Exception { public void defaultValues() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -726,7 +731,7 @@ public void defaultValues() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -737,27 +742,28 @@ public void defaultValues() throws Exception { public void defaultValuesAfterClone() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -767,7 +773,7 @@ public void defaultValuesAfterClone() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -779,26 +785,27 @@ public void defaultValuesAfterClone() throws Exception { public void resetByClick() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -808,7 +815,7 @@ public void resetByClick() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -820,26 +827,27 @@ public void resetByClick() throws Exception { public void resetByJS() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -848,7 +856,7 @@ public void resetByJS() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -859,19 +867,20 @@ public void resetByJS() throws Exception { public void defaultValue() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -880,7 +889,7 @@ public void defaultValue() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -893,8 +902,9 @@ public void defaultValue() throws Exception { public void clickShouldTriggerOnchange() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" + "
\n" - + " Check me\n" + + " Check me\n" + " \n" + "
\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -928,17 +938,18 @@ public void radioInputChecked() throws Exception { + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -949,20 +960,21 @@ public void radioInputChecked() throws Exception { public void checkedAttribute() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -987,7 +999,7 @@ public void checkedAttribute() throws Exception { driver.findElement(By.id("r3")).click(); driver.findElement(By.id("clickMe")).click(); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -995,48 +1007,49 @@ public void checkedAttribute() throws Exception { */ @Test @Alerts({"false", "null", "true", "null", "false", "null", "true", "", "false", "", - "true", "", "true", "yes", "false", "yes", "true", "yes"}) + "true", "", "true", "yes", "false", "yes", "true", "yes"}) public void checkedAttributeJS() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -1054,7 +1067,7 @@ public void checkedAttributeJS() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1062,36 +1075,37 @@ public void checkedAttributeJS() throws Exception { */ @Test @Alerts({"false", "null", "false", "null", "true", "", "true", "", - "true", "yes", "true", "yes"}) + "true", "yes", "true", "yes"}) public void defaultCheckedAttribute() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + + "\n" + "\n" + "\n" @@ -1109,7 +1123,7 @@ public void defaultCheckedAttribute() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1179,9 +1193,10 @@ public void minMaxStep() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -1192,6 +1207,6 @@ public void minMaxStep() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRadioButtonInputTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRadioButtonInputTest.java index f4795149d..a9f465f9f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRadioButtonInputTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRadioButtonInputTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRangeInput2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRangeInput2Test.java index c6fcb22d5..2699d98a4 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRangeInput2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRangeInput2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRangeInputTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRangeInputTest.java index b580a7620..f414cd00d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRangeInputTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRangeInputTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlResetInput2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlResetInput2Test.java index 7cfa36ebe..c78890f18 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlResetInput2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlResetInput2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlResetInputTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlResetInputTest.java index 19b6d9479..99473d8f4 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlResetInputTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlResetInputTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRpTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRpTest.java index b0a15bae8..8f40de063 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRpTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRpTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRtTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRtTest.java index 52c68260b..b365517b9 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRtTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlRtTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlScript2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlScript2Test.java index cff19efe3..c1dc6d8d4 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlScript2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlScript2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,6 +18,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; import java.net.URL; +import java.util.Map; import org.apache.commons.io.ByteOrderMark; import org.apache.http.HttpStatus; @@ -28,6 +29,8 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; +import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.WebDriverTestCase; import com.gargoylesoftware.htmlunit.util.MimeType; @@ -51,20 +54,21 @@ public class HtmlScript2Test extends WebDriverTestCase { @Alerts("myValue") public void insertBefore() throws Exception { final String html - = "Page A\n" + = "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -76,19 +80,20 @@ public void addedFromDocumentFragment() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -99,15 +104,16 @@ public void addedFromDocumentFragment() throws Exception { public void simpleScriptable() throws Exception { final String html = "\n" + "\n" + "\n" + " \n" + ""; - final WebDriver driver = loadPageWithAlerts2(html); + final WebDriver driver = loadPageVerifyTitle2(html); assertEquals("script", driver.findElement(By.id("myId")).getTagName()); } @@ -120,11 +126,12 @@ public void type_case_sensitivity() throws Exception { final String html = "\n" + "\n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -134,27 +141,32 @@ public void type_case_sensitivity() throws Exception { @Test @Alerts({"1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G"}) public void typeValues() throws Exception { - final String html = "\n" + final String html = "" + + "\n" + + "\n" + + "\n" + "\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -164,31 +176,36 @@ public void typeValues() throws Exception { @Alerts({"1", "5", "7"}) public void type_language() throws Exception { final String html = "\n" + + "\n" + + "\n" + + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -199,26 +216,166 @@ public void type_language() throws Exception { @Test @Alerts("a") public void scriptIsNotRunWhenCloned() throws Exception { - final String html = "\n" - + ""; + final String html = "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** * @throws Exception if an error occurs */ @Test - @Alerts({"deferred", "normal", "onload"}) - public void defer() throws Exception { - final String html = "\n" - + "\n" - + "\n" + @Alerts({"deferred", "start", "dcl listener added", "end", "dcLoaded", "onload"}) + public void deferInline() throws Exception { + final String html = "\n" + + "\n" + + " \n" + + " \n" + + " " + + " " + + " \n" + "\n" - + "test\n" + + "\n" + + "\n" + + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts({"start", "dcl listener added", "end", "deferred-1", "deferred-2", "deferred-3", "dcLoaded", "onload"}) + public void deferExternal() throws Exception { + final String html = "\n" + + "\n" + + " \n" + + " \n" + + " " + + " " + + " \n" + + " \n" + + "\n" + + "\n" + + "
Test
\n" + + "\n" + + "\n" + + "\n" + + ""; + + getMockWebConnection().setResponse(new URL(URL_FIRST, "script1.js"), "log('deferred-1');"); + getMockWebConnection().setResponse(new URL(URL_FIRST, "script2.js"), "log('deferred-2');"); + getMockWebConnection().setResponse(new URL(URL_FIRST, "script3.js"), "log('deferred-3');"); + + loadPageVerifyTitle2(html); + } + + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts(DEFAULT = {"dcl listener added", "head-end", "end", + "deferred-2", "deferred-1", "deferred-3", "dcLoaded", "onload"}, + CHROME = {"dcl listener added", "head-end", "end", + "deferred-1", "deferred-3", "dcLoaded", "deferred-2", "onload"}, + EDGE = {"dcl listener added", "head-end", "end", + "deferred-1", "deferred-3", "dcLoaded", "deferred-2", "onload"}, + IE = {"dcl listener added", "head-end", "deferred-2", "end", + "deferred-1", "deferred-3", "dcLoaded", "onload"}) + @HtmlUnitNYI(CHROME = {"dcl listener added", "head-end", "end", + "deferred-1", "deferred-2", "deferred-3", "dcLoaded", "onload"}, + EDGE = {"dcl listener added", "head-end", "end", + "deferred-1", "deferred-2", "deferred-3", "dcLoaded", "onload"}, + FF = {"dcl listener added", "head-end", "end", + "deferred-1", "deferred-2", "deferred-3", "dcLoaded", "onload"}, + FF78 = {"dcl listener added", "head-end", "end", + "deferred-1", "deferred-2", "deferred-3", "dcLoaded", "onload"}, + IE = {"dcl listener added", "head-end", "end", + "deferred-1", "deferred-2", "deferred-3", "dcLoaded", "onload"}) + public void deferDynamicExternal() throws Exception { + final String html = "\n" + + "\n" + + " " + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "\n" + + "\n" + + "
Test
\n" + + "\n" + + "\n" + + ""; + + getMockWebConnection().setResponse(new URL(URL_FIRST, "script1.js"), "log('deferred-1');"); + getMockWebConnection().setResponse(new URL(URL_FIRST, "script2.js"), "log('deferred-2');"); + getMockWebConnection().setResponse(new URL(URL_FIRST, "script3.js"), "log('deferred-3');"); + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts(DEFAULT = {"end", "s0 6", "5", "deferred-1", "deferred-2", "deferred-3", "onload"}, + IE = {"end", "s0 6", "5", "deferred-1", "deferred-2", "onload"}) + @HtmlUnitNYI(IE = {"end", "s0 6", "5", "deferred-1", "deferred-2", "deferred-3", "onload"}) + public void deferRemovesScript() throws Exception { + final String html = "\n" + + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "\n" + + "\n" + + "\n" + + "\n" + + ""; + + getMockWebConnection().setResponse(new URL(URL_FIRST, "script0.js"), + "log('s0 ' + document.getElementsByTagName('script').length);\n" + + "var scr = document.getElementById('s3');\n" + + "scr.parentNode.removeChild(scr);\n" + + " log(document.getElementsByTagName('script').length);\n"); + getMockWebConnection().setResponse(new URL(URL_FIRST, "script1.js"), "log('deferred-1');"); + getMockWebConnection().setResponse(new URL(URL_FIRST, "script2.js"), "log('deferred-2');"); + getMockWebConnection().setResponse(new URL(URL_FIRST, "script3.js"), "log('deferred-3');"); + + loadPageVerifyTitle2(html); } /** @@ -231,17 +388,18 @@ public void appendChild_newIdAndScriptAddedInOnce() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -253,18 +411,19 @@ public void executesMultipleTextNodes() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -276,6 +435,7 @@ public void getTextMultipleTextNodes() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -300,17 +460,18 @@ public void setTextMultipleTextNodes() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -323,9 +484,11 @@ public void settingSrcAttribute() throws Exception { final String html = "\n" + " \n" - + " Test\n" + + " \n" + " \n" - + " \n" + + " \n" + " \n" + " \n" @@ -380,7 +544,7 @@ public void addEventListener_load() throws Exception { + ""; getMockWebConnection().setDefaultResponse("", MimeType.APPLICATION_JAVASCRIPT); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -396,11 +560,12 @@ public void addEventListener_NoContent() throws Exception { final String html = "\n" + "\n" @@ -410,7 +575,7 @@ public void addEventListener_NoContent() throws Exception { getMockWebConnection().setResponse(scriptUrl, (String) null, HttpStatus.SC_NO_CONTENT, "No Content", MimeType.APPLICATION_JAVASCRIPT, null); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -420,10 +585,10 @@ public void addEventListener_NoContent() throws Exception { @Test public void badSrcUrl() throws Exception { final String html = "\n" - + "\n" + + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -518,15 +683,18 @@ private void onLoadOnError(final String attribs) throws Exception { final String html = "\n" + "\n" + + " \n" + " \n" + + " onload='log(\"onLoad\")' onerror='log(\"onError\")'>\n" + "\n" - + "\n" + + "\n" + "\n" + ""; getMockWebConnection().setDefaultResponse("Error: not found", 404, "Not Found", MimeType.TEXT_HTML); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -575,14 +743,15 @@ public void currentScriptInline() throws Exception { = "\n" + "\n" + " \n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -596,8 +765,9 @@ public void currentScriptFunction() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -605,7 +775,7 @@ public void currentScriptFunction() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -615,17 +785,20 @@ public void currentScriptFunction() throws Exception { @Alerts(DEFAULT = "[object HTMLScriptElement]", IE = "undefined") public void currentScriptExternal() throws Exception { - getMockWebConnection().setResponse(new URL(URL_FIRST, "simple.js"), "alert(document.currentScript);"); + getMockWebConnection().setResponse(new URL(URL_FIRST, "simple.js"), "log(document.currentScript);"); final String html = "\n" + "\n" + + " \n" + " \n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -654,4 +827,34 @@ public void scriptExecutionOrder() throws Exception { final WebDriver driver = loadPage2(html.toString()); assertTitle(driver, getExpectedAlerts()[0]); } + + /** + * Tests the 'Referer' HTTP header. + * @throws Exception on test failure + */ + @Test + @Alerts("§§URL§§index.html?test") + public void refererHeader() throws Exception { + final String firstContent + = "Page A\n" + + "" + + " \n" + + " " + " \n" + "\n" - + "\n" + + "\n" + + "\n" + ""; String scriptContentType = MimeType.APPLICATION_JAVASCRIPT; @@ -176,7 +180,7 @@ private void charset( scriptContentType = scriptContentType + "; charset=" + charsetResponseHeader.getCharset().name().toLowerCase(); } - final String js = "alert('a'); alert('ä'); alert('أهلاً'); alert('мир'); alert('房间');"; + final String js = "log('a'); log('ä'); log('أهلاً'); log('мир'); log('房间');"; byte[] script = null; if (charsetResponseEncoding == null) { @@ -217,18 +221,20 @@ else if (BOM_UTF_16LE.equals(bom)) { } final WebDriver driver = loadPage2(html, URL_FIRST, htmlContentType, htmlResponseCharset, null); - if (expectedAlerts.length == 1) { - final List actualAlerts = getCollectedAlerts(DEFAULT_WAIT_TIME, driver, expectedAlerts.length); - assertEquals(1, actualAlerts.size()); + final String logMsg = (String) ((JavascriptExecutor) driver).executeScript("return logMsg;"); + final String[] actualAlerts = logMsg.split("§§"); - final String msg = actualAlerts.get(0); + if (actualAlerts.length == 1) { + assertEquals(1, actualAlerts.length); + + final String msg = actualAlerts[0]; assertEquals(expectedAlerts[0], "Invalid token"); assertTrue(msg, msg.contains("Invalid or unexpected token") || msg.contains("illegal character") || msg.contains("Ungültiges Zeichen")); } else { - verifyAlerts(DEFAULT_WAIT_TIME, driver, expectedAlerts); + assertArrayEquals(getExpectedAlerts(), actualAlerts); } } catch (final WebDriverException e) { diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlScriptTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlScriptTest.java index db9da6ea2..9808c5def 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlScriptTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/HtmlScriptTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,7 +19,6 @@ import java.net.URL; import java.util.ArrayList; import java.util.List; -import java.util.Map; import org.apache.http.HttpStatus; import org.junit.Test; @@ -29,7 +28,6 @@ import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; import com.gargoylesoftware.htmlunit.CollectingAlertHandler; import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.HttpHeader; import com.gargoylesoftware.htmlunit.MockWebConnection; import com.gargoylesoftware.htmlunit.SimpleWebTestCase; import com.gargoylesoftware.htmlunit.WebClient; @@ -42,6 +40,7 @@ * @author Marc Guillemot * @author Daniel Gredler * @author Ahmed Ashour + * @author Ronald Brill */ @RunWith(BrowserRunner.class) public class HtmlScriptTest extends SimpleWebTestCase { @@ -96,7 +95,7 @@ public void asText() throws Exception { final String html = ""; final HtmlPage page = loadPage(html); final HtmlScript script = page.getHtmlElementById("s"); - assertEquals("", script.asText()); + assertEquals("", script.asNormalizedText()); } /** @@ -133,30 +132,6 @@ public void asXml_scriptNestedInCData() throws Exception { scriptElement.asXml()); } - /** - * Tests the 'Referer' HTTP header. - * @throws Exception on test failure - */ - @Test - public void refererHeader() throws Exception { - final String firstContent - = "Page A\n" - + "\n" + "hello\n" + "\n" + ""; - loadPageWithAlerts2(content); + loadPageVerifyTitle2(content); } /** @@ -67,13 +68,14 @@ public void bodyAttributeWhenOpeningBodyGenerated() throws Exception { @Test @Alerts({"2", "3", "text3", "text3", "null"}) public void lostFormChildren() throws Exception { - final String content = "foo\n" + "\n" @@ -87,7 +89,7 @@ public void lostFormChildren() throws Exception { + "\n" + ""; - loadPageWithAlerts2(content); + loadPageVerifyTitle2(content); } /** @@ -132,10 +134,11 @@ public void titleTwice() throws Exception { @Alerts({"DIV", "TABLE"}) public void div_between_table_and_tr() throws Exception { final String html = "\n" + "" @@ -143,7 +146,7 @@ public void div_between_table_and_tr() throws Exception { + "world\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -236,16 +239,17 @@ public void brokenInputSingleQuote() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + "" + "" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -258,16 +262,17 @@ public void brokenInputDoubleQuote() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + "" + "" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -363,7 +368,7 @@ public void sectionWithUnknownClosingTag() throws Exception { // V
W
XYZ public void nestedAnchorInDivision() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -549,17 +555,18 @@ public void formInTable2() throws Exception { + " \n" + "" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -582,17 +589,18 @@ public void formInTable3() throws Exception { + " \n" + " " + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -652,17 +660,18 @@ public void formInTable5() throws Exception { + " \n" + " \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -693,17 +702,18 @@ public void formInTable6() throws Exception { + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -735,17 +745,18 @@ public void formInTable7() throws Exception { + " \n" + " \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -781,18 +792,19 @@ public void formInTable8() throws Exception { + " \n" + " \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -821,15 +833,16 @@ public void formInTable9() throws Exception { + " \n" + " \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -853,15 +866,16 @@ public void formInTable10() throws Exception { + " \n" + " \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -881,11 +895,12 @@ public void nonInlineElementInCaption() throws Exception { + " \n" + " " + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -912,17 +927,18 @@ public void synthesizedDivInForm() throws Exception { + " \n" + " \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/NamedAttrNodeMapImplTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/NamedAttrNodeMapImplTest.java index 9d9448243..378d7ceb8 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/NamedAttrNodeMapImplTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/NamedAttrNodeMapImplTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/XHtmlPage2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/XHtmlPage2Test.java index e95027f0a..cf1e44cd7 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/XHtmlPage2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/XHtmlPage2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/XHtmlPageTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/XHtmlPageTest.java index 86a4d7365..ef313f02a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/XHtmlPageTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/XHtmlPageTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/XmlSerializerTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/XmlSerializerTest.java index e850fbee7..27cb7e6e5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/XmlSerializerTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/XmlSerializerTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/impl/SimpleRangeTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/impl/SimpleRangeTest.java index 5e324916f..7b6e2efed 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/impl/SimpleRangeTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/impl/SimpleRangeTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParser2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParser2Test.java index 7db5145e9..5e95ec102 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParser2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/html/parser/HTMLParser2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,16 +14,12 @@ */ package com.gargoylesoftware.htmlunit.html.parser; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.CHROME; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.EDGE; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF78; - import org.junit.Test; import org.junit.runner.RunWith; import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; import com.gargoylesoftware.htmlunit.WebDriverTestCase; import com.gargoylesoftware.htmlunit.html.HtmlPageTest; @@ -58,9 +54,13 @@ public void qualified_body() throws Exception { */ @Test @Alerts({"\nbeforeafter", "undefined", "undefined"}) - @NotYetImplemented + @HtmlUnitNYI(CHROME = {"beforeafter", "undefined", "undefined"}, + EDGE = {"beforeafter", "undefined", "undefined"}, + FF = {"beforeafter", "undefined", "undefined"}, + FF78 = {"beforeafter", "undefined", "undefined"}, + IE = {"beforeafter", "undefined", "undefined"}) public void htmlTableTextAroundTD() throws Exception { - final String html = "test_Table\n" + final String html = "\n" + "\n" + "\n" + "
\n" + "
"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -109,18 +110,19 @@ public void htmlTableWhitespaceAroundTD() throws Exception { public void htmlTableMisplacedElementInside() throws Exception { final String html = "\n" + "\n" + "\n" + "

Wrong Place

\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -131,18 +133,19 @@ public void htmlTableMisplacedElementInside() throws Exception { public void htmlTableMisplacedElementInside2() throws Exception { final String html = "\n" + "\n" + "\n" + "

Wrong Place

\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -153,18 +156,19 @@ public void htmlTableMisplacedElementInside2() throws Exception { public void htmlTableMisplacedElementInside3() throws Exception { final String html = "\n" + "\n" + "\n" + "

Wrong Place

\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -175,18 +179,19 @@ public void htmlTableMisplacedElementInside3() throws Exception { public void htmlTableMisplacedElementInside4() throws Exception { final String html = "\n" + "\n" + "\n" + "

Wrong Place

\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } @Test @@ -210,11 +215,12 @@ public void htmlTableMisplacedElementInside5() throws Exception { + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } @Test @@ -245,16 +251,17 @@ public void htmlTableMisplacedElementInside6() throws Exception { + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } @Test @@ -281,14 +288,15 @@ public void tableInsideTable() throws Exception { + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } @Test @@ -317,14 +325,15 @@ public void tableInsideTableTr() throws Exception { + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } @Test @@ -353,13 +362,13 @@ public void tableInsideTableTd() throws Exception { + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } @Test @@ -374,12 +383,13 @@ public void scriptInsideTable() throws Exception { + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } @Test @@ -395,14 +405,15 @@ public void scriptInsideTableRows() throws Exception { + "" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } @Test @@ -419,15 +430,16 @@ public void scriptInsideTableData() throws Exception { + "" + "\n" + "" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -439,10 +451,11 @@ public void htmlTableClosesAnother() throws Exception { final String html = "\n" + "\n" + "\n" @@ -462,7 +475,7 @@ public void htmlTableClosesAnother() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -473,11 +486,12 @@ public void htmlTableClosesAnother() throws Exception { public void htmlTableClosesAnotherInsideTr() throws Exception { final String html = "\n" + "\n" + "\n" @@ -496,7 +510,7 @@ public void htmlTableClosesAnotherInsideTr() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } @@ -504,15 +518,16 @@ public void htmlTableClosesAnotherInsideTr() throws Exception { * @throws Exception on test failure */ @Test - @Alerts("TABLE") + @Alerts({"TABLE", "null"}) public void htmlTableNotClosesOnotherInsideTd() throws Exception { final String html = "\n" + "\n" + "\n" @@ -533,7 +548,7 @@ public void htmlTableNotClosesOnotherInsideTd() throws Exception { + "" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -564,15 +579,16 @@ public void unclosedCommentsInScript() throws Exception { public void divInsideButton() throws Exception { final String html = "\n" + "\n" + "\n" @@ -580,7 +596,7 @@ public void divInsideButton() throws Exception { + "

\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -592,15 +608,16 @@ public void divInsideButton() throws Exception { public void objectInsideLabel() throws Exception { final String html = "\n" + "\n" + "\n" @@ -608,7 +625,7 @@ public void objectInsideLabel() throws Exception { + "

\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -635,7 +652,7 @@ public void tableClosesInlineTags() throws Exception { + " }\n" + " }\n" + " if (!hasTable) {\n" - + " alert('<' + myNode.nodeName + '>');\n" + + " log('<' + myNode.nodeName + '>');\n" + " }\n" + " }\n" + " }\n" @@ -678,7 +695,7 @@ public void tableClosesInlineTags() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -687,11 +704,12 @@ public void tableClosesInlineTags() throws Exception { @Test @Alerts({"2", "2", "3", "3", "2", "2", "3", "2", "2", "3", "2", "2"}) public void childNodes_p_parent() throws Exception { - final String html = "test_getChildNodes\n" + final String html = "\n" + "\n" @@ -710,7 +728,7 @@ public void childNodes_p_parent() throws Exception { + "

\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -719,11 +737,12 @@ public void childNodes_p_parent() throws Exception { @Test @Alerts({"2", "2", "3", "3", "2", "2", "3", "2", "2", "3", "2", "2", "3"}) public void childNodes_f() throws Exception { - final String html = "test_getChildNodes\n" + final String html = "\n" + "\n" @@ -742,7 +761,7 @@ public void childNodes_f() throws Exception { + "
\n" + "
\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -754,13 +773,14 @@ public void childNodes_f() throws Exception { public void ieConditionalCommentsNotInDom() throws Exception { final String html = "\n" + "\n" + "\n" @@ -769,7 +789,7 @@ public void ieConditionalCommentsNotInDom() throws Exception { + "
\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -784,10 +804,13 @@ public void acceptLabelWithinAnchor() throws Exception { + "\n" + "\n" + "\n" - + "\n" + + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -854,33 +877,45 @@ public void tableInsideAnchor() throws Exception { */ @Test @Alerts(DEFAULT = {"", "1", - "1", "IFRAME", "null", "1", - "3", "#text", ""}, + "1", "IFRAME", "null", "1", + "3", "#text", ""}, IE = {"", "1", - "1", "IFRAME", "null", "1", - "3", "#text", ""}) - @NotYetImplemented({CHROME, EDGE, FF, FF78}) + "1", "IFRAME", "null", "1", + "3", "#text", ""}) + @HtmlUnitNYI(CHROME = {"", "1", + "1", "IFRAME", "null", "1", + "3", "#text", ""}, + EDGE = {"", "1", + "1", "IFRAME", "null", "1", + "3", "#text", ""}, + FF = {"", "1", + "1", "IFRAME", "null", "1", + "3", "#text", ""}, + FF78 = {"", "1", + "1", "IFRAME", "null", "1", + "3", "#text", ""}) public void selfClosingIframe() throws Exception { final String html = "\n" + "\n" + "\n" @@ -888,7 +923,7 @@ public void selfClosingIframe() throws Exception { + "
"; + + " \n" + + "\n" + + ""; + + loadPageWithAlerts2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"#hash", "about:blank?query#hash", "blank", "", "about:", "?query"}, + FF = "exception", + FF78 = "exception", + IE = "exception") + @HtmlUnitNYI(FF = {"", "about:blank", "blank", "", "about:", ""}, + FF78 = {"", "about:blank", "blank", "", "about:", ""}, + IE = {"", "about:blank", "/blank", "", "about:", ""}) + public void about_blank_query_hash_attributes() throws Exception { + final String html = "\n" + + "\n" + + " \n" + + "\n" + + "\n" + + " \n" + + "\n" + + ""; + + loadPageWithAlerts2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"", "about:blank", "#foo", "about:blank#foo"}, + IE = {"", "about:blank", "", "about:blank"}) + @HtmlUnitNYI(IE = {"", "about:blank", "#foo", "about:blank#foo"}) + public void about_blank_set_hash() throws Exception { + final String html = "\n" + + "\n" + + " \n" + + "\n" + + "\n" + + " \n" + + "\n" + + ""; loadPageWithAlerts2(html); } @@ -152,9 +229,9 @@ public void about_blank_attributes() throws Exception { */ @Test @Alerts(DEFAULT = {"#a%20b", "§§URL§§#a%20b", "#a%20b", "§§URL§§#a%20b", "#abc;,/?:@&=+$-_.!~*()ABC123foo", - "#%25%20%5E%5B%5D%7C%22%3C%3E%7B%7D%5C"}, + "#%25%20%5E%5B%5D%7C%22%3C%3E%7B%7D%5C"}, IE = {"#a b", "§§URL§§#a b", "#a%20b", "§§URL§§#a%20b", "#abc;,/?:@&=+$-_.!~*()ABC123foo", - "#%25%20%5E%5B%5D%7C%22%3C%3E%7B%7D%5C"}) + "#%25%20%5E%5B%5D%7C%22%3C%3E%7B%7D%5C"}) public void hashEncoding() throws Exception { final String html = "First\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html); } @@ -188,6 +266,7 @@ public void hashEncoding2() throws Exception { + "alert(window.location.href);\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html); } @@ -204,6 +283,7 @@ public void hashEncoding3() throws Exception { + "alert(window.location.href);\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html); } @@ -524,16 +604,18 @@ public void jsLocation() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts("§§URL§§") + @Alerts({"§§URL§§", "§§URL§§", "§§URL§§"}) public void testToString() throws Exception { - final String html = - "\n" + final String html = "\n" + "\n" - + "\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html); } @@ -971,4 +1053,57 @@ public void reloadPost() throws Exception { assertEquals(getExpectedAlerts()[2], additionalHeaders.get(HttpHeader.REFERER)); assertEquals("localhost:" + PORT, additionalHeaders.get(HttpHeader.HOST)); } + + /** + * Tests that location.reload() works correctly when invoked across frames. + * @throws Exception if the test fails + */ + @Test + @Alerts({"§§URL§§upper.html", "§§URL§§lower.html"}) + public void reloadAcrossFrames() throws Exception { + final String framesetContent = "" + + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + ""; + + final String upperContent = "

upper

"; + final String lowerContent = "" + + "\n" + + "\n" + + "\n" + + "

lower

"; + + getMockWebConnection().setResponse(URL_FIRST, framesetContent); + getMockWebConnection().setResponse(new URL(URL_FIRST, "upper.html"), upperContent); + getMockWebConnection().setResponse(new URL(URL_FIRST, "lower.html"), lowerContent); + + final WebDriver driver = loadPage2(framesetContent, URL_FIRST); + + expandExpectedAlertsVariables(URL_FIRST); + driver.switchTo().frame("upper"); + assertEquals(getExpectedAlerts()[0], + ((JavascriptExecutor) driver).executeScript("return document.location.href")); + driver.switchTo().defaultContent(); + driver.switchTo().frame("lower"); + assertEquals(getExpectedAlerts()[1], + ((JavascriptExecutor) driver).executeScript("return document.location.href")); + + driver.findElement(By.id("tester")).click(); + + driver.switchTo().defaultContent(); + driver.switchTo().frame("upper"); + assertEquals(getExpectedAlerts()[0], + ((JavascriptExecutor) driver).executeScript("return document.location.href")); + driver.switchTo().defaultContent(); + driver.switchTo().frame("lower"); + assertEquals(getExpectedAlerts()[1], + ((JavascriptExecutor) driver).executeScript("return document.location.href")); + } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/LocationTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/LocationTest.java index 9fbfa7880..af62dda43 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/LocationTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/LocationTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/MapTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/MapTest.java index 63961ccce..a1756679d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/MapTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/MapTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -64,11 +64,11 @@ public void get() throws Exception { */ @Test @Alerts(DEFAULT = {"function entries() { [native code] }", - "[object Map Iterator]", "0,foo", "1,bar", "[object Object],baz", "undefined"}, + "[object Map Iterator]", "0,foo", "1,bar", "[object Object],baz", "undefined"}, FF = {"function entries() {\n [native code]\n}", - "[object Map Iterator]", "0,foo", "1,bar", "[object Object],baz", "undefined"}, + "[object Map Iterator]", "0,foo", "1,bar", "[object Object],baz", "undefined"}, FF78 = {"function entries() {\n [native code]\n}", - "[object Map Iterator]", "0,foo", "1,bar", "[object Object],baz", "undefined"}, + "[object Map Iterator]", "0,foo", "1,bar", "[object Object],baz", "undefined"}, IE = {}) public void iterator() throws Exception { final String html = @@ -103,11 +103,11 @@ public void iterator() throws Exception { */ @Test @Alerts(DEFAULT = {"function entries() { [native code] }", - "[object Map Iterator]", "0,foo", "1,bar", "[object Object],baz", "undefined"}, + "[object Map Iterator]", "0,foo", "1,bar", "[object Object],baz", "undefined"}, FF = {"function entries() {\n [native code]\n}", - "[object Map Iterator]", "0,foo", "1,bar", "[object Object],baz", "undefined"}, + "[object Map Iterator]", "0,foo", "1,bar", "[object Object],baz", "undefined"}, FF78 = {"function entries() {\n [native code]\n}", - "[object Map Iterator]", "0,foo", "1,bar", "[object Object],baz", "undefined"}, + "[object Map Iterator]", "0,foo", "1,bar", "[object Object],baz", "undefined"}, IE = {}) public void entries() throws Exception { final String html = @@ -142,11 +142,11 @@ public void entries() throws Exception { */ @Test @Alerts(DEFAULT = {"function values() { [native code] }", - "[object Map Iterator]", "foo", "bar", "baz", "undefined"}, + "[object Map Iterator]", "foo", "bar", "baz", "undefined"}, FF = {"function values() {\n [native code]\n}", - "[object Map Iterator]", "foo", "bar", "baz", "undefined"}, + "[object Map Iterator]", "foo", "bar", "baz", "undefined"}, FF78 = {"function values() {\n [native code]\n}", - "[object Map Iterator]", "foo", "bar", "baz", "undefined"}, + "[object Map Iterator]", "foo", "bar", "baz", "undefined"}, IE = {}) public void values() throws Exception { final String html = @@ -181,11 +181,11 @@ public void values() throws Exception { */ @Test @Alerts(DEFAULT = {"function keys() { [native code] }", - "[object Map Iterator]", "0", "1", "[object Object]", "undefined"}, + "[object Map Iterator]", "0", "1", "[object Object]", "undefined"}, FF = {"function keys() {\n [native code]\n}", - "[object Map Iterator]", "0", "1", "[object Object]", "undefined"}, + "[object Map Iterator]", "0", "1", "[object Object]", "undefined"}, FF78 = {"function keys() {\n [native code]\n}", - "[object Map Iterator]", "0", "1", "[object Object]", "undefined"}, + "[object Map Iterator]", "0", "1", "[object Object]", "undefined"}, IE = {}) public void keys() throws Exception { final String html = @@ -375,9 +375,9 @@ public void constructorIteratorParam() throws Exception { */ @Test @Alerts(DEFAULT = {"value1", "key1", "[object Map]", "[object Window]", - "[object Object]", "key2", "[object Map]", "[object Window]", - "null", "key3", "[object Map]", "[object Window]", - "undefined", "key4", "[object Map]", "[object Window]"}, + "[object Object]", "key2", "[object Map]", "[object Window]", + "null", "key3", "[object Map]", "[object Window]", + "undefined", "key4", "[object Map]", "[object Window]"}, IE = {}) @NotYetImplemented(IE) public void forEach() throws Exception { @@ -409,9 +409,9 @@ public void forEach() throws Exception { */ @Test @Alerts(DEFAULT = {"value1", "key1", "[object Map]", "undefined", - "[object Object]", "key2", "[object Map]", "undefined", - "null", "key3", "[object Map]", "undefined", - "undefined", "key4", "[object Map]", "undefined"}, + "[object Object]", "key2", "[object Map]", "undefined", + "null", "key3", "[object Map]", "undefined", + "undefined", "key4", "[object Map]", "undefined"}, IE = {}) @NotYetImplemented(IE) public void forEachStrict() throws Exception { @@ -444,9 +444,9 @@ public void forEachStrict() throws Exception { */ @Test @Alerts(DEFAULT = {"value1", "key1", "[object Map]", "hello", - "[object Object]", "key2", "[object Map]", "hello", - "null", "key3", "[object Map]", "hello", - "undefined", "key4", "[object Map]", "hello"}, + "[object Object]", "key2", "[object Map]", "hello", + "null", "key3", "[object Map]", "hello", + "undefined", "key4", "[object Map]", "hello"}, IE = {}) @NotYetImplemented(IE) public void forEachThis() throws Exception { @@ -501,7 +501,7 @@ public void iteratorPrototype() throws Exception { */ @Test @Alerts(DEFAULT = {"value1", "undefined", "[object Map]", "[object Window]", - "[object Object]", "key2", "[object Map]", "[object Window]"}, + "[object Object]", "key2", "[object Map]", "[object Window]"}, IE = {}) @NotYetImplemented(IE) public void forEach_withElision() throws Exception { diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/MessageChannelTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/MessageChannelTest.java index 951c0d4f3..6d5a37e02 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/MessageChannelTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/MessageChannelTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/MimeTypeTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/MimeTypeTest.java index 30df535f8..0a75025dd 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/MimeTypeTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/MimeTypeTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NamedNodeMapTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NamedNodeMapTest.java index 8d14bd279..e8a4bb331 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NamedNodeMapTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NamedNodeMapTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NamespaceTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NamespaceTest.java index 261607500..91eaaf6fd 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NamespaceTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NamespaceTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Navigator2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Navigator2Test.java index 0bc0bb8e6..29c21ef03 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Navigator2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Navigator2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,6 +25,7 @@ * Tests for {@link Navigator}. * * @author Ahmed Ashour + * @author Ronald Brill */ @RunWith(BrowserRunner.class) public class Navigator2Test extends SimpleWebTestCase { @@ -41,13 +42,14 @@ public void cookieEnabled() throws Exception { private void cookieEnabled(final boolean cookieEnabled) throws Exception { final String html - = "First\n" + = "\n" + "\n" - + "\n" + + "\n" + + "\n" + ""; setExpectedAlerts(Boolean.toString(cookieEnabled)); @@ -93,5 +95,4 @@ void attribute(final String name, final String value) throws Exception { setExpectedAlerts(name + " = " + value); loadPageWithAlerts(html); } - } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NavigatorTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NavigatorTest.java index db2ee2210..8a54151c5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NavigatorTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NavigatorTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,8 +14,6 @@ */ package com.gargoylesoftware.htmlunit.javascript.host; -import java.util.List; - import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.By; @@ -101,14 +99,16 @@ public void browserLanguage() throws Exception { EDGE = {"string", "20030107"}, IE = {"undefined", "undefined"}) public void productSub() throws Exception { - final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -218,26 +218,26 @@ public void plugins() throws Exception { */ @Test @Alerts(DEFAULT = "Shockwave Flash not available", - IE = {"Shockwave Flash", "Shockwave Flash 32.0 r0", "32.0.0.387", "Flash.ocx"}) + IE = {"Shockwave Flash", "Shockwave Flash 32.0 r0", "32.0.0.445", "Flash.ocx"}) public void pluginsShockwaveFlash() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" @@ -246,7 +246,7 @@ public void pluginsShockwaveFlash() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -260,12 +260,12 @@ public void pluginsShockwaveFlash() throws Exception { public void taintEnabled() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -273,7 +273,7 @@ public void taintEnabled() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -285,10 +285,10 @@ public void taintEnabled() throws Exception { void attribute(final String name, final String value, final String... ignore) throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -297,13 +297,7 @@ void attribute(final String name, final String value, final String... ignore) th + ""; setExpectedAlerts(value); - final WebDriver driver = loadPage2(html); - final List alerts = getCollectedAlerts(driver); - - for (int i = 0; i < ignore.length; i++) { - alerts.set(0, alerts.get(0).replace(ignore[i], "")); - } - assertEquals(getExpectedAlerts(), alerts); + loadPageVerifyTitle2(html); } /** @@ -314,11 +308,15 @@ void attribute(final String name, final String value, final String... ignore) th @Alerts("en-US") public void language() throws Exception { final String html - = "First\n" - + "\n" + = "\n" + + " \n" + + "\n" + + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -328,17 +326,18 @@ public void language() throws Exception { @Alerts({"number", "number"}) public void mozilla() throws Exception { final String html - = "First\n" + = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -348,16 +347,17 @@ public void mozilla() throws Exception { @Alerts("Gecko") public void product() throws Exception { final String html - = "First\n" + = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -367,16 +367,17 @@ public void product() throws Exception { @Alerts("[object Geolocation]") public void geolocation() throws Exception { final String html - = "First\n" + = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -388,16 +389,17 @@ public void geolocation() throws Exception { FF78 = "20181001000000") public void buildID() throws Exception { final String html - = "First\n" + = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -410,17 +412,18 @@ public void buildID() throws Exception { IE = {"", "undefined"}) public void vendor() throws Exception { final String html - = "First\n" + = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -432,16 +435,17 @@ public void vendor() throws Exception { FF78 = "true") public void oscpu() throws Exception { final String html - = "First\n" + = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -455,16 +459,17 @@ public void connection() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -479,15 +484,38 @@ public void doNotTrack() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object MediaDevices]", "true"}, + IE = {"undefined", "true"}) + public void mediaDevices() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NetscapeTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NetscapeTest.java index 56842f1f7..ff607bfff 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NetscapeTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NetscapeTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,6 +19,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.WebDriverTestCase; /** @@ -26,6 +27,7 @@ * * @author Marc Guillemot * @author Frank Danek + * @author Ronald Brill */ @RunWith(BrowserRunner.class) public class NetscapeTest extends WebDriverTestCase { @@ -50,4 +52,26 @@ public void netscape() throws Exception { loadPageWithAlerts2(html); } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "exception", + FF = {"true", "false", "true"}, + FF78 = {"true", "false", "true"}) + @HtmlUnitNYI(FF = {"undefined", "true", "true"}, + FF78 = {"undefined", "true", "true"}) + public void netscapeDescriptor() throws Exception { + final String html = ""; + + loadPageWithAlerts2(html); + } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NotificationTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NotificationTest.java index 2df035834..f14d6024d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NotificationTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/NotificationTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Popup2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Popup2Test.java index 6e453146e..6249be3c1 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Popup2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Popup2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/PopupTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/PopupTest.java index 1ab505150..6521c0435 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/PopupTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/PopupTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/PromiseTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/PromiseTest.java index ec38ac306..6740ba64a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/PromiseTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/PromiseTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -40,7 +40,7 @@ public class PromiseTest extends WebDriverTestCase { */ @Test @Alerts(DEFAULT = {"function", "function", "undefined", "undefined", - "undefined", "undefined", "function", "function"}, + "undefined", "undefined", "function", "function"}, IE = {}) public void staticMethods() throws Exception { final String html = @@ -104,18 +104,18 @@ public void length() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = { "function () { [native code] }", - "function () { [native code] }", - "[object Window]", - "done", "resolved value"}, - FF = { "function () {\n [native code]\n}", - "function () {\n [native code]\n}", + @Alerts(DEFAULT = {"function () { [native code] }", + "function () { [native code] }", "[object Window]", "done", "resolved value"}, - FF78 = { "function () {\n [native code]\n}", - "function () {\n [native code]\n}", - "[object Window]", - "done", "resolved value"}, + FF = {"function () {\n [native code]\n}", + "function () {\n [native code]\n}", + "[object Window]", + "done", "resolved value"}, + FF78 = {"function () {\n [native code]\n}", + "function () {\n [native code]\n}", + "[object Window]", + "done", "resolved value"}, IE = {}) public void constructor() throws Exception { final String html = "\n" @@ -2009,11 +2009,11 @@ public void changeLocationFromPromise() throws Exception { + " \n" + "\n" + "\n" - + " \n" + "\n" + ""; final WebDriver driver = loadPage2(html); + Thread.sleep(100); assertTitle(driver, getExpectedAlerts()[0]); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/ReflectTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/ReflectTest.java index 28229229c..bb2d2a127 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/ReflectTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/ReflectTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/ScreenTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/ScreenTest.java index 1ce964bbf..a813e86ee 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/ScreenTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/ScreenTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/SetTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/SetTest.java index 67388e501..631795c94 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/SetTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/SetTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -68,9 +68,9 @@ public void has() throws Exception { */ @Test @Alerts(DEFAULT = {"function values() { [native code] }", - "[object Set Iterator]", "0", "1", "[object Object]"}, + "[object Set Iterator]", "0", "1", "[object Object]"}, FF = {"function values() {\n [native code]\n}", - "[object Set Iterator]", "0", "1", "[object Object]"}, + "[object Set Iterator]", "0", "1", "[object Object]"}, FF78 = {"function values() {\n [native code]\n}", "[object Set Iterator]", "0", "1", "[object Object]"}, IE = {}) @@ -106,11 +106,11 @@ public void iterator() throws Exception { */ @Test @Alerts(DEFAULT = {"function values() { [native code] }", - "[object Set Iterator]", "0", "1", "[object Object]"}, + "[object Set Iterator]", "0", "1", "[object Object]"}, FF = {"function values() {\n [native code]\n}", - "[object Set Iterator]", "0", "1", "[object Object]"}, + "[object Set Iterator]", "0", "1", "[object Object]"}, FF78 = {"function values() {\n [native code]\n}", - "[object Set Iterator]", "0", "1", "[object Object]"}, + "[object Set Iterator]", "0", "1", "[object Object]"}, IE = {}) public void values() throws Exception { final String html = @@ -316,8 +316,8 @@ public void constructorIteratorParam() throws Exception { */ @Test @Alerts(DEFAULT = {"ab", "ab", "[object Set]", "[object Window]", - "undefined", "undefined", "[object Set]", "[object Window]", - "null", "null", "[object Set]", "[object Window]"}, + "undefined", "undefined", "[object Set]", "[object Window]", + "null", "null", "[object Set]", "[object Window]"}, IE = {}) @NotYetImplemented(IE) public void forEach() throws Exception { @@ -347,8 +347,8 @@ public void forEach() throws Exception { */ @Test @Alerts(DEFAULT = {"ab", "ab", "[object Set]", "undefined", - "undefined", "undefined", "[object Set]", "undefined", - "null", "null", "[object Set]", "undefined"}, + "undefined", "undefined", "[object Set]", "undefined", + "null", "null", "[object Set]", "undefined"}, IE = {}) @NotYetImplemented(IE) public void forEachStrict() throws Exception { @@ -379,7 +379,7 @@ public void forEachStrict() throws Exception { */ @Test @Alerts(DEFAULT = {"ab", "ab", "[object Set]", "hello", "undefined", "undefined", "[object Set]", "hello", - "null", "null", "[object Set]", "hello"}, + "null", "null", "[object Set]", "hello"}, IE = {}) @NotYetImplemented(IE) public void forEachThis() throws Exception { diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/StorageTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/StorageTest.java index 78afec22b..c28f191f0 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/StorageTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/StorageTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/SymbolTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/SymbolTest.java index bc07b5ec5..3fefbdc8b 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/SymbolTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/SymbolTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/TextDecoderTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/TextDecoderTest.java index a6087aa3f..96db9aa54 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/TextDecoderTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/TextDecoderTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/TextEncoderTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/TextEncoderTest.java index dd097b35b..0b3bd8461 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/TextEncoderTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/TextEncoderTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/URLSearchParamsTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/URLSearchParamsTest.java index 4fe2f1b48..a3886c9be 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/URLSearchParamsTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/URLSearchParamsTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -195,8 +195,8 @@ public void stringMissingParam() throws Exception { */ @Test @Alerts(DEFAULT = {"key=value", "key=value&empty-key=undefined", - "key=value&empty-key=undefined&key=overwrite", - "key=value&empty-key=undefined&key=overwrite&key-null=null"}, + "key=value&empty-key=undefined&key=overwrite", + "key=value&empty-key=undefined&key=overwrite&key-null=null"}, IE = {}) public void append() throws Exception { final String html = @@ -350,10 +350,10 @@ public void getAll() throws Exception { */ @Test @Alerts(DEFAULT = {"key1=val1&key2=val2&key2=val3&key4=val4", - "key1=new1&key2=val2&key2=val3&key4=val4", - "key1=new1&key2=new2&key4=val4", - "key1=new1&key2=new2&key4=val4&key3=undefined", - "key1=new1&key2=new2&key4=null&key3=undefined"}, + "key1=new1&key2=val2&key2=val3&key4=val4", + "key1=new1&key2=new2&key4=val4", + "key1=new1&key2=new2&key4=val4&key3=undefined", + "key1=new1&key2=new2&key4=null&key3=undefined"}, IE = {}) public void set() throws Exception { final String html = @@ -388,9 +388,9 @@ public void set() throws Exception { */ @Test @Alerts(DEFAULT = {"function keys() { [native code] }", "[object Iterator]", - "key1", "key2", "key1", "", "true"}, + "key1", "key2", "key1", "", "true"}, FF = {"function keys() {\n [native code]\n}", "[object URLSearchParams Iterator]", - "key1", "key2", "key1", "", "true"}, + "key1", "key2", "key1", "", "true"}, FF78 = {"function keys() {\n [native code]\n}", "[object URLSearchParams Iterator]", "key1", "key2", "key1", "", "true"}, IE = {}) @@ -432,9 +432,9 @@ public void keys() throws Exception { */ @Test @Alerts(DEFAULT = {"function values() { [native code] }", "[object Iterator]", - "val1", "", "val3", "val4", "true"}, + "val1", "", "val3", "val4", "true"}, FF = {"function values() {\n [native code]\n}", "[object URLSearchParams Iterator]", - "val1", "", "val3", "val4", "true"}, + "val1", "", "val3", "val4", "true"}, FF78 = {"function values() {\n [native code]\n}", "[object URLSearchParams Iterator]", "val1", "", "val3", "val4", "true"}, IE = {}) @@ -504,9 +504,9 @@ public void valuesForOf() throws Exception { */ @Test @Alerts(DEFAULT = {"function entries() { [native code] }", "[object Iterator]", - "key1-val1", "key2-", "key1-val3", "-val4", "true"}, + "key1-val1", "key2-", "key1-val3", "-val4", "true"}, FF = {"function entries() {\n [native code]\n}", "[object URLSearchParams Iterator]", - "key1-val1", "key2-", "key1-val3", "-val4", "true"}, + "key1-val1", "key2-", "key1-val3", "-val4", "true"}, FF78 = {"function entries() {\n [native code]\n}", "[object URLSearchParams Iterator]", "key1-val1", "key2-", "key1-val3", "-val4", "true"}, IE = {}) @@ -570,4 +570,33 @@ public void entriesForOf() throws Exception { + ""; loadPageWithAlerts2(html); } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"function URLSearchParams() { [native code] }", + "function URLSearchParams() { [native code] }", + "function URLSearchParams() { [native code] }", + "key1=val1", "key1=val1", "key1=val1"}, + IE = {}) + public void testToString() throws Exception { + final String html = "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/URLTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/URLTest.java index e902c38f6..e2eea52f6 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/URLTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/URLTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,6 +27,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; import com.gargoylesoftware.htmlunit.WebDriverTestCase; import com.gargoylesoftware.htmlunit.html.HtmlPageTest; @@ -44,56 +45,56 @@ public class URLTest extends WebDriverTestCase { */ @Test @Alerts(DEFAULT = "function URL() { [native code] }", - FF = "function URL() {\n [native code]\n}", - FF78 = "function URL() {\n [native code]\n}", IE = "[object URL]") public void windowURL() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = { "https://developer.mozilla.org/", "https://developer.mozilla.org/", - "https://developer.mozilla.org/en-US/docs", "https://developer.mozilla.org/en-US/docs", - "https://developer.mozilla.org/en-US/docs", "https://developer.mozilla.org/en-US/docs", - "http://www.example.com/", "type error", "type error" }, + @Alerts(DEFAULT = {"https://developer.mozilla.org/", "https://developer.mozilla.org/", + "https://developer.mozilla.org/en-US/docs", "https://developer.mozilla.org/en-US/docs", + "https://developer.mozilla.org/en-US/docs", "https://developer.mozilla.org/en-US/docs", + "http://www.example.com/", "type error", "type error" }, IE = {}) public void ctor() throws Exception { final String html = "\n" + "\n" + " \n" @@ -101,7 +102,8 @@ public void ctor() throws Exception { + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + + loadPageVerifyTitle2(html); } /** @@ -115,10 +117,11 @@ public void origin() throws Exception { "\n" + "\n" + " \n" @@ -126,7 +129,7 @@ public void origin() throws Exception { + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -138,7 +141,7 @@ public void createObjectURL() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" - + "foo\n" + + "\n" + "\n" @@ -202,6 +206,582 @@ public void searchParams() throws Exception { + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); + } + + @Test + @Alerts(DEFAULT = {"/", "/en-US/docs", "/en-US/docs"}, + IE = {}) + public void getPathName() throws Exception { + final String html = + "\n" + + "\n" + + " \n" + + "\n" + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + @Test + @Alerts(DEFAULT = {"/path", "/path", + "http://developer.mozilla.org/new/path?a=u&x", + "http://developer.mozilla.org/?a=u&x"}, + IE = {}) + public void setPathName() throws Exception { + final String html = + "\n" + + "\n" + + " \n" + + "\n" + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + @Test + @Alerts(DEFAULT = {"", "#abcd", "#bcd", + "#hash", "http://developer.mozilla.org/?a=b#hash", + "", "http://developer.mozilla.org/?a=b", + "#undefined", "http://developer.mozilla.org/#undefined", + "#null", "http://developer.mozilla.org/#null"}, + IE = {}) + public void hash() throws Exception { + final String html = + "\n" + + "\n" + + " \n" + + "\n" + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + @Test + @Alerts(DEFAULT = {"developer.mozilla.org", "developer.mozilla.org", + "new.host", "new.host:1234", "new.host:1234", "0.0.91.160:80", + "0.0.0.17:80", "0.0.6.182:80", + "new.host", "new.host", + "developer.mozilla.org", "developer.mozilla.org:4097", "developer.mozilla.org:80"}, + IE = {}) + public void host() throws Exception { + final String html = + "\n" + + "\n" + + " \n" + + "\n" + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + @Test + @Alerts(DEFAULT = {"developer.mozilla.org", + "developer.mozilla.org", "https://developer.mozilla.org/en-US/docs/Web/API/URL/host", + "newhost", "https://newhost/en-US/docs/Web/API/URL/host", + "newhost", "https://newhost/en-US/docs/Web/API/URL/host"}, + CHROME = {"developer.mozilla.org", + "developer.mozilla.org", "https://developer.mozilla.org/en-US/docs/Web/API/URL/host", + "newhost", "https://newhost/en-US/docs/Web/API/URL/host", + "%20%20", "https://%20%20/en-US/docs/Web/API/URL/host"}, + EDGE = {"developer.mozilla.org", + "developer.mozilla.org", "https://developer.mozilla.org/en-US/docs/Web/API/URL/host", + "newhost", "https://newhost/en-US/docs/Web/API/URL/host", + "%20%20", "https://%20%20/en-US/docs/Web/API/URL/host"}, + IE = {}) + @HtmlUnitNYI(CHROME = {"developer.mozilla.org", + "developer.mozilla.org", "https://developer.mozilla.org/en-US/docs/Web/API/URL/host", + "newhost", "https://newhost/en-US/docs/Web/API/URL/host", + "%20%20", "https:// /en-US/docs/Web/API/URL/host"}, + EDGE = {"developer.mozilla.org", + "developer.mozilla.org", "https://developer.mozilla.org/en-US/docs/Web/API/URL/host", + "newhost", "https://newhost/en-US/docs/Web/API/URL/host", + "%20%20", "https:// /en-US/docs/Web/API/URL/host"}) + public void hostname() throws Exception { + final String html = + "\n" + + "\n" + + " \n" + + "\n" + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + @Test + @Alerts(DEFAULT = {"https://developer.mozilla.org/en-US/docs/Web/API/URL/host", + "http://new.com/href", "http://new.com/hrefWithPort"}, + IE = {}) + public void href() throws Exception { + final String html = + "\n" + + "\n" + + " \n" + + "\n" + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + @Test + @Alerts(DEFAULT = {"flabada", + "", "https://anonymous@developer.mozilla.org/", + "pass", "https://anonymous:pass@developer.mozilla.org/", + "17", "https://anonymous:17@developer.mozilla.org/", + "undefined", "https://anonymous:undefined@developer.mozilla.org/", + "null", "https://anonymous:null@developer.mozilla.org/"}, + IE = {}) + public void password() throws Exception { + final String html = + "\n" + + "\n" + + " \n" + + "\n" + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + @Test + @Alerts(DEFAULT = {"80", "123", "", "https://mydomain.com/svn/Repos/", + "", "http://mydomain.com/svn/Repos/"}, + IE = {}) + public void port() throws Exception { + final String html = + "\n" + + "\n" + + " \n" + + "\n" + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + @Test + @Alerts(DEFAULT = {"https:", + "http:", "http://mydomain.com/svn/Repos/", + "http:", "http://mydomain.com/svn/Repos/", + "axdeg:", "axdeg://mydomain.com/svn/Repos/", + "http:", "http://mydomain.com/svn/Repos/", + "http:", "http://mydomain.com/svn/Repos/", + "http:", "http://mydomain.com/svn/Repos/", + "null:", "null://mydomain.com/svn/Repos/", + "ex-unknown"}, + IE = {}) + public void protocol() throws Exception { + final String html = + "\n" + + "\n" + + " \n" + + "\n" + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + @Test + @Alerts(DEFAULT = {"?q=123", + "?a=b&c=d", "https://developer.mozilla.org/search?a=b&c=d", + "?a=7", "https://developer.mozilla.org/search?a=7", + "?17", "https://developer.mozilla.org/search?17", + "", "https://developer.mozilla.org/search", + "?undefined", "https://developer.mozilla.org/search?undefined", + "?null", "https://developer.mozilla.org/search?null"}, + IE = {}) + public void search() throws Exception { + final String html = + "\n" + + "\n" + + " \n" + + "\n" + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + @Test + @Alerts(DEFAULT = {"anonymous", + "user", "https://user:flabada@developer.mozilla.org/", + "", "https://:flabada@developer.mozilla.org/", + "anonymous", "anonymous", "", "", + "user", "https://user:pass@developer.mozilla.org/", + "17", "https://17:pass@developer.mozilla.org/", + "undefined", "https://undefined:pass@developer.mozilla.org/", + "null", "https://null:pass@developer.mozilla.org/"}, + IE = {}) + public void username() throws Exception { + final String html = + "\n" + + "\n" + + " \n" + + "\n" + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"function URL() { [native code] }", + "function URL() { [native code] }", + "function URL() { [native code] }", + "https://developer.mozilla.org/", + "https://developer.mozilla.org/", + "https://developer.mozilla.org/"}, + IE = {}) + public void testToString() throws Exception { + final String html = "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + @Test + @Alerts(DEFAULT = "https://developer.mozilla.org/", + IE = {}) + public void testToJSON() throws Exception { + final String html = "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WeakMapTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WeakMapTest.java index c0ec0f72e..0cb078174 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WeakMapTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WeakMapTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WeakSetTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WeakSetTest.java index 2e916f607..78a02852f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WeakSetTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WeakSetTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WebSocketTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WebSocketTest.java index 7892a83e9..c1408ffdd 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WebSocketTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WebSocketTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -410,29 +410,29 @@ public void onWebSocketClose(final int closeCode, final String message) { */ @Test @Alerts(DEFAULT = {"onOpenListener", - "onOpen", "open", "[object WebSocket]", "[object WebSocket]", - "undefined", "undefined", "undefined", "undefined", - "onMessageTextListener", "message", "[object WebSocket]", "[object WebSocket]", - "server_text", "§§URL§§", "", "null", - "onMessageText", "message", "[object WebSocket]", "[object WebSocket]", - "server_text", "§§URL§§", "", "null", - "onMessageBinaryListener", "message", "[object WebSocket]", "[object WebSocket]", - "[object ArrayBuffer]", "§§URL§§", "", "null", - "onMessageBinary", "message", "[object WebSocket]", "[object WebSocket]", - "[object ArrayBuffer]", "§§URL§§", "", "null", - "onCloseListener code: 1000", - "onClose code: 1000"}, + "onOpen", "open", "[object WebSocket]", "[object WebSocket]", + "undefined", "undefined", "undefined", "undefined", + "onMessageTextListener", "message", "[object WebSocket]", "[object WebSocket]", + "server_text", "§§URL§§", "", "null", + "onMessageText", "message", "[object WebSocket]", "[object WebSocket]", + "server_text", "§§URL§§", "", "null", + "onMessageBinaryListener", "message", "[object WebSocket]", "[object WebSocket]", + "[object ArrayBuffer]", "§§URL§§", "", "null", + "onMessageBinary", "message", "[object WebSocket]", "[object WebSocket]", + "[object ArrayBuffer]", "§§URL§§", "", "null", + "onCloseListener code: 1000", + "onClose code: 1000"}, IE = {"onOpenListener", "onOpen", "open", "[object WebSocket]", "[object WebSocket]", - "undefined", "undefined", "undefined", "undefined", + "undefined", "undefined", "undefined", "undefined", "onMessageTextListener", "message", "[object WebSocket]", "[object WebSocket]", - "server_text", "", "undefined", "null", + "server_text", "", "undefined", "null", "onMessageText", "message", "[object WebSocket]", "[object WebSocket]", - "server_text", "", "undefined", "null", + "server_text", "", "undefined", "null", "onMessageBinaryListener", "message", "[object WebSocket]", "[object WebSocket]", - "[object ArrayBuffer]", "", "undefined", "null", + "[object ArrayBuffer]", "", "undefined", "null", "onMessageBinary", "message", "[object WebSocket]", "[object WebSocket]", - "[object ArrayBuffer]", "", "undefined", "null", + "[object ArrayBuffer]", "", "undefined", "null", "onCloseListener code: 1000", "onClose code: 1000"}) public void events() throws Exception { @@ -468,57 +468,57 @@ public void events() throws Exception { */ @Test @Alerts(DEFAULT = {"onOpenListener", - "onOpen", "open", "[object WebSocket]", "[object WebSocket]", - "undefined", "undefined", "undefined", "undefined", - "onMessageTextListener", "message", "[object WebSocket]", "[object WebSocket]", - "server_text", "§§URL§§", "", "null", - "onMessageText", "message", "[object WebSocket]", "[object WebSocket]", - "server_text", "§§URL§§", "", "null", - "onMessageBinaryListener", "message", "[object WebSocket]", "[object WebSocket]", - "[object ArrayBuffer]", "§§URL§§", "", "null", - "onMessageBinary", "message", "[object WebSocket]", "[object WebSocket]", - "[object ArrayBuffer]", "§§URL§§", "", "null", - "onCloseListener code: 1000 wasClean: true", - "onClose code: 1000 wasClean: true"}, + "onOpen", "open", "[object WebSocket]", "[object WebSocket]", + "undefined", "undefined", "undefined", "undefined", + "onMessageTextListener", "message", "[object WebSocket]", "[object WebSocket]", + "server_text", "§§URL§§", "", "null", + "onMessageText", "message", "[object WebSocket]", "[object WebSocket]", + "server_text", "§§URL§§", "", "null", + "onMessageBinaryListener", "message", "[object WebSocket]", "[object WebSocket]", + "[object ArrayBuffer]", "§§URL§§", "", "null", + "onMessageBinary", "message", "[object WebSocket]", "[object WebSocket]", + "[object ArrayBuffer]", "§§URL§§", "", "null", + "onCloseListener code: 1000 wasClean: true", + "onClose code: 1000 wasClean: true"}, FF = {"onOpenListener", - "onOpen", "open", "[object WebSocket]", "[object WebSocket]", - "undefined", "undefined", "undefined", "undefined", - "onMessageTextListener", "message", "[object WebSocket]", "[object WebSocket]", - "server_text", "§§URL§§", "", "null", - "onMessageText", "message", "[object WebSocket]", "[object WebSocket]", - "server_text", "§§URL§§", "", "null", - "onMessageBinaryListener", "message", "[object WebSocket]", "[object WebSocket]", - "[object ArrayBuffer]", "§§URL§§", "", "null", - "onMessageBinary", "message", "[object WebSocket]", "[object WebSocket]", - "[object ArrayBuffer]", "§§URL§§", "", "null", - "onCloseListener code: 1000 wasClean: false", - "onClose code: 1000 wasClean: false"}, + "onOpen", "open", "[object WebSocket]", "[object WebSocket]", + "undefined", "undefined", "undefined", "undefined", + "onMessageTextListener", "message", "[object WebSocket]", "[object WebSocket]", + "server_text", "§§URL§§", "", "null", + "onMessageText", "message", "[object WebSocket]", "[object WebSocket]", + "server_text", "§§URL§§", "", "null", + "onMessageBinaryListener", "message", "[object WebSocket]", "[object WebSocket]", + "[object ArrayBuffer]", "§§URL§§", "", "null", + "onMessageBinary", "message", "[object WebSocket]", "[object WebSocket]", + "[object ArrayBuffer]", "§§URL§§", "", "null", + "onCloseListener code: 1000 wasClean: false", + "onClose code: 1000 wasClean: false"}, FF78 = {"onOpenListener", - "onOpen", "open", "[object WebSocket]", "[object WebSocket]", + "onOpen", "open", "[object WebSocket]", "[object WebSocket]", "undefined", "undefined", "undefined", "undefined", - "onMessageTextListener", "message", "[object WebSocket]", "[object WebSocket]", + "onMessageTextListener", "message", "[object WebSocket]", "[object WebSocket]", "server_text", "§§URL§§", "", "null", - "onMessageText", "message", "[object WebSocket]", "[object WebSocket]", + "onMessageText", "message", "[object WebSocket]", "[object WebSocket]", "server_text", "§§URL§§", "", "null", - "onMessageBinaryListener", "message", "[object WebSocket]", "[object WebSocket]", + "onMessageBinaryListener", "message", "[object WebSocket]", "[object WebSocket]", "[object ArrayBuffer]", "§§URL§§", "", "null", - "onMessageBinary", "message", "[object WebSocket]", "[object WebSocket]", + "onMessageBinary", "message", "[object WebSocket]", "[object WebSocket]", "[object ArrayBuffer]", "§§URL§§", "", "null", - "onCloseListener code: 1000 wasClean: false", - "onClose code: 1000 wasClean: false"}, + "onCloseListener code: 1000 wasClean: false", + "onClose code: 1000 wasClean: false"}, IE = {"onOpenListener", - "onOpen", "open", "[object WebSocket]", "[object WebSocket]", - "undefined", "undefined", "undefined", "undefined", - "onMessageTextListener", "message", "[object WebSocket]", "[object WebSocket]", - "server_text", "", "undefined", "null", - "onMessageText", "message", "[object WebSocket]", "[object WebSocket]", - "server_text", "", "undefined", "null", - "onMessageBinaryListener", "message", "[object WebSocket]", "[object WebSocket]", - "[object ArrayBuffer]", "", "undefined", "null", - "onMessageBinary", "message", "[object WebSocket]", "[object WebSocket]", - "[object ArrayBuffer]", "", "undefined", "null", - "onCloseListener code: 1000 wasClean: true", - "onClose code: 1000 wasClean: true"}) + "onOpen", "open", "[object WebSocket]", "[object WebSocket]", + "undefined", "undefined", "undefined", "undefined", + "onMessageTextListener", "message", "[object WebSocket]", "[object WebSocket]", + "server_text", "", "undefined", "null", + "onMessageText", "message", "[object WebSocket]", "[object WebSocket]", + "server_text", "", "undefined", "null", + "onMessageBinaryListener", "message", "[object WebSocket]", "[object WebSocket]", + "[object ArrayBuffer]", "", "undefined", "null", + "onMessageBinary", "message", "[object WebSocket]", "[object WebSocket]", + "[object ArrayBuffer]", "", "undefined", "null", + "onCloseListener code: 1000 wasClean: true", + "onClose code: 1000 wasClean: true"}) @NotYetImplemented({FF, FF78}) public void wasClean() throws Exception { expandExpectedAlertsVariables("ws://localhost:" + PORT); @@ -553,8 +553,8 @@ public void wasClean() throws Exception { */ @Test @Alerts({"onError[object Event]", - "onCloseListener code: 1006 wasClean: false", - "onClose code: 1006 wasClean: false"}) + "onCloseListener code: 1006 wasClean: false", + "onClose code: 1006 wasClean: false"}) public void eventsNoSocketServer() throws Exception { startWebServer("src/test/resources/com/gargoylesoftware/htmlunit/javascript/host", null, null, null); try { diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Window2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Window2Test.java index 5a4743fb6..50dd0fbfe 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Window2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Window2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -55,21 +55,22 @@ public void thisIsWindow() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -81,14 +82,15 @@ public void thisIsWindow2() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -103,15 +105,16 @@ public void FF_controllers() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -123,11 +126,12 @@ public void FF_controllers_set() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -153,12 +157,13 @@ public void atob() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -170,15 +175,16 @@ public void atobUnicode() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -224,12 +230,13 @@ public void atobNull() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -241,12 +248,13 @@ public void atobUndefined() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -257,22 +265,23 @@ public void atobUndefined() throws Exception { */ @Test @Alerts({"getClass: undefined,undefined", "java: undefined,undefined", "javax: undefined,undefined", - "javafx: undefined,undefined", "org: undefined,undefined", "com: undefined,undefined", - "edu: undefined,undefined", "net: undefined,undefined", "JavaAdapter: undefined,undefined", - "JavaImporter: undefined,undefined", "Continuation: undefined,undefined", "Packages: undefined,undefined", - "XML: undefined,undefined", "XMLList: undefined,undefined", "Namespace: undefined,undefined", - "QName: undefined,undefined", "arguments: undefined,undefined", "load: undefined,undefined", - "loadWithNewGlobal: undefined,undefined", "exit: undefined,undefined", "quit: undefined,undefined", - "__FILE__: undefined,undefined", "__DIR__: undefined,undefined", "__LINE__: undefined,undefined", - "context: undefined,undefined", "engine: undefined,undefined", "__noSuchProperty__: undefined,undefined", - "Java: undefined,undefined", "JSAdapter: undefined,undefined", - "NaN: number,number", "Infinity: number,number", "eval: function,function", "print: function,function", - "parseInt: function,function", "parseFloat: function,function", - "isNaN: function,function", "isFinite: function,function", "encodeURI: function,function", - "encodeURIComponent: function,function", "decodeURI: function,function", - "decodeURIComponent: function,function", "escape: function,function", "unescape: function,function"}) + "javafx: undefined,undefined", "org: undefined,undefined", "com: undefined,undefined", + "edu: undefined,undefined", "net: undefined,undefined", "JavaAdapter: undefined,undefined", + "JavaImporter: undefined,undefined", "Continuation: undefined,undefined", "Packages: undefined,undefined", + "XML: undefined,undefined", "XMLList: undefined,undefined", "Namespace: undefined,undefined", + "QName: undefined,undefined", "arguments: undefined,undefined", "load: undefined,undefined", + "loadWithNewGlobal: undefined,undefined", "exit: undefined,undefined", "quit: undefined,undefined", + "__FILE__: undefined,undefined", "__DIR__: undefined,undefined", "__LINE__: undefined,undefined", + "context: undefined,undefined", "engine: undefined,undefined", "__noSuchProperty__: undefined,undefined", + "Java: undefined,undefined", "JSAdapter: undefined,undefined", + "NaN: number,number", "Infinity: number,number", "eval: function,function", "print: function,function", + "parseInt: function,function", "parseFloat: function,function", + "isNaN: function,function", "isFinite: function,function", "encodeURI: function,function", + "encodeURIComponent: function,function", "decodeURI: function,function", + "decodeURIComponent: function,function", "escape: function,function", "unescape: function,function"}) public void topLevelProperties() throws Exception { - final String[] properties = {"getClass", "java", "javax", "javafx", "org", "com", "edu", "net", "JavaAdapter", + final String[] properties = { + "getClass", "java", "javax", "javafx", "org", "com", "edu", "net", "JavaAdapter", "JavaImporter", "Continuation", "Packages", "XML", "XMLList", "Namespace", "QName", "arguments", "load", "loadWithNewGlobal", "exit", "quit", "__FILE__", "__DIR__", "__LINE__", "context", "engine", "__noSuchProperty__", "Java", "JSAdapter", @@ -281,12 +290,13 @@ public void topLevelProperties() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html, 3 * DEFAULT_WAIT_TIME); + loadPageVerifyTitle2(html); } /** @@ -299,12 +309,14 @@ public void topLevelPropertiesWithDot() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + + loadPageVerifyTitle2(html); } /** @@ -313,17 +325,18 @@ public void topLevelPropertiesWithDot() throws Exception { @Test @Alerts("exception") public void execScript2() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -332,15 +345,16 @@ public void execScript2() throws Exception { @Test @Alerts("exception") public void execScript_returnValue() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -350,14 +364,15 @@ public void execScript_returnValue() throws Exception { @Alerts(DEFAULT = "undefined", IE = "function") public void collectGarbage() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -366,12 +381,13 @@ public void collectGarbage() throws Exception { @Test @Alerts({"original", "changed"}) public void eval_localVariable() throws Exception { - final String html = "foo\n" + "
\n" @@ -379,7 +395,7 @@ public void eval_localVariable() throws Exception { + "
\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -388,21 +404,20 @@ public void eval_localVariable() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"function Node() {\n [native code]\n}", "function Element() {\n [native code]\n}"}, - CHROME = {"function Node() { [native code] }", "function Element() { [native code] }"}, - EDGE = {"function Node() { [native code] }", "function Element() { [native code] }"}, + @Alerts(DEFAULT = {"function Node() { [native code] }", "function Element() { [native code] }"}, IE = {"[object Node]", "[object Element]"}) public void windowProperties() throws Exception { - final String html = "foo\n" + "
\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -413,12 +428,13 @@ public void windowProperties() throws Exception { @Alerts({"0", "0"}) public void framesLengthZero() throws Exception { final String html - = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -431,11 +447,12 @@ public void framesLengthAndFrameAccess() throws Exception { final String html = "\n" + "\n" + "\n" @@ -444,7 +461,7 @@ public void framesLengthAndFrameAccess() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -456,14 +473,15 @@ public void windowFramesLive() throws Exception { final String html = "\n" + "\n" + "\n" @@ -472,7 +490,7 @@ public void windowFramesLive() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -484,15 +502,16 @@ public void windowFramesLive() throws Exception { @Alerts("hello") public void overwriteFunctions_navigator() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -532,13 +551,14 @@ public void onbeforeunload_notDefined() throws Exception { private void onbeforeunload(final String name, final String js) throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -548,37 +568,38 @@ private void onbeforeunload(final String name, final String js) throws Exception */ @Test @Alerts({"[object Window]", "[object Window]", "[object Window]", "1", "true", "true", - "[object Window]", "true", "true", "no function", "undefined", "true", "true", - "[object History]", "true", "true", "[object Window]", "true", "true"}) + "[object Window]", "true", "true", "no function", "undefined", "true", "true", + "[object History]", "true", "true", "[object Window]", "true", "true"}) public void framesAreWindows() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -590,9 +611,7 @@ public void framesAreWindows() throws Exception { public void open() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -603,12 +622,12 @@ public void open() throws Exception { final String windowContent = "\n" + "\n" + "\n" + ""; getMockWebConnection().setDefaultResponse(windowContent); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); // for unknown reason, the selenium driven browser is in an invalid state after this test releaseResources(); @@ -624,9 +643,7 @@ public void open() throws Exception { public void openWindowParams() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -637,12 +654,12 @@ public void openWindowParams() throws Exception { final String windowContent = "\n" + "\n" + "\n" + ""; getMockWebConnection().setDefaultResponse(windowContent); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); // for unknown reason, the selenium driven browser is in an invalid state after this test releaseResources(); @@ -692,22 +709,23 @@ public void openWindowParamReplace() throws Exception { */ @Test @Alerts(DEFAULT = {"[object Window]", "[object Window] (true)", "1234 (true)", "null (true)", "undefined (true)", - "[object Window] (true)", "[object Window] (true)", "[object Window] (true)"}, + "[object Window] (true)", "[object Window] (true)", "[object Window] (true)"}, IE = {"[object Window]", "[object Window] (true)", "exception", "null (true)", "undefined (true)", - "[object Window] (true)", "[object Window] (true)", "[object Window] (true)"}) + "[object Window] (true)", "[object Window] (true)", "[object Window] (true)"}) public void set_opener() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -760,17 +779,18 @@ public void IEScriptEngineXxx() throws Exception { public void heightsAndWidths() throws Exception { final String html = "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -783,14 +803,15 @@ public void heightsAndWidths() throws Exception { public void setInnerWidth() throws Exception { final String html = "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -803,14 +824,15 @@ public void setInnerWidth() throws Exception { public void setInnerHeight() throws Exception { final String html = "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -823,14 +845,15 @@ public void setInnerHeight() throws Exception { public void setOuterWidth() throws Exception { final String html = "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -843,14 +866,15 @@ public void setOuterWidth() throws Exception { public void setOuterHeight() throws Exception { final String html = "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -870,23 +894,24 @@ public void changeHeightsAndWidths() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -895,7 +920,7 @@ public void changeHeightsAndWidths() throws Exception { */ @Test @Alerts(DEFAULT = {"0,0", "100,200", "110,230", "0,0", "no scrollByLines()", "0,0", "no scrollByPages()"}, - FF = {"0,0", "100,200", "110,230", "0,0", "0,85", "0,0", "0,1274"}, + FF = {"0,0", "100,200", "110,230", "0,0", "0,0", "0,0", "0,0"}, FF78 = {"0,0", "100,200", "110,230", "0,0", "0,85", "0,0", "0,1274"}) @NotYetImplemented({FF, FF78}) public void scrolling1() throws Exception { @@ -919,32 +944,33 @@ private void scrolling(final boolean addHugeDiv) throws Exception { = "\n" + (addHugeDiv ? "
\n" : "") + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -956,16 +982,17 @@ private void scrolling(final boolean addHugeDiv) throws Exception { public void pageXOffset() throws Exception { final String html = "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -976,9 +1003,10 @@ public void pageXOffset() throws Exception { public void typeof() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -991,13 +1019,14 @@ public void typeof() throws Exception { public void mozInnerScreen() throws Exception { final String html = "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1008,12 +1037,13 @@ public void mozInnerScreen() throws Exception { public void mozPaintCount() throws Exception { final String html = "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1024,22 +1054,23 @@ public void mozPaintCount() throws Exception { public void eval() throws Exception { final String html = "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1050,25 +1081,26 @@ public void eval() throws Exception { @Alerts({"true", "I was here"}) public void firedEvent_equals_original_event() throws Exception { final String html = - "First\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1078,19 +1110,20 @@ public void firedEvent_equals_original_event() throws Exception { @Alerts({"true", "true", "true", "true"}) public void thisEquals() throws Exception { final String html = - "First\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1100,24 +1133,25 @@ public void thisEquals() throws Exception { @Alerts({"null", "function", "null", "null"}) public void onbeforeunload() throws Exception { final String html = - "First\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1134,19 +1168,20 @@ public void functionPrototypeArguments() throws Exception { "\n" + "\n" + ""; if (getWebDriver() instanceof HtmlUnitDriver) { getWebWindowOf((HtmlUnitDriver) getWebDriver()).getWebClient() .getOptions().setThrowExceptionOnScriptError(false); } - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** * @throws Exception if an error occurs */ @Test - @Alerts({"string string 7 number string", - "string string 8 number object"}) + @Alerts({"string string 8 number string", + "string string 9 number object"}) public void onErrorExceptionInstance() throws Exception { final String html = "\n" + "\n" @@ -1268,22 +1307,23 @@ public void onErrorExceptionInstance() throws Exception { getWebWindowOf((HtmlUnitDriver) getWebDriver()).getWebClient() .getOptions().setThrowExceptionOnScriptError(false); } - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = {"string string 7 number object", "string string 1 number object"}, - IE = {"string string 7 number object", "string string 8 number object"}) + @Alerts(DEFAULT = {"string string 8 number object", "string string 1 number object"}, + IE = {"string string 9 number object", "string string 8 number object"}) @NotYetImplemented(IE) public void onErrorExceptionInstance2() throws Exception { final String html = "\n" + "\n" @@ -1295,7 +1335,7 @@ public void onErrorExceptionInstance2() throws Exception { getWebWindowOf((HtmlUnitDriver) getWebDriver()).getWebClient() .getOptions().setThrowExceptionOnScriptError(false); } - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1307,9 +1347,10 @@ public void onErrorModifyObject() throws Exception { final String html = "\n" + "\n" + "\n" @@ -1319,7 +1360,7 @@ public void onErrorModifyObject() throws Exception { getWebWindowOf((HtmlUnitDriver) getWebDriver()).getWebClient() .getOptions().setThrowExceptionOnScriptError(false); } - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1331,12 +1372,13 @@ public void getComputedStyle() throws Exception { final String html = "\n" + "
\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1350,9 +1392,10 @@ public void getComputedStyle_WithComputedColor() throws Exception { + " \n" + " \n" + "\n" + "\n" @@ -1361,7 +1404,7 @@ public void getComputedStyle_WithComputedColor() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1374,12 +1417,13 @@ public void getComputedStyle_svg() throws Exception { final String html = "\n" + " \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1393,12 +1437,13 @@ public void hangingObjectCallOnWindowProxy() throws Exception { final String html = "\n" + ";\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1411,11 +1456,12 @@ public void hangingObjectCallOnWindowProxy() throws Exception { public void equalsString() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1428,12 +1474,13 @@ public void equalsString() throws Exception { public void equalsInt() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1762,10 +1809,11 @@ public void setIntervalShouldNotBeExecutedBeforeHandlers() throws Exception { public void onchange_noHandler() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1801,11 +1849,12 @@ public void onsubmit_noHandler() throws Exception { + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1846,9 +1895,9 @@ public void onsubmit_withHandler() throws Exception { */ @Test @Alerts(DEFAULT = {"type: message", "bubbles: false", "cancelable: false", "data: hello", - "origin: ", "source: [object Window]", "lastEventId: "}, + "origin: ", "source: [object Window]", "lastEventId: "}, IE = {"type: message", "bubbles: false", "cancelable: false", "data: hello", - "origin: ", "source: [object Window]", "lastEventId: undefined"}) + "origin: ", "source: [object Window]", "lastEventId: undefined"}) public void postMessage() throws Exception { final String[] expectedAlerts = getExpectedAlerts(); expectedAlerts[4] += "http://localhost:" + PORT; @@ -1856,17 +1905,18 @@ public void postMessage() throws Exception { final String html = "\n" - + "foo\n" + + "\n" + "\n" + ""; getMockWebConnection().setResponse(URL_SECOND, iframe); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1924,12 +1974,13 @@ public void postMessageFromClick() throws Exception { public void postMessageSyncOrAsync() throws Exception { final String html = "\n" - + "foo\n" + + "\n" + "\n" + "\n" @@ -1942,7 +1993,7 @@ public void postMessageSyncOrAsync() throws Exception { + ""; getMockWebConnection().setResponse(URL_SECOND, iframe); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2047,15 +2098,16 @@ public void openWindow_emptyUrl() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2067,13 +2119,14 @@ public void location() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2171,30 +2224,31 @@ public void setDocumentLocation() throws Exception { */ @Test @Alerts(DEFAULT = {"[object Window]", "function Window() { [native code] }", - "TEMPORARY, PERSISTENT, "}, - FF = {"[object Window]", "function Window() {\n [native code]\n}", ""}, - FF78 = {"[object Window]", "function Window() {\n [native code]\n}", ""}, + "TEMPORARY, PERSISTENT, "}, + FF = {"[object Window]", "function Window() { [native code] }", ""}, + FF78 = {"[object Window]", "function Window() { [native code] }", ""}, IE = {"[object Window]", "[object Window]", ""}) public void enumeratedProperties() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2209,11 +2263,12 @@ public void dump() throws Exception { = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2224,11 +2279,12 @@ public void dump() throws Exception { public void requestAnimationFrame() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2240,10 +2296,11 @@ public void requestAnimationFrame() throws Exception { public void showModalDialog() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2255,10 +2312,11 @@ public void showModalDialog() throws Exception { public void showModelessDialog() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2271,10 +2329,11 @@ public void showModelessDialog() throws Exception { public void find() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2294,9 +2353,10 @@ public void getComputedStylePseudo() throws Exception { + " }\n" + " \n" + " \n" + "\n" @@ -2305,7 +2365,7 @@ public void getComputedStylePseudo() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2325,10 +2385,11 @@ public void getComputedStylePseudoCache() throws Exception { + " }\n" + " \n" + " \n" + "\n" @@ -2337,7 +2398,7 @@ public void getComputedStylePseudoCache() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2351,6 +2412,7 @@ public void getComputedStyleElementDocument() throws Exception { + " tt { display: none; }\n" + "\n" + "\n" + "\n" + "\n"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2375,12 +2437,13 @@ public void in() throws Exception { final String html = "\n" + "\n" + "\n" @@ -2388,7 +2451,7 @@ public void in() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2399,18 +2462,16 @@ public void in() throws Exception { public void calledTwice() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2421,16 +2482,17 @@ public void calledTwice() throws Exception { public void constructor() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2481,18 +2543,19 @@ public void objectCallOnFrameWindow() throws Exception { public void test__proto__() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2506,16 +2569,17 @@ public void test__proto__() throws Exception { public void clientInformation() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2527,11 +2591,12 @@ public void xmlNotInWindow() throws Exception { final String html = "\n" + "\n" + "\n" @@ -2539,6 +2604,6 @@ public void xmlNotInWindow() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Window3Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Window3Test.java index 7adeedb54..89b20b02c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Window3Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/Window3Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,6 +32,7 @@ import org.junit.runner.RunWith; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; @@ -398,6 +399,40 @@ public void scroll() throws Exception { loadPageWithAlerts2(html); } + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"document", "body"}, + IE = "document") + @HtmlUnitNYI(IE = {"document", "body"}) + public void scrollEvents() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "
\n" + + + " \n" + + "\n" + + ""; + final WebDriver driver = loadPage2(html); + + final WebElement textArea = driver.findElement(By.id("myTextArea")); + assertEquals(String.join("; ", getExpectedAlerts()) + "; ", textArea.getAttribute("value")); + } + /** * Test that Window.scrollBy method gets correctly called and handled by the scripting engine. * @throws Exception if the test fails @@ -412,6 +447,40 @@ public void scrollBy() throws Exception { loadPageWithAlerts2(html); } + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"document", "body"}, + IE = "document") + @HtmlUnitNYI(IE = {"document", "body"}) + public void scrollByEvents() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "
\n" + + + " \n" + + "\n" + + ""; + final WebDriver driver = loadPage2(html); + + final WebElement textArea = driver.findElement(By.id("myTextArea")); + assertEquals(String.join("; ", getExpectedAlerts()) + "; ", textArea.getAttribute("value")); + } + /** * Test that Window.scrollByLines method gets correctly called and handled by the scripting engine. * @throws Exception if the test fails @@ -464,6 +533,40 @@ public void scrollTo() throws Exception { loadPageWithAlerts2(html); } + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"document", "body"}, + IE = "document") + @HtmlUnitNYI(IE = {"document", "body"}) + public void scrollToEvents() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "
\n" + + + " \n" + + "\n" + + ""; + final WebDriver driver = loadPage2(html); + + final WebElement textArea = driver.findElement(By.id("myTextArea")); + assertEquals(String.join("; ", getExpectedAlerts()) + "; ", textArea.getAttribute("value")); + } + /** * @throws Exception if the test fails */ @@ -1417,6 +1520,7 @@ public void openWindow_aboutblank_img() throws Exception { getMockWebConnection().setDefaultResponse("Error: not found", 404, "Not Found", com.gargoylesoftware.htmlunit.util.MimeType.TEXT_HTML); + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html); } @@ -1442,6 +1546,7 @@ public void openWindow_aboutblank_document_img() throws Exception { getMockWebConnection().setDefaultResponse("Error: not found", 404, "Not Found", com.gargoylesoftware.htmlunit.util.MimeType.TEXT_HTML); + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html); } @@ -1466,6 +1571,7 @@ public void openWindow_empty_img() throws Exception { getMockWebConnection().setDefaultResponse("Error: not found", 404, "Not Found", com.gargoylesoftware.htmlunit.util.MimeType.TEXT_HTML); + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html); } @@ -1609,37 +1715,37 @@ public void getComputedStyle() throws Exception { */ @Test @Alerts(DEFAULT = {"window DOMContentLoaded 1 capture", - "window DOMContentLoaded 2 capture", - "document DOMContentLoaded 1", - "document DOMContentLoaded 1 capture", - "document DOMContentLoaded 2", - "document DOMContentLoaded 2 capture", - "window DOMContentLoaded 1", - "window DOMContentLoaded 2", - "window at load 1", - "window at load 1 capture", - "window at load 2", - "onload 2", - "window at load 2 capture", - "after"}, + "window DOMContentLoaded 2 capture", + "document DOMContentLoaded 1", + "document DOMContentLoaded 1 capture", + "document DOMContentLoaded 2", + "document DOMContentLoaded 2 capture", + "window DOMContentLoaded 1", + "window DOMContentLoaded 2", + "window at load 1", + "window at load 1 capture", + "window at load 2", + "onload 2", + "window at load 2 capture", + "after"}, IE = {"window DOMContentLoaded 1 capture", - "window DOMContentLoaded 2 capture", - "document DOMContentLoaded 1", - "document DOMContentLoaded 1 capture", - "document DOMContentLoaded 2", - "document DOMContentLoaded 2 capture", - "window DOMContentLoaded 1", - "window DOMContentLoaded 2", - "window at load 1", - "window at load 1 capture", - "window at load 2", - "onload 2", - "window at load 2 capture", - "document at load 1 capture", - "document at load 2 capture", - "document at load 1 capture", - "document at load 2 capture", - "after"}) + "window DOMContentLoaded 2 capture", + "document DOMContentLoaded 1", + "document DOMContentLoaded 1 capture", + "document DOMContentLoaded 2", + "document DOMContentLoaded 2 capture", + "window DOMContentLoaded 1", + "window DOMContentLoaded 2", + "window at load 1", + "window at load 1 capture", + "window at load 2", + "onload 2", + "window at load 2 capture", + "document at load 1 capture", + "document at load 2 capture", + "document at load 1 capture", + "document at load 2 capture", + "after"}) @NotYetImplemented(IE) // The extra 'document at load' from \n" + + ""; + + final WebDriver driver = loadPage2(html); + final String text = driver.getTitle().trim().replaceAll(";", "\n").trim(); + assertEquals(String.join("\n", getExpectedAlerts()), text); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({}) + public void onloadListenerFromBody() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + "\n" + + "\n" + + "\n" + + ""; + + final WebDriver driver = loadPage2(html); + final String text = driver.getTitle().trim().replaceAll(";", "\n").trim(); + assertEquals(String.join("\n", getExpectedAlerts()), text); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("onload from window") + public void onloadListenerFromBodyAndWindow() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + "\n" + + "\n" + + "\n" + + ""; + + final WebDriver driver = loadPage2(html); + final String text = driver.getTitle().trim().replaceAll(";", "\n").trim(); + assertEquals(String.join("\n", getExpectedAlerts()), text); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({}) + public void onloadListenerFromBodyAndWindowRemoved() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + "\n" + + "\n" + + "\n" + + ""; + + final WebDriver driver = loadPage2(html); + final String text = driver.getTitle().trim().replaceAll(";", "\n").trim(); + assertEquals(String.join("\n", getExpectedAlerts()), text); + } + /** * Tests propagation of a more or less basic event (click event) with regards to * handling of the capturing / bubbling / at target phases. @@ -2079,24 +2310,24 @@ public void propagation() throws Exception { */ @Test @Alerts({"window at click 1 capture", - "window at click 2 capture", - "d1 at click 1 capture", - "d1 at click 2 capture", - "d2 at click 1 capture", - "d2 at click 2 capture", - "d3 at click 1", - "d3 onclick", - "d3 at click 1 capture", - "d3 at click 2", - "d3 at click 2 capture", - "d2 at click 1", - "d2 onclick", - "d2 at click 2", - "d1 at click 1", - "d1 onclick", - "d1 at click 2", - "window at click 1", - "window at click 2"}) + "window at click 2 capture", + "d1 at click 1 capture", + "d1 at click 2 capture", + "d2 at click 1 capture", + "d2 at click 2 capture", + "d3 at click 1", + "d3 onclick", + "d3 at click 1 capture", + "d3 at click 2", + "d3 at click 2 capture", + "d2 at click 1", + "d2 onclick", + "d2 at click 2", + "d1 at click 1", + "d1 onclick", + "d1 at click 2", + "window at click 1", + "window at click 2"}) public void propagationNested() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" @@ -2238,27 +2469,27 @@ public void propagationNestedDetached() throws Exception { */ @Test @Alerts(DEFAULT = {"listener: stop propagation & return false", - "FIRED a1", - "listener: return true", - "property: return false", - "listener: return true", - "listener: prevented=false returnValue: true -> false (false)", - "listener: prevented=true returnValue: false -> true (false)", - "listener: prevented=true returnValue: false -> preventDefault() (false)", - "property: prevented=true returnValue: false -> return true", - "listener: prevented=true returnValue: false -> x (false)", - "listener: prevented=true returnValue: false -> null (false)"}, + "FIRED a1", + "listener: return true", + "property: return false", + "listener: return true", + "listener: prevented=false returnValue: true -> false (false)", + "listener: prevented=true returnValue: false -> true (false)", + "listener: prevented=true returnValue: false -> preventDefault() (false)", + "property: prevented=true returnValue: false -> return true", + "listener: prevented=true returnValue: false -> x (false)", + "listener: prevented=true returnValue: false -> null (false)"}, IE = {"listener: stop propagation & return false", - "FIRED a1", - "listener: return true", - "property: return false", - "listener: return true", - "listener: prevented=false returnValue: undefined -> false (false)", - "listener: prevented=false returnValue: false -> true (true)", - "listener: prevented=false returnValue: true -> preventDefault() (true)", - "property: prevented=true returnValue: true -> return true", - "listener: prevented=true returnValue: true -> x (x)", - "listener: prevented=true returnValue: x -> null (null)"}) + "FIRED a1", + "listener: return true", + "property: return false", + "listener: return true", + "listener: prevented=false returnValue: undefined -> false (false)", + "listener: prevented=false returnValue: false -> true (true)", + "listener: prevented=false returnValue: true -> preventDefault() (true)", + "property: prevented=true returnValue: true -> return true", + "listener: prevented=true returnValue: true -> x (x)", + "listener: prevented=true returnValue: x -> null (null)"}) public void stopPropagation() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WindowConcurrency2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WindowConcurrency2Test.java index ac1c48965..4ccb0b215 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WindowConcurrency2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WindowConcurrency2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WindowConcurrencyTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WindowConcurrencyTest.java index 5e42e3e02..7bc92d536 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WindowConcurrencyTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WindowConcurrencyTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WindowTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WindowTest.java index 1f0abe3e7..547797f41 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WindowTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/WindowTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/ArrayBufferTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/ArrayBufferTest.java index e7389b533..989b9ab73 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/ArrayBufferTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/ArrayBufferTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/ArrayBufferViewTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/ArrayBufferViewTest.java index dc6b270b0..5fcd59f82 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/ArrayBufferViewTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/ArrayBufferViewTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/DataViewTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/DataViewTest.java index 065a0fcb8..7a9bfffe1 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/DataViewTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/DataViewTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Float32ArrayTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Float32ArrayTest.java index aa5ab900e..9f5d994c3 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Float32ArrayTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Float32ArrayTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -190,8 +190,8 @@ public void nullConstructor() throws Exception { @Test @Alerts(DEFAULT = {"", "0", "1", "1,3", "1,3,4,7,11,0,123"}, IE = {"[object Float32Array]", "[object Float32Array]", - "[object Float32Array]", "[object Float32Array]", - "[object Float32Array]"}) + "[object Float32Array]", "[object Float32Array]", + "[object Float32Array]"}) @NotYetImplemented(IE) public void asString() throws Exception { final String html diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Float64ArrayTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Float64ArrayTest.java index 7061c29f5..c859f5638 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Float64ArrayTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Float64ArrayTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -190,8 +190,8 @@ public void nullConstructor() throws Exception { @Test @Alerts(DEFAULT = {"", "0", "1", "1,3", "1,3,4,7,11,0,123"}, IE = {"[object Float64Array]", "[object Float64Array]", - "[object Float64Array]", "[object Float64Array]", - "[object Float64Array]"}) + "[object Float64Array]", "[object Float64Array]", + "[object Float64Array]"}) @NotYetImplemented(IE) public void asString() throws Exception { final String html diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Int16ArrayTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Int16ArrayTest.java index c56d4eeae..f68fd3ed3 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Int16ArrayTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Int16ArrayTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -284,8 +284,8 @@ public void nullConstructor() throws Exception { @Test @Alerts(DEFAULT = {"", "0", "1", "1,3", "1,3,4,7,11,0,123"}, IE = {"[object Int16Array]", "[object Int16Array]", - "[object Int16Array]", "[object Int16Array]", - "[object Int16Array]"}) + "[object Int16Array]", "[object Int16Array]", + "[object Int16Array]"}) @NotYetImplemented(IE) public void asString() throws Exception { final String html diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Int32ArrayTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Int32ArrayTest.java index 56079269f..66b5a89c5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Int32ArrayTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Int32ArrayTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -190,8 +190,8 @@ public void nullConstructor() throws Exception { @Test @Alerts(DEFAULT = {"", "0", "1", "1,3", "1,3,4,7,11,0,123"}, IE = {"[object Int32Array]", "[object Int32Array]", - "[object Int32Array]", "[object Int32Array]", - "[object Int32Array]"}) + "[object Int32Array]", "[object Int32Array]", + "[object Int32Array]"}) @NotYetImplemented(IE) public void asString() throws Exception { final String html diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Int8ArrayTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Int8ArrayTest.java index ba9f4f231..ceeac7cbe 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Int8ArrayTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Int8ArrayTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -258,8 +258,8 @@ public void nullConstructor() throws Exception { @Test @Alerts(DEFAULT = {"", "0", "1", "1,3", "1,3,4,7,11,0,123"}, IE = {"[object Int8Array]", "[object Int8Array]", - "[object Int8Array]", "[object Int8Array]", - "[object Int8Array]"}) + "[object Int8Array]", "[object Int8Array]", + "[object Int8Array]"}) @NotYetImplemented(IE) public void asString() throws Exception { final String html diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/SharedArrayBufferTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/SharedArrayBufferTest.java index 93b5d40cf..21de2e63d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/SharedArrayBufferTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/SharedArrayBufferTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint16ArrayTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint16ArrayTest.java index 6400ba6fe..bc7ec740b 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint16ArrayTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint16ArrayTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -191,8 +191,8 @@ public void nullConstructor() throws Exception { @Test @Alerts(DEFAULT = {"", "0", "1", "1,3", "1,3,4,7,11,0,123"}, IE = {"[object Uint16Array]", "[object Uint16Array]", - "[object Uint16Array]", "[object Uint16Array]", - "[object Uint16Array]"}) + "[object Uint16Array]", "[object Uint16Array]", + "[object Uint16Array]"}) @NotYetImplemented(IE) public void asString() throws Exception { final String html diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint32ArrayTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint32ArrayTest.java index 2d5706206..6088781d1 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint32ArrayTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint32ArrayTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -212,8 +212,8 @@ public void nullConstructor() throws Exception { @Test @Alerts(DEFAULT = {"", "0", "1", "1,3", "1,3,4,7,11,0,123"}, IE = {"[object Uint32Array]", "[object Uint32Array]", - "[object Uint32Array]", "[object Uint32Array]", - "[object Uint32Array]"}) + "[object Uint32Array]", "[object Uint32Array]", + "[object Uint32Array]"}) @NotYetImplemented(IE) public void asString() throws Exception { final String html diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint8ArrayTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint8ArrayTest.java index 79ffa09a8..f766d4066 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint8ArrayTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint8ArrayTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -242,8 +242,8 @@ public void emptyConstructor() throws Exception { @Test @Alerts(DEFAULT = {"", "0", "1", "1,3", "1,3,4,7,11,0,123"}, IE = {"[object Uint8Array]", "[object Uint8Array]", - "[object Uint8Array]", "[object Uint8Array]", - "[object Uint8Array]"}) + "[object Uint8Array]", "[object Uint8Array]", + "[object Uint8Array]"}) @NotYetImplemented(IE) public void asString() throws Exception { final String html diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint8ClampedArrayTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint8ClampedArrayTest.java index ead6400c8..a4b65426d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint8ClampedArrayTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/arrays/Uint8ClampedArrayTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -192,8 +192,8 @@ public void nullConstructor() throws Exception { @Test @Alerts(DEFAULT = {"", "0", "1", "1,3", "1,3,4,7,11,0,123"}, IE = {"[object Uint8ClampedArray]", "[object Uint8ClampedArray]", - "[object Uint8ClampedArray]", "[object Uint8ClampedArray]", - "[object Uint8ClampedArray]"}) + "[object Uint8ClampedArray]", "[object Uint8ClampedArray]", + "[object Uint8ClampedArray]"}) @NotYetImplemented(IE) public void asString() throws Exception { final String html diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasGradientTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasGradientTest.java index 0f2c6ba75..773f49e81 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasGradientTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasGradientTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2D2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2D2Test.java deleted file mode 100644 index b861e3251..000000000 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2D2Test.java +++ /dev/null @@ -1,1550 +0,0 @@ -/* - * Copyright (c) 2002-2021 Gargoyle Software Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.gargoylesoftware.htmlunit.javascript.host.canvas; - -import java.awt.GraphicsDevice; -import java.awt.GraphicsEnvironment; -import java.awt.HeadlessException; - -import org.junit.Assume; -import org.junit.Test; -import org.junit.runner.RunWith; - -import com.gargoylesoftware.htmlunit.BrowserRunner; -import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; -import com.gargoylesoftware.htmlunit.SimpleWebTestCase; - -/** - * Unit tests for {@link CanvasRenderingContext2D}. - * - * Most of the test are disabled because the renderer on - * the build server Ubuntu/Xvfb produces different results. - * - * @author Ronald Brill - */ -@RunWith(BrowserRunner.class) -public class CanvasRenderingContext2D2Test extends SimpleWebTestCase { - - private static boolean SKIP_ = false; - - static { - try { - final GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); - final GraphicsDevice[] devices = env.getScreenDevices(); - if (devices.length == 1) { - final GraphicsDevice device = devices[0]; - if (device.getDisplayMode().getBitDepth() < 0) { - SKIP_ = true; - } - } - } - catch (final HeadlessException e) { - // skip most of the tests in headless mode - SKIP_ = true; - } - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAHklEQVR42mNgGErgPxUwhoGUOmjUQBoYSNVY" - + "pgoAANSxK9UjCpiOAAAAAElFTkSuQmCC") - public void strokeRect() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAFklEQVR42mNgGErgP4V41MChYODg" - + "BADEpF+hx8ArfgAAAABJRU5ErkJggg==") - public void fillRect() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAHklEQVR42mNggID/VMJwMGrgqIGjBo4aO" - + "GrgiDMQAMu0ZqjgcrwWAAAAAElFTkSuQmCC") - public void fillRectWidthHeight() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAG0lEQVR" - + "42mNgGErgP4V41MChYOAoGAWjYOgCAGnPX6EKEWk8AAAAAElFTkSuQmCC") - public void fillRectRotate() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAg0lEQVR42mNgGAW0ABrUNMwGiH8D8WYgVqGGgYeB+D8Ugwxe" - + "TonBLkiG/UczeDIQC5Bq4HEcBsLwayBOAWIWYgyLIWAYMn5MjME8QNwAxJ9JMHg5MS6VAeJuIg12ISU8QQbPh0YINsO2kxvz" - + "Bjgiy4LS9OmBZPB6auakACBWGC2daAsAdH9H/STLcEwAAAAASUVORK5CYII=") - public void rotateFillRect() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAG0lEQVR" - + "42mNgGErgP4V41MChYOAoGAWjYOgCAGnPX6EKEWk8AAAAAElFTkSuQmCC") - public void fillRectTranslate() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAG0lEQVR42mNg" - + "GAUjF/ynAI8aOFQMHAWjgJ4AABYtWaeMf5H/AAAAAElFTkSuQmCC") - public void translateFillRect() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAmElEQVR42mNgGAWjYHABAyDWAGIOahl4GIj/A/FnIN" - + "4MxM1AHALEIuQYBnLVe6iB2DBIbj0QNwCxDxALEDLQBI9h2PBvIL4PxMuBOAOIHdANzCDRQHT8Gt3A5RQauBvdQFDY" - + "7CcQjvjwZFxhyQINzxQgng/E14H4OxEG+pCaAhyg4TwfGhnoBkpQmmZ5gNgFiCuAePrQyr8APsZfqrO3m6kAAAAASU" - + "VORK5CYII=") - public void rotateTranslateFillRect() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAhUlEQVR42mNgGAWjgGwgAcQc1DQwBo" - + "j/A/FtIJ4NxBlAbEOJJTxA/B1qKDL+DMSXybVkMxYD/+Ow5DjUEpDPTHBZUkGkgdhwNzYDNSgw8DEQ" - + "s2AzdDsQ/ybTUAt84akDxDnQcDpNpCUVpKQCASA2IGDJYUrTrgA0GYEsWQ3E54FYZAQWCgBOMlmQm3" - + "NMhgAAAABJRU5ErkJggg==") - public void transformTranslateFillRect() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAIklEQVR42mNgGErgP4WYTgbiAqMGEmUgxF" - + "TcBpKZdig0EABvINcp3bQJMgAAAABJRU5ErkJggg==") - public void clearRect() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAu0lEQVR42mP478Lwn5qYYdTAEWNgmM" - + "T//14cVDSwPeY/GDy9/f//ttn//0/I+P+/wIYsSyAG+vL8///z+38M8O3z///3L5NkCSIMj2/+TxQA" - + "WXLtOMQSkM+yTFAsQRg4p+I/2WBVNxYDEzXIN/DV4///3VmwJJtT2/////ObPENzLfCkwxSd//8n50" - + "DC6eZp4iwBBRnRCTtA4P//dAP8llw+TGFOAVkCSkYgSw6u/v//zvn//4NFRmLhAAByuCKZBcaxyQAA" - + "AABJRU5ErkJggg==") - public void transformTranslateClearRect() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAQUlEQVR42mNgoCHgoL" - + "Zhr4H4MBBXALEBNQzlAeIQIJ4NxI+heDZUTIAaFugAcQkQ7wbi70Pa9Z+hFlIN8DAM" - + "KQAA8ckQClhSuMUAAAAASUVORK5CYII=") - public void moveToLineToStroke() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAgElEQVR42mNgGEr" - + "g/6iBI8DA90DMQk0DLwOxBTUNzADi50C8HYhnA3ENEHsAMQ8lhooAsQvU8G4gPg" - + "7En4F4PRAHUMvlIEsSgPg6EN8G4hxqhjUojPcD8WMgTqFmeJtAgwNkuAI1DQZ5/" - + "z4QN1PTUFAYr6aFa0OgkUZVIED1UhoAGzcax1ioxw8AAAAASUVORK5CYII=") - public void moveToBezierCurveToStroke() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAlklEQVR42mNgGErg" - + "OxDfBuL9QNwNxAlArEGJgRxQAzyAuAGIVwPxayC+D7VAhRquZgFiCyBuhhoOcr0P" - + "tYIE5IMcIH4MxOuBWIKaBndDXexCzUgEhfV7agYBA9SFn6HhTDVQAsTnoRFINbAf" - + "ajDVgAY0U1DVlYepHes1QDybmgbaAPFpahqoAM1FVAM80BKLquD/4C+lAU3wGvNN" - + "UrLUAAAAAElFTkSuQmCC") - public void moveToQuadraticCurveToStroke() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAJElEQVR42m" - + "NgGAWjYHAAByBuoCIGE/+piIeAgVQPw1EwCkgEAB1tTchSTfsUAAAAAElF" - + "TkSuQmCC") - public void lineWidthMoveToLineToStroke() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAaUlEQVR42mNgGPGABYhdgFiAmobeBuL/UHo1EFdQ" - + "aslkqIHYMMySElIMdMBjIDJWIcXQx0QYmEOKgdOJMHA/KQYGEOltGWIN5AHizUD8nICBGeTEugzUxc1YLFlPrbQK" - + "s6RitCwYBVQAABQ1QYDFZuLyAAAAAElFTkSuQmCC") - public void setTransformFillRect() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAaUlEQVR42mNgGPGABYhdgFiAmobeBu" - + "L/UHo1EFdQaslkqIHYMMySElIMdMBjIDJWIcXQx0QYmEOKgdOJMHA/KQYGEOltGWIN5AHizUD8nICB" - + "GeTEugzUxc1YLFlPrbQKs6RitCwYBVQAABQ1QYDFZuLyAAAAAElFTkSuQmCC") - public void transformFillRect() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGUlEQVR42m" - + "NgGAWjYBSQBv6TiEfBKBg5AABEEAv1yW5vkQAAAABJRU5ErkJggg==") - public void moveToLineToTransformStroke() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAVklEQVR42mNgGAWjYAQB" - + "Dmob9h6IbwPxaiCuAeIAIFag1FADII4B4n4g3g3Er6EWHQbiyUCcAcQWQMxDiUUSQOwB" - + "xCVAvBiILwPxZ0oNRQc8o0lupAEAZ+MMgTDcUPEAAAAASUVORK5CYII=") - public void transformMoveToLineToStroke() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGUlEQVR42mNgGAW" - + "jYBSQBv5TAY+CUTA8AQC0ZBDwpDXmmwAAAABJRU5ErkJggg==") - public void moveToLineToRotateStroke() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAfUlEQVR42mNgYGDgYKAyeA7E84" - + "FYgloGqgDxciD+DMT9QCxALYMNgHg7EL8H4hog5qGWwQ5AfBoaFDlAzEItg32A+DYUR1DLYJAh" - + "CVDXngdiD2q5FpS0CqDhux+ITahlMCgFNENTxGZoCqEKAKXZyVAXUzVj8DCMglEwEgAA1S0T6X" - + "hdMmMAAAAASUVORK5CYII=") - public void rotateMoveToLineToStroke() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAG0lEQVR42mNgGErgP" - + "4V41MChYOAoGAWjYOgCAGnPX6EKEWk8AAAAAElFTkSuQmCC") - public void rectFill() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAoUlEQVR42mNgGAVAYAHE04F4PhCXALE" - + "MpYa9B+ICIE4B4uVA/B2Iu4GYhxwDZ0MNQwYqQLwdiK8DsQY5BmbgkMuBut6FFANzoN7EBTyA+DkQCx" - + "BrICgCPhPwmgCp3m4G4t1AzEKtZAOKzctYIocioAGNgABqGupCS0MzqO39+0C8HprIKYpxZI3TodlwO" - + "dTFGaSmSVzptACao+aTmmuGKQAA9NQeZdHpsYYAAAAASUVORK5CYII=", - IE = "context.ellipse not supported") - public void ellipseStroke() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAlUlEQVR42mNgGAUg8P8/gwMQhwCxATUM2" - + "wzE/5HwYyDOAGIOcl32Hwc+D8QKpBoYgsdAEP4MxC6kGGhAwECYoRykGHqbCENDSDEwhQgD15NiIAsQny" - + "Zg4Hsg5iHFUBmoJnyG+pAa4y7QCMBl4Gxy0qULHpe+Jzexy+AJUxdysyMLNPuhJ6lmauR1A2iOAgUHy2h" - + "RygAA45xHqtsvRxIAAAAASUVORK5CYII=", - IE = "context.ellipse not supported") - public void ellipseFill() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAc0lEQVR42mNgGAVDEvBQ07ASIH4" - + "NxBzUMCwBiB8DsQa1XAcyzINahikA8XMgZqGWgSZQF+IDv0mN2c9ALIJDXgWIT5PqynYgng7EAl" - + "A+KKZ1oOIg17uQaiALVPNrqAHfgfg2EC+GGkw24IBGEs9oHh+iAAAZGRFncAWu2AAAAABJRU5ErkJggg==") - public void arcStroke() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAaklEQVR42mNgYGD4T2UMIagJRg0cNXDUQGIN5AH" - + "iBiC+DOXfBuJ2qDhZBh4G4s1AbAI1RAeIVwPxeXIM/Q81DBtYDXUpyQaa4JDTgHqfZAMFcMhxkBNpNHEh1cPwNF" - + "Isc0BdBjLsOqmxDABQejjNvtDkBwAAAABJRU5ErkJggg==") - public void arcCircleStroke() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAATklEQVR42mNgGAVDEsgAcQIQNwBxDh" - + "ALUGIYCxC/BuLdQNwOxN1AfB+IfSgxlAONbwDEj4FYgprBAPL+ZGoaqADE76kdWf9H0+soGDEAADmG" - + "CbQK8bPUAAAAAElFTkSuQmCC") - public void arcAnticlockwiseStroke() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAb0lEQVR42mNgGAWjgAeIG4D4" - + "MhD/B+LbQNwOFSfLsMNAvBmITaB8HSBeDcTnyTG0AWoYNrAa6lKSwGWoy7ABDaj3SQKgMBPA" - + "IccBlR9YF1I9DEGxeBopljmgLgMZdp2SpNMANQCWDrvJNWwUDBAAAFFYGYXPy8e+AAAAAElF" - + "TkSuQmCC") - public void arcCircleAnticlockwiseStroke() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAU0lEQVR42mNgGAUjHTQwGADxdiB+DsTvgXg/Qz2D" - + "CSWGfQbi/2j4N9BQC3IM3I3FMBg+TI6Bz/EY+H5QGEh1L1M5UhCGglz6GppsDpNv2CgYPgAA3MZQoURRzTMAAAAA" - + "SUVORK5CYII=") - public void arcFillPath() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAp0lEQVR42mNgGLqgnkGFoYGhHYgvA/F3IP4NZYP" - + "EdIg3qIGBA4i7oQb8x4F/Qw3mIGQYDxCfxmMQOt4NxCz4DJxPgmEw3I0rzEwIeBMf1sDmuslkGgbC/dgMPE2Bgb" - + "exGfidAgP/YzOQ3PDbDMQ22Ay8TIIhIN9Mxx4ZpCWZ50BcA8QixGQ1fMkG5PoUcMInCTQwrMaSE1zw5wbC+fg01" - + "PsaDKNgQAAAd7buKpKXkaMAAAAASUVORK5CYII=") - public void arcFillPathAngle() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAYU" - + "lEQVR42mNgGAXUBhJA/J8MLIHP0PlQTAwgSq0KEH+H0tRQR7TNpPiEoO0kuY4YF5DkOkKu" - + "IMt1+FxClutwuYYi12FzEUWuQ3elBzVch+zK/9RwHbIr/1PLdTBgMzzKPwBs1inGPcAUbg" - + "AAAABJRU5ErkJggg==") - public void closePath() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAFUl" - + "EQVR42mNgGAWjYBSMglEwCqgDAAZUAAEyx8IOAAAAAElFTkSuQmCC") - public void closePathNoSubpath() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAFUl" - + "EQVR42mNgGAWjYBSMglEwCqgDAAZUAAEyx8IOAAAAAElFTkSuQmCC") - public void closePathPointOnly() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAFUl" - + "EQVR42mNgGAWjYBSMglEwCqgDAAZUAAEyx8IOAAAAAElFTkSuQmCC") - public void closePathTwice() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA" - + "XklEQVR42mNgoCHgIFGcoGHPgVgFTRzEfw3E8kD8Hw+WwGbofCjGJUZIHgOAXPMdyZWk" - + "8hkIuZIcF+N0pQcO2wnJ43Tlfzy2E5LH6sr/eGwnJI8V2FAoPwpGwSjACwDUtCTLu8r4" - + "+AAAAABJRU5ErkJggg==") - public void closePathClosesOnlyLastSubpath() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA" - + "N0lEQVR42mNg2Mf8HwWTCjD0U9vAfQzM/5Exyeah66e6gbjDglJAbQMp9TrtDRwFo2BI" - + "g9EyAADAuXABKJOUSgAAAABJRU5ErkJggg==", - IE = "no ctor") - public void putImageDataInside() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAA" - + "CNiR0NAAAANUlEQVR42mNg2Mf8H4T3MaBiBrIBtQ2k3EW0NhDd63A86AykXizTysBRMA" - + "pGAV0A1UopNAMBDtE/AR/N0RYAAAAASUVORK5CYII=", - IE = "no ctor") - public void putImageDataOutside() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAA" - + "CNiR0NAAAANklEQVR42mNgGNRgH/N/CM0AZVBqHpXMoZ2BdApXoLOp6nSqG4g1Keyjpg" - + "VUN3AUjIJRwMAAAAneFQEGPcORAAAAAElFTkSuQmCC", - IE = "no ctor") - public void putImageDataDirty() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAvklEQVR42mNgGAW0AAJAXAHEh4H4PRD/B+LPQHwai" - + "BuAWIQUwzKA+DkQrwfiACDmgYqDaA8gXg6VLyDGMJDtj4HYgoA6Hai6BkIuAylSINInIHX3cblUAOoNCxLDGuZSCX" - + "SJCmiYwcB/EvBybF4HxaYPmQb+h8Y+CniPFJvkGPgZ3cD/WPikYtq6kJIw9MAWhlSPZVg6NCHRQJzpED2nEGvgfUJ" - + "5GpaXiXHZfUJ5Gdmlr4F4NY4IWAy1tASXAQBr/Z3NB0Q1uQAAAABJRU5ErkJggg==", - IE = "no ctor") - public void clip() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAYklEQVR42mNgGLLgv/Bkjf8ik/qpZ" - + "6DI5N9A/J+aBv4fNXC4GQhLJugGIYvhw9gMvE2BgY+xGDipnwIDp+PIaghvk2Dg7/+iUw2wh6Po5M" - + "lkGDh9wJINlQsHUJgCg4Bh2AEAu6/n02vT9rUAAAAASUVORK5CYII=", - IE = "no ctor") - public void clipWindingEvenOdd() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAA" - + "AiklEQVR42mNgYGD4T2UMBygcagBaGPgfhH2A+AsQ7wdiURyKSoD4PhD/AmIPQgbOBmImII4H4mk4" - + "FHUAMRPIMJChhAyUhHLZgPgDDkUsyHwCBqII/cKmCB8fmwv5kFz4khoG9kC5oDDso4aBaUD8A4g3I" - + "FxLmoFIqfw/tXMKyGWDO6eMGjhqIDEAALK8kB4mQXliAAAAAElFTkSuQmCC", - IE = "no ctor") - public void fillTextAndTransform() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAXElEQVR42tXUSwrAIAxFUZd2d/6WVh" - + "12IKLxQmkg03BCPq39KTLyKWZmBbkoiKnMqm1MXUWZneFg6k6UOVkhTN2OMpVFx9StlLk5R0zdTBnj" - + "aWDq3sqYrw1T92109w9/gbiYNMcAAAAASUVORK5CYII=") - public void pathFill() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAbUlEQVR42mNgGErgMhD/Jx" - + "KvJsbAGiINew3EEsQYqEGkgRHU9PZqUsOxhoRwJMoiDTIMIximl0k0MIKa3l5NzdgmOvkg" - + "e3sHtZJPDZILLlMj+WgguaCGEq8SE6YR1Cw4VlOrJKqhhldxhekQBwCxR4E7tKSxGgAAAA" - + "BJRU5ErkJggg==") - public void pathFillTransform() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAhElEQVR42t3SQQ3AIAwF0MqYBBzMCmLqqAbmAxmI6BoOO8AI" - + "H8pla/KP/eEBRF+aZFEwghQyWJYtB1IYwMK4ky2z9/iwrVkVjwzZjJdlHdxpYQe8MO5ky9Rrs5PasE+iy0Ot2eUD22Japdbs" - + "cgJbZg+1GVsOHmqvNK1Se4Xspr6wI/1ibuTa0+hbsogUAAAAAElFTkSuQmCC") - public void pathFillTransform2() throws Exception { - Assume.assumeFalse(SKIP_); - - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts("data:image/png;base64," - + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAQklEQVR42mNgGAXUBw0M/1HwoDUQaBIKHkQGQgHC" - + "IHSzB4uBSEYPegOxBwXVI4v6sU+tDEB1A3FmUYoNprqB9CqdACh5i4mujJYUAAAAAElFTkSuQmCC") - public void saveRestore() throws Exception { - final String html = "\n" - + "\n" - + "\n" - + " " - + ""; - - loadPageWithAlerts(html); - } -} diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2DTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2DTest.java index 80656f93a..bb4cf4e50 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2DTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/CanvasRenderingContext2DTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,11 +22,13 @@ import java.util.List; import org.apache.commons.io.IOUtils; +import org.junit.After; import org.junit.Test; import org.junit.runner.RunWith; import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; import com.gargoylesoftware.htmlunit.WebDriverTestCase; import com.gargoylesoftware.htmlunit.util.NameValuePair; @@ -42,6 +44,15 @@ @RunWith(BrowserRunner.class) public class CanvasRenderingContext2DTest extends WebDriverTestCase { + /** + * Closes the real IE; the drawImage test are producing strange + * results without this. + */ + @After + public void shutDownRealBrowsersAfter() { + shutDownRealIE(); + } + /** * @throws Exception if an error occurs */ @@ -50,6 +61,7 @@ public class CanvasRenderingContext2DTest extends WebDriverTestCase { public void test() throws Exception { final String html = "\n" + "\n" - + "\n" + + "\n" + + " \n" + + LOG_TEXTAREA + ""; - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -85,9 +99,9 @@ public void test() throws Exception { */ @Test @Alerts(DEFAULT = {"addHitRegion", "drawCustomFocusRing", "drawSystemFocusRing", "removeHitRegion", - "scrollPathIntoView", "36 methods"}, + "scrollPathIntoView", "36 methods"}, IE = {"addHitRegion", "drawCustomFocusRing", "drawSystemFocusRing", "ellipse", - "removeHitRegion", "scrollPathIntoView", "35 methods"}) + "removeHitRegion", "scrollPathIntoView", "35 methods"}) public void methods() throws Exception { final String[] methods = {"addHitRegion", "arc", "arcTo", "beginPath", "bezierCurveTo", "clearRect", "clip", "closePath", "createImageData", "createLinearGradient", "createPattern", "createRadialGradient", @@ -97,7 +111,9 @@ public void methods() throws Exception { "setLineDash", "setTransform", "stroke", "strokeRect", "strokeText", "transform", "translate" }; final String html = "\n" + "\n" + + LOG_TEXTAREA + ""; - loadPageWithAlerts2(html); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = {"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAH0lEQVQ4T2NkoBAwUq" - + "ifYdQAhtEwYBgNA1A+Gvi8AAAmmAARf9qcXAAAAABJRU5ErkJggg==", - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC60lEQVQ4T32TX2xTVRzHP/d27" - + "V273i0twTUiMhQeUBJFwQ62dVxxbIglZGa6EPTZwFCUxOe9+yIhRDL24gMJ/6FZgU3dDSYEAglIJDLIiA5Ey0Yd7W7vXbvd" - + "P+bepg3bA+fk5JzfOef3Sc75fb8CwMXxcanm8ZP9AUlqEEURUQTRPXi+2TCd1+5/1Kn8+Py24AYXRkYTG95d96tpWgiCgCC" - + "A4Pbyojw7DqIocPXGzcPJrg/6KhAPcCKVVto3NqvzpoXoASqjnFwZAb8Py7K4fOXGd93Jzm/dXA9wJjWstG7aoM6bJqIgeg" - + "mZgkm2VL4SkWBlRELXCxi6js/nc/589HB915Ytt6qAtpb3VPcJpg1X/y1RDMjItUEcHGQMzKLBW7EQdQEfAg7D6pVkb/f2d" - + "BWQcAGWzbW/dTJWkHCdTLReIiZZBMxZcgWDh89K7HxzCf6aGlKXRhcBWuPqM2OOwds5/KEwK5bUs1SuJd4oMqWVmNE0JrIz" - + "vLM8yutLw6Qu/rIQ0N4aV8cmC5y8lycUChEO1rEiItHRFCTss7mXyXHs9yk2r4zS9UYj5y/8vBCwuS2u/pHRuPnoPzpWRxj" - + "5B/7SbCzb5uNVQbSCzvfXn/B1SxPb1sY4l14MSDSrmlHiwNAYfesaOHJ3jul5Acdx6HpVYiKrcXuqyOAnb/NaYwNnFwDSw4" - + "rS0qzOFoucuj6OOlHgt6dz3meBg2BZnjp71kQ4sHUtcr1M6tJPyZ4d1SqkFaW9TbVMi2w2y9k7GU6P5ZieNbFth7Dko3tNl" - + "M/Xv8Kyl2NIAYnzQyPJnkoZj51IKR92KqorG9u2MQyD6RmNB091bAdWvSQTi8rIskzA70cUfRw/nUru7u0u6+DQD0ff/2zX" - + "p6OuCSpS9rTuOAiiQNlgYlWlricOHj6y45sv9w55gHgisXrfF3sHI5FIXdVp3knZkwucKUBuJj+7v++rPZOTj+941/r7+2v" - + "y+bx/sYNfFOu6bg4MDMz/DxMpOiCCBtdCAAAAAElFTkSuQmCC"}, - FF = {"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAEklEQVQ4jWNgGAWjYBSMA" - + "ggAAAQQAAF/TXiOAAAAAElFTkSuQmCC", - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACtUlEQVQ4jXXPz2vTdxzH8e/BMfw" - + "fKoLDgwcP23l0dGy3zcsOHj0LDtaLRTvaMlkPQztBBauwH3VOJSZt2oT8WKt+Eym2DekPutgkjbTNj+/vH/kmMc332/j0IG" - + "bEdB943T7vB6+XIAiCkM/nP44/TQ4lFlPjz1+kxp8vp8cXD0lkXjwnHPbCMbFf1U0qsoak6MiqjqIaqJqJqptohoWmmximx" - + "Vz0yc0ewB+KDsiqTrGiUJbUbkgzOkjVcTAti5m52C89gKIZlCSlc5wuyMQzMvGMwkpBQTdtdoslXm5lyW8X3kQXEp91Ae8n" - + "7FU0HqZK/LFRxZ9zeZxrEctZhDfKlFQLy3aw7Sq+2fA3XYCmm0iKTiC1y60llT83m8ztvWFF8VgvO4hZmakXuzi1Os3mfjc" - + "QDEUHNMMiV1S4OJdleKHMnbUa0wWPSr3NmvSaRE5hajHPZtGgud/qbaAbFslMke8DmwxFX3FFVJjasJGcFrVGk5VtiR8C68" - + "ysFtlvufhmY92AYVok/t3j18gqm9s7XBN3uBB6xfnZbeYzZaaXc3xxI8FMeo+W6/Y2MCybnbLCd7ef8XRplbO/L/H1nWW+m" - + "lziamSNC/eSfH7tH7aKGq77QYNgKDpgWjZlSeb6TJIz1yMcGw5yYjTMidEQn/wY5ORIkMsPEhiGiet5vRNMu4qmm7zcyvGz" - + "T+TTn4Icv+Tn2NBjTo1MM/xAJJsvUG808LyD7gn3/cEBy3awbAfDtCmWKqxnsvjFNL5naVYzeSRZpt5o4LouBwdt/vIF/gN" - + "u3P3tS7vqYDs1nFqdWr3xLrU69UaD180m+60WruvheQe0220mbt3+tgP09/efvP/3IzEcjac6icVT4dh8KhybT0U+yCNfIN" - + "nX13e6A4yNjR0ZHBw8+i4TRycm/j/v/01OTn4kCILwFgqgq1utHBHHAAAAAElFTkSuQmCC"}, - FF78 = {"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAEklEQVQ4jWNgGAWjYBSMA" - + "ggAAAQQAAF/TXiOAAAAAElFTkSuQmCC", - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACvElEQVQ4jXXPu29TZxzG8TO0Qvw" - + "FmVAlEEOHDu2SpSoJajdgqaKO3SIhpRJZGpUgkKiaoRSB2qK2MEDSVjEEOznkOL5ARGwjRBIrN6UmdhKUxJdzv/jYxvE5Md" - + "8OCLeu6Ss92/v76HkEQRCEmZmZQ9HZ1NDck4WR5NOFkeSz9MiTt0SKPf5SeNsTw7OfaIZFSdGRVQNFM1A1E0230AwL3bTRD" - + "QvTshEjj37uAO6KUq+iGeRLKkVZa4d0s4WUXRfLtgmJke87AFU3Kchq63hpWyGeUYhnVBa3VQzLYTdf4PlGltzm1qvp6OxH" - + "bcCbCXslnUC6wJ21MsGcx/1cg1jOJrxWpKDZ2I6L45QJhB6cagN0w0JWDULpXW7Ma4yu15nee8Wi6rNadElkFcae7eJWqtT" - + "r++1AUJR6ddMml1f5ejrL8GyRmysVJrd9StUmK/JLkjmVsaebrOdN6vuNzgaGaZPK5PkqtM5Q9AXfJlTG1hxkt0GlVmdxS+" - + "ZcaJWp5Tz7DY9AKNwOmJZN8q89rkWWWd/a4WpihwHpBWcfbPEoU2RyIceJn5JMLe3R8LzOBqbtsFNU+fzXOR7PL/PF7Xk+u" - + "7nAp7/N80NkhYHfU3x89SEbeR3P+0+DoCj1WrZDUVa4PpXizPUIR4ZFjl4Kc/SSxLELIscvipwfT2KaFp7vd06wnDK6YfF8" - + "I8d3Ewk+vCzy3jdBjgzd5/2LkwyPJ8hublOt1fD9g/YJo3eDvbbjYjsupuWQL5RYzWQJJpaYmFtiObOJrChUazU8z+PgoMl" - + "oYOIf4Novt046ZRfHreBWqlSqtdepVKnWarys19lvNPA8H98/oNlscuXHG6dbQHd39/E//gwkpEgs3Uo0lpai8bQUjafD/0" - + "4snh6/F0x1dXV90AJ6enre6evrO/w6g4cHB/8/b/719/e/KwiC8Dc3QqPsSaO0rwAAAABJRU5ErkJggg=="}, - IE = {"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAA" - + "RnQU1BAACxjwv8YQUAAAATSURBVDhPYxgFo2AUjAIwYGAAAAQQAAGnRHxjAAAAAElFTkSuQmCC", - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BA" - + "ACxjwv8YQUAAAKeSURBVDhPjVJNTxNRFD3zTSm1UyKlCsEIRCC6EVFijC5MFE1kqTv1B+jChXsSE6Nx48qYsDPRxI0rjR8J" - + "GDFGhRBRdiAhliKlLVRmhmk7nS/vey0IO8/Me2/m3nfuue++K4Dwen5ek5dXb6maFhdFEfSCO3YiAIqmNTc8dPZJ3cLB971" - + "6N37mxLGjE57nQxAEGszBVv5RW8OQAgv4PDX9aPjCuZucTSAtYLNcloIggE+DrUEQIiBCEAbEC/lgUWVZwqnBgRsvXr59wN" - + "kEHkCmZ1uZrwKymx5m1zz8KHhIGy63bRgmcrk8jvR03X4zNta/HYCBbRAFER6ddSJTwawdgSU3w5R1FH0Vk8s2JC2KVGofW" - + "pNJYcN09jPevwBsUJDplRLWiSCIKtQGGQfiIlJRCU2ahPeLJiRJhKZpNRJhOwCxYVV9fM1WsLLpwvE8eK6PtqiIUKwdEUEV" - + "SxsO37uFXRnkrCrKrktEBzmjBMu2IQQeuvYIiIgBvq2WsLBWqgWrY0cN2E2F6Iy4uNotohFlTC0VcedDBpPpIpaLFmZ+G/w" - + "6d/B3H6FD1/ApbaCw/gdTiznMrazhZ3Yd39MFjM/l4Fcd9LZEeLZbkLdmZlTEEKdTEh5+WcVMoQpFZu4QjzM+787LfQm0NE" - + "pcjFqCo5YBFYwZVUXFUG8rBtsasZcK7VcrcCsVqHT+K306rg+0QWvQSIzkfM6sZVCpeNwok2IymcS1k024dNjCQsGmbgS6k" - + "zGkmmOIxWIkopCWAMeh2yDwDIrFPC+sQL2uKDJ0PY7Ojnac7z+Ei8d70HOwHYlEgmcoULOxvfl8lpeCZ/Ds+dNMQo9/bNYT" - + "UfbPwd18qs91kKRhGuX7d+/9Yr/cNzIyIpumqbDv/4Vt297o6Kj7F1Q7+m7gqVhgAAAAAElFTkSuQmCC"}) - @NotYetImplemented - public void drawImage() throws Exception { - try (InputStream is = getClass().getResourceAsStream("html.png")) { + + loadPageVerifyTextArea2(html); + } + + private void drawImage(final String png, final String canvasSetup, final String drawJS) throws Exception { + try (InputStream is = getClass().getResourceAsStream(png)) { final byte[] directBytes = IOUtils.toByteArray(is); final List emptyList = Collections.emptyList(); getMockWebConnection().setResponse(URL_SECOND, directBytes, 200, "ok", "image/png", emptyList); @@ -183,24 +142,81 @@ public void drawImage() throws Exception { final String html = "\n" + "\n" + "\n" + " \n" + + LOG_TEXTAREA + ""; - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC60lEQVQ4T32TX2xTVRzHP/d27" + + "V273i0twTUiMhQeUBJFwQ62dVxxbIglZGa6EPTZwFCUxOe9+yIhRDL24gMJ/6FZgU3dDSYEAglIJDLIiA5Ey0Yd7W7vXbvd" + + "P+bepg3bA+fk5JzfOef3Sc75fb8CwMXxcanm8ZP9AUlqEEURUQTRPXi+2TCd1+5/1Kn8+Py24AYXRkYTG95d96tpWgiCgCC" + + "A4Pbyojw7DqIocPXGzcPJrg/6KhAPcCKVVto3NqvzpoXoASqjnFwZAb8Py7K4fOXGd93Jzm/dXA9wJjWstG7aoM6bJqIgeg" + + "mZgkm2VL4SkWBlRELXCxi6js/nc/589HB915Ytt6qAtpb3VPcJpg1X/y1RDMjItUEcHGQMzKLBW7EQdQEfAg7D6pVkb/f2d" + + "BWQcAGWzbW/dTJWkHCdTLReIiZZBMxZcgWDh89K7HxzCf6aGlKXRhcBWuPqM2OOwds5/KEwK5bUs1SuJd4oMqWVmNE0JrIz" + + "vLM8yutLw6Qu/rIQ0N4aV8cmC5y8lycUChEO1rEiItHRFCTss7mXyXHs9yk2r4zS9UYj5y/8vBCwuS2u/pHRuPnoPzpWRxj" + + "5B/7SbCzb5uNVQbSCzvfXn/B1SxPb1sY4l14MSDSrmlHiwNAYfesaOHJ3jul5Acdx6HpVYiKrcXuqyOAnb/NaYwNnFwDSw4" + + "rS0qzOFoucuj6OOlHgt6dz3meBg2BZnjp71kQ4sHUtcr1M6tJPyZ4d1SqkFaW9TbVMi2w2y9k7GU6P5ZieNbFth7Dko3tNl" + + "M/Xv8Kyl2NIAYnzQyPJnkoZj51IKR92KqorG9u2MQyD6RmNB091bAdWvSQTi8rIskzA70cUfRw/nUru7u0u6+DQD0ff/2zX" + + "p6OuCSpS9rTuOAiiQNlgYlWlricOHj6y45sv9w55gHgisXrfF3sHI5FIXdVp3knZkwucKUBuJj+7v++rPZOTj+941/r7+2v" + + "y+bx/sYNfFOu6bg4MDMz/DxMpOiCCBtdCAAAAAElFTkSuQmCC", + FF = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACtUlEQVQ4jXXPz2vTdxzH8e/BMfw" + + "fKoLDgwcP23l0dGy3zcsOHj0LDtaLRTvaMlkPQztBBauwH3VOJSZt2oT8WKt+Eym2DekPutgkjbTNj+/vH/kmMc332/j0IG" + + "bEdB943T7vB6+XIAiCkM/nP44/TQ4lFlPjz1+kxp8vp8cXD0lkXjwnHPbCMbFf1U0qsoak6MiqjqIaqJqJqptohoWmmximx" + + "Vz0yc0ewB+KDsiqTrGiUJbUbkgzOkjVcTAti5m52C89gKIZlCSlc5wuyMQzMvGMwkpBQTdtdoslXm5lyW8X3kQXEp91Ae8n" + + "7FU0HqZK/LFRxZ9zeZxrEctZhDfKlFQLy3aw7Sq+2fA3XYCmm0iKTiC1y60llT83m8ztvWFF8VgvO4hZmakXuzi1Os3mfjc" + + "QDEUHNMMiV1S4OJdleKHMnbUa0wWPSr3NmvSaRE5hajHPZtGgud/qbaAbFslMke8DmwxFX3FFVJjasJGcFrVGk5VtiR8C68" + + "ysFtlvufhmY92AYVok/t3j18gqm9s7XBN3uBB6xfnZbeYzZaaXc3xxI8FMeo+W6/Y2MCybnbLCd7ef8XRplbO/L/H1nWW+m" + + "lziamSNC/eSfH7tH7aKGq77QYNgKDpgWjZlSeb6TJIz1yMcGw5yYjTMidEQn/wY5ORIkMsPEhiGiet5vRNMu4qmm7zcyvGz" + + "T+TTn4Icv+Tn2NBjTo1MM/xAJJsvUG808LyD7gn3/cEBy3awbAfDtCmWKqxnsvjFNL5naVYzeSRZpt5o4LouBwdt/vIF/gN" + + "u3P3tS7vqYDs1nFqdWr3xLrU69UaD180m+60WruvheQe0220mbt3+tgP09/efvP/3IzEcjac6icVT4dh8KhybT0U+yCNfIN" + + "nX13e6A4yNjR0ZHBw8+i4TRycm/j/v/01OTn4kCILwFgqgq1utHBHHAAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACtUlEQVQ4jXXPz2vTdxzH8e/BMfwfKoLDgwcP23l0dGy3zcsO" + + "Hj0LDtaLRTvaMlkPQztBBauwH3VOJSZt2oT8WKt+Eym2DekPutgkjbTNj+/vH/kmMc332/j0IGbEdB943T7vB6+XIAiCkM/n" + + "P44/TQ4lFlPjz1+kxp8vp8cXD0lkXjwnHPbCMbFf1U0qsoak6MiqjqIaqJqJqptohoWmmximxVz0yc0ewB+KDsiqTrGiUJbU" + + "bkgzOkjVcTAti5m52C89gKIZlCSlc5wuyMQzMvGMwkpBQTdtdoslXm5lyW8X3kQXEp91Ae8n7FU0HqZK/LFRxZ9zeZxrEctZ" + + "hDfKlFQLy3aw7Sq+2fA3XYCmm0iKTiC1y60llT83m8ztvWFF8VgvO4hZmakXuzi1Os3mfjcQDEUHNMMiV1S4OJdleKHMnbUa" + + "0wWPSr3NmvSaRE5hajHPZtGgud/qbaAbFslMke8DmwxFX3FFVJjasJGcFrVGk5VtiR8C68ysFtlvufhmY92AYVok/t3j18gq" + + "m9s7XBN3uBB6xfnZbeYzZaaXc3xxI8FMeo+W6/Y2MCybnbLCd7ef8XRplbO/L/H1nWW+mlziamSNC/eSfH7tH7aKGq77QYNg" + + "KDpgWjZlSeb6TJIz1yMcGw5yYjTMidEQn/wY5ORIkMsPEhiGiet5vRNMu4qmm7zcyvGzT+TTn4Icv+Tn2NBjTo1MM/xAJJsv" + + "UG808LyD7gn3/cEBy3awbAfDtCmWKqxnsvjFNL5naVYzeSRZpt5o4LouBwdt/vIF/gNu3P3tS7vqYDs1nFqdWr3xLrU69UaD" + + "180m+60WruvheQe0220mbt3+tgP09/efvP/3IzEcjac6icVT4dh8KhybT0U+yCNfINnX13e6A4yNjR0ZHBw8+i4TRycm/j/v" + + "/01OTn4kCILwFgqgq1utHBHHAAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKeSURBVDhP" + + "jVJNTxNRFD3zTSm1UyKlCsEIRCC6EVFijC5MFE1kqTv1B+jChXsSE6Nx48qYsDPRxI0rjR8JGDFGhRBRdiAhliKlLVRmhmk7" + + "nS/vey0IO8/Me2/m3nfuue++K4Dwen5ek5dXb6maFhdFEfSCO3YiAIqmNTc8dPZJ3cLB9716N37mxLGjE57nQxAEGszBVv5R" + + "W8OQAgv4PDX9aPjCuZucTSAtYLNcloIggE+DrUEQIiBCEAbEC/lgUWVZwqnBgRsvXr59wNkEHkCmZ1uZrwKymx5m1zz8KHhI" + + "Gy63bRgmcrk8jvR03X4zNta/HYCBbRAFER6ddSJTwawdgSU3w5R1FH0Vk8s2JC2KVGofWpNJYcN09jPevwBsUJDplRLWiSCI" + + "KtQGGQfiIlJRCU2ahPeLJiRJhKZpNRJhOwCxYVV9fM1WsLLpwvE8eK6PtqiIUKwdEUEVSxsO37uFXRnkrCrKrktEBzmjBMu2" + + "IQQeuvYIiIgBvq2WsLBWqgWrY0cN2E2F6Iy4uNotohFlTC0VcedDBpPpIpaLFmZ+G/w6d/B3H6FD1/ApbaCw/gdTiznMrazh" + + "Z3Yd39MFjM/l4Fcd9LZEeLZbkLdmZlTEEKdTEh5+WcVMoQpFZu4QjzM+787LfQm0NEpcjFqCo5YBFYwZVUXFUG8rBtsasZcK" + + "7VcrcCsVqHT+K306rg+0QWvQSIzkfM6sZVCpeNwok2IymcS1k024dNjCQsGmbgS6kzGkmmOIxWIkopCWAMeh2yDwDIrFPC+s" + + "QL2uKDJ0PY7Ojnac7z+Ei8d70HOwHYlEgmcoULOxvfl8lpeCZ/Ds+dNMQo9/bNYTUfbPwd18qs91kKRhGuX7d+/9Yr/cNzIy" + + "IpumqbDv/4Vt297o6Kj7F1Q7+m7gqVhgAAAAAElFTkSuQmCC") + public void drawImage() throws Exception { + drawImage("html.png", + "canvas.width = img.width; canvas.height = img.height;\n", + "context.drawImage(img, 0, 0, canvas.width, canvas.height);\n"); } /** @@ -212,18 +228,20 @@ public void drawImage_noImage() throws Exception { final String html = "\n" + "\n" + "\n" + + LOG_TEXTAREA + ""; - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -242,47 +260,20 @@ public void drawImage_invalidImage() throws Exception { final String html = "\n" + "\n" + "\n" + + LOG_TEXTAREA + ""; - loadPageWithAlerts2(html); - } - - private void drawImage(final String fileName) throws Exception { - try (InputStream is = getClass().getResourceAsStream(fileName)) { - final byte[] directBytes = IOUtils.toByteArray(is); - final List emptyList = Collections.emptyList(); - getMockWebConnection().setResponse(URL_SECOND, directBytes, 200, "ok", "image/png", emptyList); - getMockWebConnection().setDefaultResponse("Test"); - } - - final String html = "\n" - + "\n" - + "\n" - + " \n" - + ""; - - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -298,14 +289,15 @@ private void drawImage(final String fileName) throws Exception { IE = "data:image/png;base64," + "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAANSURBVBhXY" + "/jPwPAfAAUAAf+mXJtdAAAAAElFTkSuQmCC") - @NotYetImplemented // The output depends on the deflation algorithm // check the output of: $pngcheck -v file.png // chrome gives: zlib: deflated, 256-byte window, fast compression // java gives: zlib: deflated, 32K window, maximum compression // https://bugs.openjdk.java.net/browse/JDK-8056093 public void drawImage_1x1_32bits() throws Exception { - drawImage("1x1red_32_bit_depth.png"); + drawImage("1x1red_32_bit_depth.png", + "canvas.width = img.width; canvas.height = img.height;\n", + "context.drawImage(img, 0, 0, canvas.width, canvas.height);\n"); } /** @@ -321,194 +313,2210 @@ public void drawImage_1x1_32bits() throws Exception { IE = "data:image/png;base64," + "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAANSURBVBhXY" + "/jPwPAfAAUAAf+mXJtdAAAAAElFTkSuQmCC") - @NotYetImplemented public void drawImage_1x1_24bits() throws Exception { - drawImage("1x1red_24_bit_depth.png"); + drawImage("1x1red_24_bit_depth.png", + "canvas.width = img.width; canvas.height = img.height;\n", + "context.drawImage(img, 0, 0, canvas.width, canvas.height);\n"); } /** - * @throws Exception if an error occurs + * @throws Exception if the test fails */ @Test - @Alerts({"exception", "0", "true", "true"}) - public void measureText() throws Exception { - final String html = - "\n" - + " \n" - + " \n" - + " \n" - + " \n" - + ""; - loadPageWithAlerts2(html); + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAALUlEQVQYVzXI0Q0AIBDCUBjFSWVTR6nhov1qnpEwS/jIkp2EnagN" + + "dAAG2oe3voowEQWmniBSAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJklEQVQImVXKwQkAIBDAsDiKm97m9SOIfYaKVrsIzEzxALp94B4H" + + "kskZi4OAPRUAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJklEQVQImVXKwQkAIBDAsDiKm97m9SOIfYaKVrsIzEzxALp94B4H" + + "kskZi4OAPRUAAAAASUVORK5CYII=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAqSURBVBhXY/jP" + + "AET/Ff+DaRBoaGgAc+ACIPAfCkBsJrAIEDAyMgJJBgYAY/AUlK91orEAAAAASUVORK5CYII=") + public void drawImage3ArgumentsPlacementNegative() throws Exception { + drawImage("4x6.png", + "canvas.width = 4; canvas.height = 4;\n", + "context.drawImage(img, -1, -2);\n"); } /** - * @throws Exception if an error occurs + * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAABWEl" - + "EQVRYR+3UvUodURTF8d99BMkLiI12QlqtBI0INqawuLFWtArYiVWwE4QUgbSSFElhKViktLXWzhewtpU" - + "tc2Ey6P2AfbXZU82cM3udtf9nndPz/zOPDZy1hvvN+2+s4gYPnbru5wfs4xR7uMRd81PMneDoFZ12bfh" - + "5jNreBEYvcIgfUzbatvR10OQkRkPgF37iL9ax1qge4BifsIzbMYmGxia2G5127TX+4Qr9l4z+wWKH9Be" - + "0iS5gB9Hxx8ZkRCTGVxrq42x9GJ3DNywNq52EaNfoLCK3gwVisUHGzycgeo+gN7T2LYxutajFRrUbi12" - + "YitG4DYLkd8yMSTTMRd1uE6fnzDUHcpTROLyfI8NdoiNunfebLqPZ7ItoEc0mkK1XGS2i2QSy9SqjRTS" - + "bQLZeZbSIZhPI1quMFtFsAtl6ldEimk0gW68yWkSzCWTrVUaLaDaBbL0nX4NjZfKcb1cAAAAASUVORK5" - + "CYII=", - FF = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAn0lEQVR" - + "Yhe3S4Q2DIBCG4W+WzuEgTuIozOIw7kJ/FJLzehSpJibmfRJixOP8BKW9SVJyc6nMS9KiMdvBvr31X3o" - + "Nmws7L/o3aNOvhqukXK61LpexmOf2Y44Etb1b69coaA6G39FaV9ma6AR6QW24uhHSBUfv67bBeh80BfO" - + "3BJU+u/5y91GvS4L6f3Qk6Kz97zSfCQoAAAAAAAAAwMO9AbwlTKQXMPMUAAAAAElFTkSuQmCC", - FF78 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAn0lEQVR" - + "Yhe3S4Q2DIBCG4W+WzuEgTuIozOIw7kJ/FJLzehSpJibmfRJixOP8BKW9SVJyc6nMS9KiMdvBvr31X3o" - + "Nmws7L/o3aNOvhqukXK61LpexmOf2Y44Etb1b69coaA6G39FaV9ma6AR6QW24uhHSBUfv67bBeh80BfO" - + "3BJU+u/5y91GvS4L6f3Qk6Kz97zSfCQoAAAAAAAAAwMO9AbwlTKQXMPMUAAAAAElFTkSuQmCC", - IE = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0I" - + "Ars4c6QAAAARnQU1BAACxjwv8YQUAAADvSURBVFhH7ZJBDsFAFIbLURrHwBJHwMqWA3AGDmBtxxGwsHE" - + "NbUTcg/+v92QibdKRWPm/5PNPTeZ15nWSD9pw/xq+mZtkbVmHhyXrsW6Iz1Xh80NYrG3yJ4Kp5a9pWE4" - + "sozbq3bxAnpTPPDnlqX3MubqwBjse1iFepw/PMC3bKCd9IV1CMrNsWfYgTz6CGxt3YBfGcIJeZ8w/jB0" - + "8QNbMyzbKSS50F7CMo+Ud+piklk5uGZJZkpsl61QSe0e/4QrDTvGT8vpEEbtRdiL2JSvILvtV2sIBrA" - + "O/RnFHiychhBBCCCGEEEIIIYQQ4l9Ikiccki+D/HzKtwAAAABJRU5ErkJggg==") - @NotYetImplemented - public void fillText() throws Exception { - final String html = - "\n" - + " \n" - + " \n" - + " \n" - + " \n" - + ""; - loadPageWithAlerts2(html); + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAIAAAAFCAYAAABvsz2cAAAAKklEQVQYVy3IsREAIAzEMP8oNMwZtuTSMIopQKXCVDtEkA3BoTl" + + "vVhXhu4pUDldubjlMAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAIAAAAFCAYAAABvsz2cAAAAJklEQVQImUXIsREAMAjEMDMKTeb8MdnGVFxUCp4KIuggZf9JImc" + + "B04ARksgoEOwAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAIAAAAFCAYAAABvsz2cAAAAJklEQVQImUXIsREAMAjEMDMKTeb8MdnGVFxUCp4KIuggZf9JImc" + + "B04ARksgoEOwAAAAASUVORK5CYII=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAIAAAAFCAYAAABvsz2cAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAlSURBVBhXY2B" + + "Q+///PwPDf0YQwXCDAQj+KyJEGhsaQEIgwMAAAI7uDpdlPpgpAAAAAElFTkSuQmCC") + public void drawImage3ArgumentsImageTooLarge() throws Exception { + drawImage("4x6.png", + "canvas.width = 2; canvas.height = 5;\n", + "context.drawImage(img, 0, 0);\n"); } /** - * @throws Exception if an error occurs + * @throws Exception if the test fails */ @Test - @Alerts("[object CanvasGradient]") - public void createLinearGradient() throws Exception { - final String html = - "\n" - + "\n" - + "\n" - + ""; - loadPageWithAlerts2(html); + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAF0lEQVQYV2P8z8Dwn5GBgZEBCuAM4gUAg+YCBZ6DWDYAAAA" + + "ASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAEElEQVQImWP4z8Dwn4EyAACCwQH/cCTq6QAAAABJRU5ErkJ" + + "ggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAEElEQVQImWP4z8Dwn4EyAACCwQH/cCTq6QAAAABJRU5ErkJ" + + "ggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAQSURBVBh" + + "XY/jPAEIUAAYGAILBAf8lQkk6AAAAAElFTkSuQmCC") + public void drawImage5Arguments() throws Exception { + drawImage("1x1red_32_bit_depth.png", + "canvas.width = 4; canvas.height = 4;\n", + "context.drawImage(img, 0, 0, img.width, img.height);\n"); } /** - * @throws Exception if an error occurs + * @throws Exception if the test fails */ @Test - @Alerts("[object CanvasGradient]") - public void createRadialGradient() throws Exception { - final String html = - "\n" - + "\n" - + "\n" - + ""; - loadPageWithAlerts2(html); + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAGklEQVQYV2NkQAOMWAX+MzD8Z2RgAEtiqAAAN+YCBdugwDMA" + + "AAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAEklEQVQImWNgIAr8Z2D4j1MSADcNAf/wu82GAAAAAElFTkSu" + + "QmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAEklEQVQImWNgIAr8Z2D4j1MSADcNAf/wu82GAAAAAElFTkSu" + + "QmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAARSURBVBhX" + + "YyAO/AcjrICBAQA3DQH/+OkmUAAAAABJRU5ErkJggg==") + public void drawImage5ArgumentsPlacement() throws Exception { + drawImage("1x1red_32_bit_depth.png", + "canvas.width = 4; canvas.height = 4;\n", + "context.drawImage(img, 1, 2, img.width, img.height);\n"); } /** - * @throws Exception if an error occurs + * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"1", "0.5", "0", "0.699999988079071", "0"}, - CHROME = {"1", "0.5", "0", "0.7", "0"}, - EDGE = {"1", "0.5", "0", "0.7", "0"}) - @NotYetImplemented({CHROME, EDGE}) - public void globalAlpha() throws Exception { - final String html = - "\n" - + "\n" - + "\n" - + ""; - loadPageWithAlerts2(html); + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJUlEQVQYV2P8f4PhP6MGAyMDFDD+Z2D4z8iAV+D///+MjIxwLQCf" + + "NQsFaCO3KAAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAGElEQVQImWP4f4PhPwMy+M9AUOD/fxQBAJOmCs946ShRAAAAAElF" + + "TkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAGElEQVQImWP4f4PhPwMy+M9AUOD/fxQBAJOmCs946ShRAAAAAElF" + + "TkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAfSURBVBhXY/h" + + "/g+E/AzIA8lAEmKA0HDAx/EdWwMAAADhoBtfglrXyAAAAAElFTkSuQmCC") + public void drawImage5ArgumentsPlacementNegative() throws Exception { + drawImage("4x6.png", + "canvas.width = 4; canvas.height = 4;\n", + "context.drawImage(img, -3, -1, img.width, img.height);\n"); } /** - * @throws Exception if an error occurs + * @throws Exception if the test fails */ @Test - @Alerts({"0.5", "0.5", "0.5", "0.5"}) - public void globalAlphaInvalid() throws Exception { - final String html = - "\n" - + "\n" - + "\n" - + ""; - loadPageWithAlerts2(html); + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAFklEQVQYV2P8z8DwnwEJMCJzQGzCAgCDawIDNDdv5wAAAABJR" + + "U5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAEUlEQVQImWP4z8DwHxkzkA4A2ncH+YHCac0AAAAASUVORK5CY" + + "II=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAEUlEQVQImWP4z8DwHxkzkA4A2ncH+YHCac0AAAAASUVORK5CY" + + "II=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAARSURBVBhXY/z" + + "PwABEFAAGBgCDBQIA1ym4lAAAAABJRU5ErkJggg==") + public void drawImageStretch() throws Exception { + drawImage("1x1red_32_bit_depth.png", + "canvas.width = 4; canvas.height = 4;\n", + "context.drawImage(img, 0, 0, img.width, img.height, 0, 0, canvas.width, img.height);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAIAAAAFCAYAAABvsz2cAAAAKklEQVQYVy3IsREAIAzEMP8oNMwZtuTSMIopQKXCVDtEkA3BoTl" + + "vVhXhu4pUDldubjlMAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAIAAAAFCAYAAABvsz2cAAAAJklEQVQImUXIsREAMAjEMDMKTeb8MdnGVFxUCp4KIuggZf9JImc" + + "B04ARksgoEOwAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAIAAAAFCAYAAABvsz2cAAAAJklEQVQImUXIsREAMAjEMDMKTeb8MdnGVFxUCp4KIuggZf9JImc" + + "B04ARksgoEOwAAAAASUVORK5CYII=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAIAAAAFCAYAAABvsz2cAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAlSURBVBhXY2B" + + "Q+///PwPDf0YQwXCDAQj+KyJEGhsaQEIgwMAAAI7uDpdlPpgpAAAAAElFTkSuQmCC") + public void drawImage5ArgumentsImageTooLarge() throws Exception { + drawImage("4x6.png", + "canvas.width = 2; canvas.height = 5;\n", + "context.drawImage(img, 0, 0, 4, 6);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAj0lEQVQoU42QwQlCQQxEJyWIDawXsYJ/NQXZw5IeLGjsZBuQf1N" + + "vkWyWj8I/bFgIs7wMkwgmSzp3dtcXUZ/WpR1r76H1TQggHfR4C4DbsL+PHnoB5DJA+MmVH1Rb07Ee0tFWxP+fYysFD9UOXEmU1r" + + "b0G/i7j7sHHSFzChFQMuMeSFLNDCSTnbxO5JyrafAL84cwC261IdQAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAbUlEQVQYlb2OsQnDQAAD5c4eweDi03gE1xrlRzNZRGu48yiXxjw" + + "PTgJpIlBxcAhJP2UFLyGTyWS8pDESzUOCTfC8unV8dOLAA2cmHolHnLnxbfEshb1W9lo5SwGp9e1dwEDo8lVMgm30afF/eQHveW" + + "Ud7tvRzAAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAbUlEQVQYlb2OsQnDQAAD5c4eweDi03gE1xrlRzNZRGu48yiXxjw" + + "PTgJpIlBxcAhJP2UFLyGTyWS8pDESzUOCTfC8unV8dOLAA2cmHolHnLnxbfEshb1W9lo5SwGp9e1dwEDo8lVMgm30afF/eQHveW" + + "Ud7tvRzAAAAABJRU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACCSURBVChTvY7" + + "BDcIwDEV/OLUjIHFIL6gTcMXZh3HYx2GTTBL327SoUrlw4SmO/3esr+A3rmZyUdNRolxv3gAeIPkV5kbxcEeea3fPeZrfe1ybTP" + + "RsKkOU680fElvOeIm4xb1W5NZCO1xaE3cYv9t7V/YPPj/F6xcqU0spSOkY9leABXrPQu6AWg+SAAAAAElFTkSuQmCC") + public void drawImage5ArgumentsStretchX() throws Exception { + drawImage("4x6.png", + "canvas.width = 10; canvas.height = 10;\n", + "context.drawImage(img, 1, 1, 8, 6);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAUUlEQVQoU2NkIBIwgtQ1CDf8r49sYGhc3sAAohmnMIDFkQFEYYP" + + "Af/sDBgwHHS4w1Dd8AKnCrhCm8/////8bGxsZGhoa8CvE51wMnbgUDwWFAM8UFQtlZuKEAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAANUlEQVQYlWNgIAU0CDf8/5/D8B9G41bYIPB/v4PD/4YGgf//GfA" + + "ohIH/////b2hoIKxwxAAAo0AXzo4A4+UAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAANUlEQVQYlWNgIAU0CDf8/5/D8B9G41bYIPB/v4PD/4YGgf//GfA" + + "ohIH/////b2hoIKxwxAAAo0AXzo4A4+UAAAAASUVORK5CYII=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAA1SURBVChTYyA" + + "JNAg3/P+fw/AfRkOFUQATmMydwHDgigOYZpgCFsEP/gNBQ0MDVhNHImBgAADHvxPYgDOEzgAAAABJRU5ErkJggg==") + public void drawImage5ArgumentsShrinkY() throws Exception { + drawImage("4x6.png", + "canvas.width = 10; canvas.height = 10;\n", + "context.drawImage(img, 1, 1, 4, 3);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAIAAAAFCAYAAABvsz2cAAAAOElEQVQYVwEtANL/AQAm//9A9sAAAUAcv/8wB9AAAb8JQP8QJ/A" + + "AAb9ACP8QGP4AAUC/Gf8w3voAj4MRundMhZwAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAIAAAAFCAYAAABvsz2cAAAAOElEQVQImQEtANL/AAAm//9AHL//AEAcv/9wI4//AL8JQP/PMDD" + + "/AL9ACP/PWAb/AEC/Gf9wnRP/0o0VF9N8H0sAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAIAAAAFCAYAAABvsz2cAAAAOElEQVQImQEtANL/AAAm//9AHL//AEAcv/9wI4//AL8JQP/PMDD" + + "/AL9ACP/PWAb/AEC/Gf9wnRP/0o0VF9N8H0sAAAAASUVORK5CYII=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAIAAAAFCAYAAABvsz2cAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAA0SURBVBhXY2R" + + "Q+//f4dsBBiYQYcB+gYFxP6fDfwH1DwwsDOYnGBgk/jEwOuyX/G9w7xcDAHxREIP4we06AAAAAElFTkSuQmCC") + public void drawImage5ArgumentsStretchImageTooLarge() throws Exception { + drawImage("4x6.png", + "canvas.width = 2; canvas.height = 5;\n", + "context.drawImage(img, 0, 0, 8, 12);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAWklEQVQoU7XQQQqAMAxE0T9H6ab0lsZbihuPMmJQV610YzYD4ZHA" + + "iMnRpOMPWG3vQtVk0v8ig9mABleqDSAutg7kQubXxTWCJSILGMKnHttOKHWbeJcXvE0Xns6wHwst5jD0AAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAO0lEQVQYldWMqREAIBDEQikY6rwy6SYIHscNlpiY7MIPNBU8viFo" + + "x+1rWKwKbqePETEfs/AMFk8hyeMAl2Uvlc+P3zcAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAO0lEQVQYldWMqREAIBDEQikY6rwy6SYIHscNlpiY7MIPNBU8viFo" + + "x+1rWKwKbqePETEfs/AMFk8hyeMAl2Uvlc+P3zcAAAAASUVORK5CYII=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABHSURBVChTYxgS" + + "QO3///8MDP/hNC4Akvx/A4ihNFQYC/ivCDEJRuMCIMmGhgaIifgUwgDQhWAA5WIAJigNBoyMjFAWOmBgAAAEXSqdGQ47LgAAAABJ" + + "RU5ErkJggg==") + public void drawImage5ArgumentsNegativeWidth() throws Exception { + drawImage("4x6.png", + "canvas.width = 10; canvas.height = 10;\n", + "context.drawImage(img, 4, 4, -4, 6);\n"); + } + + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAWUlEQVQoU8XOQQqAMAxE0T9H6ab0lsZbihuPMmJQKGLFnSFkNo8k" + + "4l7V9ipUTSZHn6O3BrMADY5UG0BcbG3Ihcy3jXMEU0QeGsLrDdtOKD3/2MPepP5SP8Idu74fCzQIyFMAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAPUlEQVQYlc2Mqw0AIBTEyigY5nxjsk0RfAQJBElNzV1hp6jg8glB" + + "K04fh8ms4PS1GBG9eBuuw+BpyEvxIxoamS+VaAm+LAAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAPUlEQVQYlc2Mqw0AIBTEyigY5nxjsk0RfAQJBElNzV1hp6jg8glB" + + "K04fh8ms4PS1GBG9eBuuw+BpyEvxIxoamS+VaAm+LAAAAABJRU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABGSURBVChTY8AA" + + "av///2dg+A+ncQGQ5P8bQAylocJYwH9FiEkwGhcASTY0NEBMxKcQBoAuBAMol4EJSmMFjIyMUNZQAAwMAKgVKp2FLYz1AAAAAElF" + + "TkSuQmCC") + public void drawImage5ArgumentsNegativeHeight() throws Exception { + drawImage("4x6.png", + "canvas.width = 10; canvas.height = 10;\n", + "context.drawImage(img, 4, 6, 4, -6);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAXElEQVQoU6XQQQqAMAxE0T9H6ab0lsZbihuPMmJFKNRKwWxm8wiT" + + "iMnRpKOH2fYulE1NbtNBg9mAAleqDCBOtg7kRM2vjWsES0StP4TPcbZdofTesYWt+fGewWNPzSgfC+" + + "FFt4IAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAPUlEQVQYlbWMuw0AIBSEcBQb53xjug0WfjqNMZGG5g74T1HB5R2C" + + "VpzeDpNZweljMSJ68TRch8HVkJviMw3cQS+VAulsRwAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAPUlEQVQYlbWMuw0AIBSEcBQb53xjug0WfjqNMZGG5g74T1HB5R2C" + + "VpzeDpNZweljMSJ68TRch8HVkJviMw3cQS+VAulsRwAAAABJRU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABGSURBVChTY6AD" + + "UPv//z8Dw384jQuAJP/fAGIoDRXGAv4rQkyC0bgASLKhoQFiIj6FMAB0IRhAuQxMUBorYGRkhLKoDxgYAAFaKp1TOe14AAAAAElF" + + "TkSuQmCC") + public void drawImage9Arguments() throws Exception { + drawImage("4x6.png", + "canvas.width = 10; canvas.height = 10;\n", + "context.drawImage(img, 0, 0, img.width, img.height, 4, 2, img.width, img.height);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAi0lEQVQoU2M8FcD+n4GBgWFaBB+IYlgQ8ZoRzEADjOsDTMAKHyi8" + + "YBD48IEhccEX7AoXJCRcYeXg4La/dk1U+u1bbsarV3EojI/XNo2IMFWRkMhiY2U1ZdTRwa4QZO3///8dGBgY6h88eOCgqKhIWOGB" + + "AwccHB0dcSvE5ksMXxOjCKQGqzVYw5FYEwEUwCcLsjvElwAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAbUlEQVQYlWM4FcD+/1QA+/+EFaL/E1aI/mfABTYEmPzfEGDyf0KB" + + "zP8FCTy4FS5ISLiyNCPj/hM7uy//tbXxKIyP1766fXvCz/PnT/2/cgW3QgYGBob///87/P//f//9+/eJU7h//378Cgc5AABrbToy" + + "XSlG0gAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAbUlEQVQYlWM4FcD+/1QA+/+EFaL/E1aI/mfABTYEmPzfEGDyf0KB" + + "zP8FCTy4FS5ISLiyNCPj/hM7uy//tbXxKIyP1766fXvCz/PnT/2/cgW3QgYGBob///87/P//f//9+/eJU7h//378Cgc5AABrbToy" + + "XSlG0gAAAABJRU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABzSURBVChTYzwV" + + "wP6fAQimRfCBKIYFEa8ZwQw0wPSUQZcBhPVPsDPY7/gOFcYETB8EdK5+lTB5EHJW8WvCaXmoMBawIC5O+8r27Qk/zp8/9f/KFbAz" + + "cIL///87/Pv3b//9+/dxKmSC0mDw4MEDKGsoAgYGAFZxKhyfkxO8AAAAAElFTkSuQmCC") + public void drawImage9ArgumentsCrop() throws Exception { + drawImage("4x6.png", + "canvas.width = 10; canvas.height = 10;\n", + "context.drawImage(img, 1, 2, 2, 4, 0, 0, img.width, img.height);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAXElEQVQoU2NkIBIwEqmOYegqVPv/P+HTAob6t40Mir8fgP2B1TPZ" + + "YlP+m0udZPBS2sYgsu4tboX7HTj+S6j+ZVAw/MPAmfUft0LRV3L/Q9b8ZCiY8I1B/dZnsEIAKFkcC2BUM+" + + "IAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAARUlEQVQYlWNgGAUwoP4/P1F8wcz7rAoz8arLFp+6apFB7P83QcL/" + + "8So84Mi56noq6//v0xjxKxR/Jbcqc5r4/5tqvHCFALEhF41FNwM8AAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAARUlEQVQYlWNgGAUwoP4/P1F8wcz7rAoz8arLFp+6apFB7P83QcL/" + + "8So84Mi56noq6//v0xjxKxR/Jbcqc5r4/5tqvHCFALEhF41FNwM8AAAAAElFTkSuQmCC", + IE = {}) + @HtmlUnitNYI(IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAPklEQVR42mNgGAUwoPb/f4LE/P//GRj+41WXJTb1/yL92P//Iwko" + + "PGDP8f9GCuv//4sJKGT4r/g/Yb4oitUApWwZ6B07eGEAAAAASUVORK5CYII=") + public void drawImage9ArgumentsCropNegativStart() throws Exception { + drawImage("4x6.png", + "canvas.width = 10; canvas.height = 10;\n", + "context.drawImage(img, -1, -2, 3, 5, 4, 4, img.width, img.height);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAF0lEQVQoU2NkIBIwEqmOYVQh3pAiOngACmkAC5eMKzgAAAAASUV" + + "ORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAADklEQVQYlWNgGAWDEwAAAZoAARbK02kAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAADklEQVQYlWNgGAWDEwAAAZoAARbK02kAAAAASUVORK5CYII=", + IE = {}) + @HtmlUnitNYI(IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAADklEQVR42mNgGAWDEwAAAZoAAQDqGN4AAAAASUVORK5CYII=") + public void drawImage9ArgumentsCropNegativWidth() throws Exception { + drawImage("4x6.png", + "canvas.width = 10; canvas.height = 10;\n", + "context.drawImage(img, 0, 0, -3, 5, 4, 4, img.width, img.height);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAASElEQVQoU2Ocr5nwn4GBgSHx+gJGEI0LMM6v5oEobP2CX+EBB4f9" + + "9gwMDowHDuBXCDJt/vz5/xMTEwkrxOc2mBxeU5ANGAoKAWtoEAsOuLTDAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAM0lEQVQYlWOYr5nwf75mwn8GQmBBNc//BdU8hBUecHDY/9/BgbBC" + + "BgYGhvnz5xOncMQBAL0KD/QH8JFiAAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAM0lEQVQYlWOYr5nwf75mwn8GQmBBNc//BdU8hBUecHDY/9/BgbBC" + + "BgYGhvnz5xOncMQBAL0KD/QH8JFiAAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAvSURBVChTY5iv" + + "mfAfhBkIACaGoDUMYEwIHHBw2P/fwYGgiWAwf/584hSOMMDAAAB1Kw2mrjRWYgAAAABJRU5ErkJggg==") + public void drawImage9ArgumentsStretch() throws Exception { + drawImage("4x6.png", + "canvas.width = 10; canvas.height = 10;\n", + "context.drawImage(img, 0, 0, img.width, img.height, 0, 0, 2, 4);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAcElEQVQoU53QsQ2CUBQF0PNKYs0I7mDhBMbWNajsmMIV6FyG" + + "BJ1DFyDkGxIo9AdDePV59yY3rLxY6WQwsZ+ei+AxB33BxAkVSjTBbQm+sMOAZ3DIYOKI+5TWo8M5eI/4t7rGBS2uM8rgvwW2" + + "z7OU+gHU0xILszCyeAAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAUUlEQVQYlb3KsQ1FYABG0TODHbQmMIFl3gB2MYcJRCOxhFIp" + + "Ec2n0f665ya3O/y9UD83b6gLY1jC7w3u4QxHmEuoDVu4HjiFqoT7sIahiL7vBt20ISfDuXmqAAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAUUlEQVQYlb3KsQ1FYABG0TODHbQmMIFl3gB2MYcJRCOxhFIp" + + "Ec2n0f665ya3O/y9UD83b6gLY1jC7w3u4QxHmEuoDVu4HjiFqoT7sIahiL7vBt20ISfDuXmqAAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABdSURBVChT" + + "Y6A6YITScPCPgUEVyuRkYmC4BGWjAqAiLyDeAcRngTgfKowJgJJvgfgHEH8F4hNQYTAAmg4B/xkYbIDUDyCGif0DKhaCslEB" + + "UKIaiC8A8TyciugNGBgAAdYaCnzestwAAAAASUVORK5CYII=") + public void drawImageDataUrlPng() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + " red dot\n" + + LOG_TEXTAREA + + ""; + + loadPageVerifyTextArea2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAvUlEQVQ4T2NkQAWODAwM5lChkwwMDPvR5AlyGaEqeEUYGLYIM" + + "DDoBzAwcIPENjAwfP3AwHDxDQODDwMDw2eCJkEVgA0UYWA4mMDAYNXNwMCCrLGUgeHPAgaGY28YGOxJMdBRhYFh/W0GBn5sml" + + "QZGD7eYWAIJNb7IBdWlDAwNKO7DmY4yJU9DAy1DAwMHcS4kiYGUt3LVI8UUNBQN9kgBTbVEjYxEUiUGlhOIUoxMYpGDSQmlPC" + + "rGQ1DysMQAFq2MhXKNeEnAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAjElEQVQ4je3SMQrCQBBA0dckZltLrxEkVxEUUudiqaw8l5VW" + + "wZXYRFSI4mrKPJj2M8Muryo0w1T+EAJtxmXDcccpIy7ZI6TXaEtiT/885SOapMpHYvfJiRLPb7ac3wVrutQNvwk2KcHJTxZo" + + "1yOxkrjikBQbFIE2J9Z0Nd2C6/DCxS/Bu8k+9mw2++QGj8thmtPon2MAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAjElEQVQ4je3SMQrCQBBA0dckZltLrxEkVxEUUudiqaw8l5VWw" + + "ZXYRFSI4mrKPJj2M8Muryo0w1T+EAJtxmXDcccpIy7ZI6TXaEtiT/885SOapMpHYvfJiRLPb7ac3wVrutQNvwk2KcHJTxZo1y" + + "OxkrjikBQbFIE2J9Z0Nd2C6/DCxS/Bu8k+9mw2++QGj8thmtPon2MAAAAASUVORK5CYII=", + IE = {}) + @HtmlUnitNYI(IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAzUlEQVR42u2SvwpBYRyGn8Eiyqos/kxGVrkDo8VkJYNcgUtwD" + + "crA7M+CLMoFGJQTirIapAgd78mmQ32nbOetZ/p+Pf2+7/3gX9lBvAGLHJxjcMvANgpVT7I9pPJwL4A9EZLbA5GFaxB6xsIKrI" + + "oS2B/cRRKOGikbCdPwWLoIHbqw0UjfdElXmcMWLJ0fjGwq4WJ9EbZhqJGxkTABnRo8XYSn0FtWN71yWG3uSip8rW0d0RymERj" + + "pbCYCXn5PWLR4v5mcqCeaXmV+/Pj5lRf9o2ZS6A1d/wAAAABJRU5ErkJggg==") + public void drawImageDataUrlSvg() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + " \n" + + LOG_TEXTAREA + + ""; + + loadPageVerifyTextArea2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts({"exception", "0", "true", "true"}) + public void measureText() throws Exception { + final String html = + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + LOG_TEXTAREA + + " \n" + + ""; + + loadPageVerifyTextArea2(html); + } + + private void draw(final String canvasSetup, final String drawJS) throws Exception { + final String html = "\n" + + "\n" + + "\n" + + canvasSetup + + LOG_TEXTAREA + + ""; + + loadPageVerifyTextArea2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAABWEl" + + "EQVRYR+3UvUodURTF8d99BMkLiI12QlqtBI0INqawuLFWtArYiVWwE4QUgbSSFElhKViktLXWzhewtpU" + + "tc2Ey6P2AfbXZU82cM3udtf9nndPz/zOPDZy1hvvN+2+s4gYPnbru5wfs4xR7uMRd81PMneDoFZ12bfh" + + "5jNreBEYvcIgfUzbatvR10OQkRkPgF37iL9ax1qge4BifsIzbMYmGxia2G5127TX+4Qr9l4z+wWKH9Be" + + "0iS5gB9Hxx8ZkRCTGVxrq42x9GJ3DNywNq52EaNfoLCK3gwVisUHGzycgeo+gN7T2LYxutajFRrUbi12" + + "YitG4DYLkd8yMSTTMRd1uE6fnzDUHcpTROLyfI8NdoiNunfebLqPZ7ItoEc0mkK1XGS2i2QSy9SqjRTS" + + "bQLZeZbSIZhPI1quMFtFsAtl6ldEimk0gW68yWkSzCWTrVUaLaDaBbL0nX4NjZfKcb1cAAAAASUVORK5" + + "CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAqElEQVRYhe2SwQ3DIAxF/yzMwSCeJKN0lg6TXeihRHKNacIh" + + "6qHvSUgI8OclWPqkSnqGta0PSXroOubOn+We1Q98C8z27hSNXsPCLHCX1Prlh0Tro7q5LYpa3zvqt6R+z0RbMuIfNVfs59WF" + + "r4pKUgm5vn4QvfL0MSQT8mfKJNc09uJPRaX3y5QgVO8QLRp7dEU0tlXWizNR/4EAAAAAAAAAAAAAAP/AC/GNUlQypcRWAAAA" + + "AElFTkSuQmCC", + FF78 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAn0lEQVR" + + "Yhe3S4Q2DIBCG4W+WzuEgTuIozOIw7kJ/FJLzehSpJibmfRJixOP8BKW9SVJyc6nMS9KiMdvBvr31X3o" + + "Nmws7L/o3aNOvhqukXK61LpexmOf2Y44Etb1b69coaA6G39FaV9ma6AR6QW24uhHSBUfv67bBeh80BfO" + + "3BJU+u/5y91GvS4L6f3Qk6Kz97zSfCQoAAAAAAAAAwMO9AbwlTKQXMPMUAAAAAElFTkSuQmCC", + IE = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0I" + + "Ars4c6QAAAARnQU1BAACxjwv8YQUAAADvSURBVFhH7ZJBDsFAFIbLURrHwBJHwMqWA3AGDmBtxxGwsHE" + + "NbUTcg/+v92QibdKRWPm/5PNPTeZ15nWSD9pw/xq+mZtkbVmHhyXrsW6Iz1Xh80NYrG3yJ4Kp5a9pWE4" + + "sozbq3bxAnpTPPDnlqX3MubqwBjse1iFepw/PMC3bKCd9IV1CMrNsWfYgTz6CGxt3YBfGcIJeZ8w/jB0" + + "8QNbMyzbKSS50F7CMo+Ud+piklk5uGZJZkpsl61QSe0e/4QrDTvGT8vpEEbtRdiL2JSvILvtV2sIBrA" + + "O/RnFHiychhBBCCCGEEEIIIYQQ4l9Ikiccki+D/HzKtwAAAABJRU5ErkJggg==") + public void fillText() throws Exception { + draw("\n", + "context.fillText('HtmlUnit', 3, 7);\n"); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts("[object CanvasGradient]") + public void createLinearGradient() throws Exception { + final String html = + "\n" + + "\n" + + "\n" + + " \n" + + LOG_TEXTAREA + + "\n" + + ""; + + loadPageVerifyTextArea2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts("[object CanvasGradient]") + public void createRadialGradient() throws Exception { + final String html = + "\n" + + "\n" + + "\n" + + " \n" + + LOG_TEXTAREA + + "\n" + + ""; + + loadPageVerifyTextArea2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts(DEFAULT = {"1", "0.5", "0", "0.699999988079071", "0"}, + CHROME = {"1", "0.5", "0", "0.7", "0"}, + EDGE = {"1", "0.5", "0", "0.7", "0"}) + @NotYetImplemented({CHROME, EDGE}) + public void globalAlpha() throws Exception { + final String html = + "\n" + + "\n" + + "\n" + + " \n" + + LOG_TEXTAREA + + "\n" + + ""; + + loadPageVerifyTextArea2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts({"0.5", "0.5", "0.5", "0.5"}) + public void globalAlphaInvalid() throws Exception { + final String html = + "\n" + + "\n" + + "\n" + + " \n" + + LOG_TEXTAREA + + "\n" + + ""; + + loadPageVerifyTextArea2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAMklEQVQ4T2NkoDJghJrXQCVzG2huILkuhenDcOHwNvA/AwND" + + "I80jhZLUg+JCSgxC0QsANbUOC0ZQs6cAAAAASUVORK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAMklEQVQ4T2NkoDJghJrXQCVzG2huILkuhenDcOHwNvA/AwND" + + "I80jhZLUg+JCSgxC0QsANbUOC0ZQs6cAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAOElEQVQokWNgoBFwYGBgaKAQOyAb2MDAwLCfAsNgelEMRBEg" + + "EWDoH6EGUjVSHCgwDIYdiPQNaQAAWucr/QQSzQIAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAOElEQVQokWNgoBFwYGBgaKAQOyAb2MDAwLCfAsNgelEMRBEg" + + "EWDoH6EGUjVSHCgwDIYdiPQNaQAAWucr/QQSzQIAAAAASUVORK5CYII=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABTSURBVDhP" + + "Y6A2YITSDlBMCTgAwkwQNtgwewiTLADSi+KgBigmF8D1w1xINTD4DYTFMsj/oIA9COaRDmB6G5jBXAiAGU4OeAjEoGTzAMyj" + + "HmBgAADuaAqOh9GTVgAAAABJRU5ErkJggg==") + public void strokeRect() throws Exception { + draw("\n", + "context.strokeRect(2, 2, 16, 6);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAKElEQVQ4T2NkoDJgpLJ5DMgG/qfQcLBZowZSFIq0D0OKnAfT" + + "TPV0CAA8pwYLxeyTOgAAAABJRU5ErkJggg==", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAKElEQVQ4T2NkoDJgpLJ5DMgG/qfQcLBZowZSFIq0D0OKnAfT" + + "TPV0CAA8pwYLxeyTOgAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAFklEQVQokWNgGErgP4V41MChYODgBADEpF+hDnSEnAAAAABJ" + + "RU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAFklEQVQokWNgGErgP4V41MChYODgBADEpF+hDnSEnAAAAABJ" + + "RU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAhSURBVDhP" + + "Yxj0gBFKg8B/KE0uAJvFBGZSEYwaOPwBAwMAkWIBDOc7sxkAAAAASUVORK5CYII=") + public void fillRect() throws Exception { + draw("\n", + "context.fillRect(2, 2, 16, 6);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAALElEQVQ4T2NkgID/UJpSipFx1MDRMCQ5BEaTDclBhqFhNAxH" + + "w5CMEKB+sgEAGQQUFQfPo6sAAAAASUVORK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAALElEQVQ4T2NkgID/UJpSipFx1MDRMCQ5BEaTDclBhqFhNAxH" + + "w5CMEKB+sgEAGQQUFQfPo6sAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAHklEQVQ4jWNggID/VMJwMGrgqIGjBo4aOGrgiDMQAMu0Zqj6" + + "rPAwAAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAHklEQVQ4jWNggID/VMJwMGrgqIGjBo4aOGrgiDMQAMu0Zqj6" + + "rPAwAAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAArSURBVDhP" + + "Y2SAgP9QmlLAyARlUA2MGkg5GDWQcjBqIOVg1EDKwWA3kIEBAND2AShZ31fQAAAAAElFTkSuQmCC") + public void fillRectWidthHeight() throws Exception { + draw("\n", + "context.fillRect(1, 0, 18, 20);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAN0lEQVQ4T2NkoDJgpLJ5DMgG/qfQcLBZowZSFIq0D0OKnAfT" + + "TNN0OOpC8kJgNFLICzdkXYM/DAFt+QYVhcRJbAAAAABJRU5ErkJggg==", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAN0lEQVQ4T2NkoDJgpLJ5DMgG/qfQcLBZowZSFIq0D0OKnAfT" + + "TNN0OOpC8kJgNFLICzdkXYM/DAFt+QYVhcRJbAAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAG0lEQVQ4jWNgGErgP4V41MChYOAoGAWjYOgCAGnPX6Ee+YVU" + + "AAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAG0lEQVQ4jWNgGErgP4V41MChYOAoGAWjYOgCAGnPX6Ee+YVU" + + "AAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAnSURBVDhP" + + "Yxj0gBFKg8B/KE0uAJvFBGZSEYwaOApGwSgYBSDAwAAA4YcBDBgCJpwAAAAASUVORK5CYII=") + public void fillRectRotate() throws Exception { + draw("\n", + "context.fillRect(2, 2, 16, 6); context.rotate(.5);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA10lEQVQ4T93UrU4DQRAA4K84XoCXqACDwjShGDAIRIOpbtIE" + + "D5rW4XAVJFVVgKgEharEVVVW4XgAzFxy2XB/zRnYZJNNZvbbmd1kO1oenZY9fxO8wHLXq0hbPsYKr5jEupGdgs+4zAmzgDd1" + + "1Tx4XtLqNODvKjgPfuCkZMNXoA9laAYO8VR1esTXuMf8t/wM3MNtzP2a8DtO09z0UQ4CvamB9vFWBWbxbsDXBfACg7KWiwrq" + + "BXyWJBzicxcw23OFOxzhEeOiCpp+DiO8YNsWWPlWTSv8B+APX48cFbtSb50AAAAASUVORK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA10lEQVQ4T93UrU4DQRAA4K84XoCXqACDwjShGDAIRIOpbtIE" + + "D5rW4XAVJFVVgKgEharEVVVW4XgAzFxy2XB/zRnYZJNNZvbbmd1kO1oenZY9fxO8wHLXq0hbPsYKr5jEupGdgs+4zAmzgDd1" + + "1Tx4XtLqNODvKjgPfuCkZMNXoA9laAYO8VR1esTXuMf8t/wM3MNtzP2a8DtO09z0UQ4CvamB9vFWBWbxbsDXBfACg7KWiwrq" + + "BXyWJBzicxcw23OFOxzhEeOiCpp+DiO8YNsWWPlWTSv8B+APX48cFbtSb50AAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAkElEQVQ4je3MrRIBYQCF4ecCqLqgCJosaJKgqi5A1WVBEyQz" + + "GlmWZRchq6vsznyDWd/+aPvOnJmTHpr+Ua9ObIgE5/RX7pSC2XbolsUmb1i4NVpFwWsOmOCBZSw2/YGFu2Meg67wLADvY9AO" + + "NpHgOAbM6uOQgx2LYGEjXL6Ag7Jg1gy3FNtWxcIWaNcJNn32Ann7R7XCBLW+AAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAkElEQVQ4je3MrRIBYQCF4ecCqLqgCJosaJKgqi5A1WVBEyQz" + + "GlmWZRchq6vsznyDWd/+aPvOnJmTHpr+Ua9ObIgE5/RX7pSC2XbolsUmb1i4NVpFwWsOmOCBZSw2/YGFu2Meg67wLADvY9AO" + + "NpHgOAbM6uOQgx2LYGEjXL6Ag7Jg1gy3FNtWxcIWaNcJNn32Ann7R7XCBLW+AAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACWSURBVDhP" + + "7cytDoJQGIfxcwFY6QSLwUY20EwGK5ULoNrNBJqBxEaTbDabuQgyFZ4zDxtj78Z349l+O+9O+Ku9TTqad5Vc1MjNvbg39GDr" + + "BQezuqI71vWEhUl9IY21SoQY1Q3SiKSAj8EeqCCNSBIMZiOCNNDnYXQnpJCGtAyzuuCD/uAZi7rjBz0W64+1CnD4n3vbpFQD" + + "eftHtWY6PUwAAAAASUVORK5CYII=") + public void rotateFillRect() throws Exception { + draw("\n", + "context.rotate(.5); context.fillRect(6, 2, 12, 6);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAN0lEQVQ4T2NkoDJgpLJ5DMgG/qfQcLBZowZSFIq0D0OKnAfT" + + "TNN0OOpC8kJgNFLICzdkXYM/DAFt+QYVhcRJbAAAAABJRU5ErkJggg==", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAN0lEQVQ4T2NkoDJgpLJ5DMgG/qfQcLBZowZSFIq0D0OKnAfT" + + "TNN0OOpC8kJgNFLICzdkXYM/DAFt+QYVhcRJbAAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAG0lEQVQ4jWNgGErgP4V41MChYOAoGAWjYOgCAGnPX6Ee+YVU" + + "AAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAG0lEQVQ4jWNgGErgP4V41MChYOAoGAWjYOgCAGnPX6Ee+YVU" + + "AAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAnSURBVDhP" + + "Yxj0gBFKg8B/KE0uAJvFBGZSEYwaOApGwSgYBSDAwAAA4YcBDBgCJpwAAAAASUVORK5CYII=") + public void fillRectTranslate() throws Exception { + draw("\n", + "context.fillRect(2, 2, 16, 6); context.translate(3, 4);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAMUlEQVQ4T2NkoDJgpLJ5DKMGUh6iuMLwP7lGjxoID7nBH4bk" + + "RvJo1iM75BAaR2DxBQB5vAYPhQt4egAAAABJRU5ErkJggg==", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAMUlEQVQ4T2NkoDJgpLJ5DKMGUh6iuMLwP7lGjxoID7nBH4bk" + + "RvJo1iM75BAaR2DxBQB5vAYPhQt4egAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAG0lEQVQ4jWNgGAUjF/ynAI8aOFQMHAWjgJ4AABYtWaeYl32X" + + "AAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAG0lEQVQ4jWNgGAUjF/ynAI8aOFQMHAWjgJ4AABYtWaeYl32X" + + "AAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAkSURBVDhP" + + "YxgFIwAwQml08B9KkwyYoDTVwKiBo2AUDAfAwAAAf3YBCwCfFioAAAAASUVORK5CYII=") + public void translateFillRect() throws Exception { + draw("\n", + "context.translate(3, 4); context.fillRect(2, 2, 16, 6);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAzElEQVQ4T+3UsQkCMRTG8f+BgpWNK1hZiU5g4wYKdg5h4Qpi" + + "7wg2jiA4gKCdpYJgIQiCG8iDPHiE4OVMGsFAuOPy8nv5UlxB5lFk9viD6Tf6W3c4Ag7AJSW4jXwCOsDDwUf3lCbX2CYKNoHX" + + "h013g2ujW6hewQGwiz2FqxPQpthLOgVnwLIiaMvPQFs+KLgGJgngBhhbcAX0gD5Q+wKeAwsLqiEnFlRxeZdZNobANgSGNta9" + + "BtKs6xW2gGcsGGrS8JJMbcSyOJXWs/8c3nSHHxVqGh2JAAAAAElFTkSuQmCC", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAzElEQVQ4T+3UsQkCMRTG8f+BgpWNK1hZiU5g4wYKdg5h4Qpi" + + "7wg2jiA4gKCdpYJgIQiCG8iDPHiE4OVMGsFAuOPy8nv5UlxB5lFk9viD6Tf6W3c4Ag7AJSW4jXwCOsDDwUf3lCbX2CYKNoHX" + + "h013g2ujW6hewQGwiz2FqxPQpthLOgVnwLIiaMvPQFs+KLgGJgngBhhbcAX0gD5Q+wKeAwsLqiEnFlRxeZdZNobANgSGNta9" + + "BtKs6xW2gGcsGGrS8JJMbcSyOJXWs/8c3nSHHxVqGh2JAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAoklEQVQ4je3QsQpBARiG4ceglDKYlTKalcFkMBmUizAom7IZ" + + "yOgCDFaDTRlcgkGZbDaDcgsGFsNJ54RDMnjrW5/+fv79+62KKHwS3OGCE1YYoYl8HCxzw6J2xBIDNJB7BFYfgGE7YIE+6kgH" + + "wW4MMLj9/YWzN8H5PTjEGueYYC/qlwmU0MIEmyfBWhQYVhJltDHFNgTMvgKGlUIFHYzfxb7bFf97X7D//5t+AAAAAElFTkSu" + + "QmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAoklEQVQ4je3QsQpBARiG4ceglDKYlTKalcFkMBmUizAom7IZ" + + "yOgCDFaDTRlcgkGZbDaDcgsGFsNJ54RDMnjrW5/+fv79+62KKHwS3OGCE1YYoYl8HCxzw6J2xBIDNJB7BFYfgGE7YIE+6kgH" + + "wW4MMLj9/YWzN8H5PTjEGueYYC/qlwmU0MIEmyfBWhQYVhJltDHFNgTMvgKGlUIFHYzfxb7bFf97X7D//5t+AAAAAElFTkSu" + + "QmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC3SURBVDhP" + + "7dIxCsIwFIDhqAgudvECzk6iXsChV/ECehkvI66CurnpIHQQBMXBTdD/vSYQNEKsi0J/+EiyvLSlpqzsB6rZVeqgibOeClax" + + "q7SBDD1ijZVnj6jcwASXfBvsABnsX5ThJTdwiFm+jU4G+hfMcYU2wf0LW2hVu/bsWjR5Us0N3GGBm54+T145mHzTAUaYYonQ" + + "Kz5Lofm/zbvqkE/St2TfhV8LJ9nEDAzVgBvexhh/kTEPbs42HzJH+t4AAAAASUVORK5CYII=") + public void rotateTranslateFillRect() throws Exception { + draw("\n", + "context.rotate(0.2); context.translate(0, 4); context.fillRect(4, 4, 16, 6);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAtklEQVQ4T+2SMQoCMRBF3x7BegsrbezWRnuP4hFsbey38zq2" + + "VirYLFgKXsJOBnaWIQwyblawMJAiJHlv5icFA49iYB5/YH6iX8twDNzz66N75TWwB87AxczrpxJtuQQezuVnC7eitxKb4RFY" + + "BipSiXSiok5igVtgFwB6R2pgIxsWOAdOPYENMEuBsr4B055QATbePxwBVTIjEmm5jn5slUgsKpsknRyAVRTopeBJFjlAN+rf" + + "B74A50UdJ5SgdwwAAAAASUVORK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAtklEQVQ4T+2SMQoCMRBF3x7BegsrbezWRnuP4hFsbey38zq2" + + "VirYLFgKXsJOBnaWIQwyblawMJAiJHlv5icFA49iYB5/YH6iX8twDNzz66N75TWwB87AxczrpxJtuQQezuVnC7eitxKb4RFY" + + "BipSiXSiok5igVtgFwB6R2pgIxsWOAdOPYENMEuBsr4B055QATbePxwBVTIjEmm5jn5slUgsKpsknRyAVRTopeBJFjlAN+rf" + + "B74A50UdJ5SgdwwAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAZUlEQVQ4jWNgGAWjgGwgQG0DExgYGP4zMDCsZ2Bg6IfyDSgx" + + "UABqIDZMtiX38RhKliUNJBiIjueT6m1C+D0uV+6nwFAFXIYyMDAwBECDYD0D8WFbgM9AcizZT6qBxFhC9QwyBAAApwtZ2OX4" + + "JhcAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAZUlEQVQ4jWNgGAWjgGwgQG0DExgYGP4zMDCsZ2Bg6IfyDSgx" + + "UABqIDZMtiX38RhKliUNJBiIjueT6m1C+D0uV+6nwFAFXIYyMDAwBECDYD0D8WFbgM9AcizZT6qBxFhC9QwyBAAApwtZ2OX4" + + "JhcAAAAASUVORK5CYII=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACgSURBVDhP" + + "YxgFo4B8IAClKQbMUDoCiM8DsQEQWwCxJBCDwAsoTTRghNIgF76HMDHABiB+AMQXgfgCFOMEMANB4D4QK0CYBAFRljQA8X8y" + + "8XwgxgAgb2NTTAzGFVwM+4EYmwZiMDi4YLEMAwuBuBGIQWFzE4g/ADEHEBOTrB4C8QnkSCEEAoAYlKz0oTR6BB4AYkdSDMQG" + + "0C0xBOKRBRgYAItyQgsDc+IZAAAAAElFTkSuQmCC") + public void transformTranslateFillRect() throws Exception { + draw("\n", + "context.setTransform(1, .2, .3, 1, 0, 0); context.translate(-5, 4); context.fillRect(4, 4, 16, 6);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAALUlEQVQ4T2NkoDJgpLJ5DMgG/qfQcLBZdDEQVzAQ8gFOF44g" + + "AymMZIh2qqdDAD9SCgvGd82WAAAAAElFTkSuQmCC", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAALUlEQVQ4T2NkoDJgpLJ5DMgG/qfQcLBZdDEQVzAQ8gFOF44g" + + "AymMZIh2qqdDAD9SCgvGd82WAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAGUlEQVQokWNgGErgP4WYfgaS64NRAwcrAACGL0e5XiFXSgAA" + + "AABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAGUlEQVQokWNgGErgP4WYfgaS64NRAwcrAACGL0e5XiFXSgAA" + + "AABJRU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAtSURBVDhP" + + "Yxj0gBFKg8B/KE0uAJvFBGZSEWBzIbIYMiDkA9q4cPAbONgBAwMAI5ADC8QrQ2IAAAAASUVORK5CYII=") + public void clearRect() throws Exception { + draw("\n", + "context.fillRect(2, 2, 16, 6); context.clearRect(4, 4, 6, 6);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAXUlEQVQ4T2P878Lwn4GKgHHUQIpDcySHIeMeBkZYAFKSlOBh" + + "iGwgtpgh1hKiDSTWEpRYJuRKfGkK5oMhZiC6l0gJAqxeJibf4bMEZChVsh7MEqoZiOwzqriQpgYCAH2SSD3nlbP6AAAAAElF" + + "TkSuQmCC", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAXUlEQVQ4T2P878Lwn4GKgHHUQIpDcySHIeMeBkZYAFKSlOBh" + + "iGwgtpgh1hKiDSTWEpRYJuRKfGkK5oMhZiC6l0gJAqxeJibf4bMEZChVsh7MEqoZiOwzqriQpgYCAH2SSD3nlbP6AAAAAElF" + + "TkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAi0lEQVQ4je2TwQ2DMAxF3wiMwCiRbKQeGYER2IAROgIjdBRG" + + "YARG+BwBQSgpuVStJV/fi51v5Chn8wf+EHDKCzR6ABm1nFZGL2e49UIilSpZdvigjEFTJOtP6a4Cd4KK5ggYHfstMFDEYhM+" + + "hhrjWQ5fcjoZ9dXdynmmBvtUIifkuJSNRM70PbecrWcimdKSONB+gwAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAi0lEQVQ4je2TwQ2DMAxF3wiMwCiRbKQeGYER2IAROgIjdBRG" + + "YARG+BwBQSgpuVStJV/fi51v5Chn8wf+EHDKCzR6ABm1nFZGL2e49UIilSpZdvigjEFTJOtP6a4Cd4KK5ggYHfstMFDEYhM+" + + "hhrjWQ5fcjoZ9dXdynmmBvtUIifkuJSNRM70PbecrWcimdKSONB+gwAAAABJRU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADcSURBVDhP" + + "7ZTRDYJADIb/kviuG+gEMoIRfdcN3EDdwA1cwREYgMQ4gbiBI/CskVrOItEQ4XLHm19y4b9e0vZKr8QzMDwS6Ncbf4fudONQ" + + "+iYzOw+UGcaUgJBjKc63sg7MSPXMCtPYRYZBgoHaPuApFhxgKHIsVwmJEL5O6qleyh0jOuFqdAM/g5gMixVhpyZreI5V6ef9" + + "l5mwVmnPDbGqqm0I6EuWE91aIaXKpG6mXLXTRgwxMS4iUjyQtqltHmEvtdy0Hl9NQcztCEenefgdhHs4Ozmso5u37A/gCR//" + + "XBF+op2TAAAAAElFTkSuQmCC") + public void transformTranslateClearRect() throws Exception { + draw("\n", + "context.fillStyle = '#ff4400'; context.fillRect(0, 0, 20, 20); " + + "context.setTransform(1, .2, .3, 1, 0, 0); " + + "context.translate(-5, 4); context.clearRect(4, 4, 16, 6);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAdUlEQVQ4T2NkoDJgRDIvkYGBYRcDA8NTSuyAGajMwMDQwsDA" + + "4MbAwHAXajDI8EOkGo7sQpheO6jBIMNBFoEMhmGCrsdmILKjpJEMd2dgYLhDyPWEDET3Mcz1IMOVoIbXQIMJrJZUA7G5fj6y" + + "ICUGYo2vwW8gAH5+EgsNfvz9AAAAAElFTkSuQmCC", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAdUlEQVQ4T2NkoDJgRDIvkYGBYRcDA8NTSuyAGajMwMDQwsDA" + + "4MbAwHAXajDI8EOkGo7sQpheO6jBIMNBFoEMhmGCrsdmILKjpJEMd2dgYLhDyPWEDET3Mcz1IMOVoIbXQIMJrJZUA7G5fj6y" + + "ICUGYo2vwW8gAH5+EgsNfvz9AAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAUklEQVQokdXQQRGAMBAEwfYRjMCDaMFLvAQtQUs88MhJOB6s" + + "gN6q4cMdKJngjYkHDWcWXAMccdBxYcvAt8B64CPOagbOytCsLNPKlLaCPRP86V4K4A4qOXwp8AAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAUklEQVQokdXQQRGAMBAEwfYRjMCDaMFLvAQtQUs88MhJOB6s" + + "gN6q4cMdKJngjYkHDWcWXAMccdBxYcvAt8B64CPOagbOytCsLNPKlLaCPRP86V4K4A4qOXwp8AAAAABJRU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABZSURBVDhP" + + "Y6A2YIbSIOALxF+B+DOYRyEQAeLlQPwGiE8BcQsQ2wExVQDIIJCBIIPfAjHIokQglgZiigHIEJBhIENBhtPU9aDgAVkECi6q" + + "AJDrQRE5sgEDAwCWpRA/yw9O8gAAAABJRU5ErkJggg==") + public void moveToLineToStroke() throws Exception { + draw("\n", + "context.moveTo(2, 2); context.lineTo(16, 6); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA40lEQVQ4T63TPUpDQRAA4C+l6TxAPEQIeAExHiCNEETQPtZi" + + "If4kYGdlIzaCjZ2NSjyJlRbWNoqFoLKyC6+Q8HyZbQZ2mW+HYaYl+LSCPQXcz3CJjf8p4AW+sdVYyolV8AvbUeABPnEYBR7h" + + "A8dRYILeMY4CL7GAQRTYxQ3W8YqXHP/tVwd7hFUsooM33OE+x1r4rE1JVa+hj2Vc4wq3s+S6q9fGJnbwiFNM/4LrgtXctE1p" + + "zFLPJ3iqPjYBS/4JNrCH83I5D5iMHs5yG3bxPC9YCksLMcRSFJjgFTxEgr/VhoM/OAYkFQrlOVoAAAAASUVORK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA40lEQVQ4T63TPUpDQRAA4C+l6TxAPEQIeAExHiCNEETQPtZi" + + "If4kYGdlIzaCjZ2NSjyJlRbWNoqFoLKyC6+Q8HyZbQZ2mW+HYaYl+LSCPQXcz3CJjf8p4AW+sdVYyolV8AvbUeABPnEYBR7h" + + "A8dRYILeMY4CL7GAQRTYxQ3W8YqXHP/tVwd7hFUsooM33OE+x1r4rE1JVa+hj2Vc4wq3s+S6q9fGJnbwiFNM/4LrgtXctE1p" + + "zFLPJ3iqPjYBS/4JNrCH83I5D5iMHs5yG3bxPC9YCksLMcRSFJjgFTxEgr/VhoM/OAYkFQrlOVoAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAkklEQVQ4jdXTqw0CURCG0ZOVrKADHNlsCxSARGLQiC2BkPAI" + + "aASGBEMLWJrAkWCgAgxBEBziUsII7lfAEX9myKUF5pHgMgtw9tfgFOtIsMEuEqzwxAg1WhHoGEdc8cYZGwwicOhhghMeP7yK" + + "wrtY4YW9NEtIbelNP9JVFFFwBwfcMYxCoY+LNEMZhRbY4hYFZtYXWq4ZzM6yLlgAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAkklEQVQ4jdXTqw0CURCG0ZOVrKADHNlsCxSARGLQiC2BkPAI" + + "aASGBEMLWJrAkWCgAgxBEBziUsII7lfAEX9myKUF5pHgMgtw9tfgFOtIsMEuEqzwxAg1WhHoGEdc8cYZGwwicOhhghMeP7yK" + + "wrtY4YW9NEtIbelNP9JVFFFwBwfcMYxCoY+LNEMZhRbY4hYFZtYXWq4ZzM6yLlgAAAAASUVORK5CYII=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC1SURBVDhP" + + "5dOhCgJBEMbx1QOLwWC/JuIrWGxGo2/gQ1wTNBuMFl/BavQFbMIVLVaxCHecCvqfu12wzwiCH/yY3Q3D3jLnfj6Rr1MMsCt3" + + "itR9rfmqTmhols+GL19V+doN72hUS11Cwyva1VKXMDY3LHHGExkeUGWCDVLk2GOBEUzSR4ItLpDmXZikgxnkaVbowSQtyG9a" + + "YA6zsYuxxgljObDKEAfIMzTlwCLy2TJyx3L3b3HuDVsZGxJRyvPSAAAAAElFTkSuQmCC") + public void moveToBezierCurveToStroke() throws Exception { + draw("\n", + "context.moveTo(2, 2); context.bezierCurveTo(2, 17, 1, 4, 19, 17); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA4klEQVQ4T83Ur0uEQRAG4Of+BLEZBBGLQTCbRNAih6Bgsgki" + + "NptJziYGwejFa4dBMIhRLGLQqsVwwWwyHjLiB8vByf2Y4MKUhfeZCbNbk3xqhXeId7z+1kitSvAcc5jHBB5xjzu8DKqXYJmZ" + + "xBJWsI5PtHCJr7/wfmBvZhm7WMMpzvqhg4JVfgHHmMIBnnvhYcEqv4cLbOO6REcFw1jFDTZwW6HjgGHU0cQiPuJiXDCME8xg" + + "JwsMp4MtPGVMGOARprGfBc7iIdYpC4wp37CZCV6hnQnG59LJBBvoZoI/j+X/g9+Lnx+HMnS2xgAAAABJRU5ErkJggg==", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA4klEQVQ4T83Ur0uEQRAG4Of+BLEZBBGLQTCbRNAih6Bgsgki" + + "NptJziYGwejFa4dBMIhRLGLQqsVwwWwyHjLiB8vByf2Y4MKUhfeZCbNbk3xqhXeId7z+1kitSvAcc5jHBB5xjzu8DKqXYJmZ" + + "xBJWsI5PtHCJr7/wfmBvZhm7WMMpzvqhg4JVfgHHmMIBnnvhYcEqv4cLbOO6REcFw1jFDTZwW6HjgGHU0cQiPuJiXDCME8xg" + + "JwsMp4MtPGVMGOARprGfBc7iIdYpC4wp37CZCV6hnQnG59LJBBvoZoI/j+X/g9+Lnx+HMnS2xgAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAmElEQVQ4jdXNoY4BAADG8d88g2BTKJJ8NlGxu3JdMU1QBEXw" + + "BBc0mSdQkFXbJVmwCUyx8wIKb/Bd8N+++vv4pwoYoIVSCpxhiyvOWKKPSuKgjA4WuOAXvQT86gsrHDBMwk2sn3g1CY9xQzuJ" + + "fuMPH0m0hyOKSXT6XKwi7qgn0Ql+kmAD+yQIJ9SS4AafSXCObhLcYZQE36QH4bUZnfYO4BkAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAmElEQVQ4jdXNoY4BAADG8d88g2BTKJJ8NlGxu3JdMU1QBEXw" + + "BBc0mSdQkFXbJVmwCUyx8wIKb/Bd8N+++vv4pwoYoIVSCpxhiyvOWKKPSuKgjA4WuOAXvQT86gsrHDBMwk2sn3g1CY9xQzuJ" + + "fuMPH0m0hyOKSXT6XKwi7qgn0Ql+kmAD+yQIJ9SS4AafSXCObhLcYZQE36QH4bUZnfYO4BkAAAAASUVORK5CYII=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC8SURBVDhP" + + "5dOxCkFRHMfxg2xG3cVCSpGZMliVxW4zm6zewwt4B5InsChlVpSFSYhJ+f7OPV7g3v/mW5/uOWf4d+re66zLhWcWYxTwxhOJ" + + "yoSnBs7QCD7YYBUckaoShpjjgi1GMKuPBQ6Y6MCqDpbQ8IoOrJrihp7fGTXAHS2/M0ov6oSi39HvO0zaDmV0oc/LJN3ugaY2" + + "aW+oXsijjbUOLNKwfby064ya/mGrdMOq5cArIsuBdUTx8o9y7gudKxyCiC+bbQAAAABJRU5ErkJggg==") + public void moveToQuadraticCurveToStroke() throws Exception { + draw("\n", + "context.moveTo(2, 2); context.quadraticCurveTo(19, 4, 19, 17); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAANElEQVQ4T2NkoDJgpLJ5DKMGUh6iQysM/1PoYbBvkb08Ag2k" + + "MAgh2odWshn1MnkhQPVYBgBiiQQV+ctw0AAAAABJRU5ErkJggg==", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAANElEQVQ4T2NkoDJgpLJ5DKMGUh6iQysM/1PoYbBvkb08Ag2k" + + "MAgh2odWshn1MnkhQPVYBgBiiQQV+ctw0AAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGklEQVQ4jWNgGAWjYHCB/xTiUQNHwSgYOAAAZ/s/wXgqXt0A" + + "AAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGklEQVQ4jWNgGAWjYHCB/xTiUQNHwSgYOAAAZ/s/wXgqXt0A" + + "AAAASUVORK5CYII=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAoSURBVDhP" + + "YxgFo2AQAEYoDQL/oTS5AGwWE5hJRTD4DRwFo2DgAQMDAN0JAQjYZYmBAAAAAElFTkSuQmCC") + public void lineWidthMoveToLineToStroke() throws Exception { + draw("\n", + "context.lineWidth = 4; context.moveTo(2, 10); context.lineTo(18, 10); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAv0lEQVQ4T+2SvQ3CQAyFv7RI1FCwAz89YgtoYYyUKUBsAQUN" + + "jMEAQCaAErZAlk7iiGzioKPDzRX39Pk92xmJK0vM4+fAFjABTsDjG/eawwvQB64BfA6vq4kGXAG54e4WwZeaRgOOgaMj7gAo" + + "qzprKXegUwOVFGsvcAPMa4CSQhb4VpbDKbB3xO5Wr8ECtoEdMAJ6H8ALYBv/ew5bgMMAlwZxkwMwawrUDMZNihRAcwqeyI7d" + + "vCR/YKNxqeLkM3wCcUQZFXL2p1wAAAAASUVORK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAv0lEQVQ4T+2SvQ3CQAyFv7RI1FCwAz89YgtoYYyUKUBsAQUN" + + "jMEAQCaAErZAlk7iiGzioKPDzRX39Pk92xmJK0vM4+fAFjABTsDjG/eawwvQB64BfA6vq4kGXAG54e4WwZeaRgOOgaMj7gAo" + + "qzprKXegUwOVFGsvcAPMa4CSQhb4VpbDKbB3xO5Wr8ECtoEdMAJ6H8ALYBv/ew5bgMMAlwZxkwMwawrUDMZNihRAcwqeyI7d" + + "vCR/YKNxqeLkM3wCcUQZFXL2p1wAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAZ0lEQVQ4jWNgGAUMDAwO1DbwPgMDw38ovZ6BgaGBUkv6oQZi" + + "w8iWEA0M8BiIjBVIMRTmbXy4gBQD8Xkbhs+TYmAAEQaS5G0BBgaG/UQYSJK3YUAB6uIGLJasJ8dAfJaQ5cJRMArQAACZ8kHB" + + "SAvL+gAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAZ0lEQVQ4jWNgGAUMDAwO1DbwPgMDw38ovZ6BgaGBUkv6oQZi" + + "w8iWEA0M8BiIjBVIMRTmbXy4gBQD8Xkbhs+TYmAAEQaS5G0BBgaG/UQYSJK3YUAB6uIGLJasJ8dAfJaQ5cJRMArQAACZ8kHB" + + "SAvL+gAAAABJRU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACKSURBVDhP" + + "7dHBDUAwFMbxikWM4OhoBKMYwQZGMQJHN0yAmy34XrwmTRVP49h/8kudXltVISrn1auIV7MZElhghAk65lUN+w3arIEKxKXg" + + "GmajW4ijk7iGmEoQ93RtbQBxBbiG2C7Xjnm12yCDt/+0Qn9+yqOhdGJ62RbME9KL/5Le5NPDhELOlDoAyg88S5w3VsoAAAAA" + + "SUVORK5CYII=") + public void setTransformFillRect() throws Exception { + draw("\n", + "context.setTransform(1, .2, .3, 1, 0, 0); context.fillRect(3, 3, 10, 7);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAv0lEQVQ4T+2SvQ3CQAyFv7RI1FCwAz89YgtoYYyUKUBsAQUN" + + "jMEAQCaAErZAlk7iiGzioKPDzRX39Pk92xmJK0vM4+fAFjABTsDjG/eawwvQB64BfA6vq4kGXAG54e4WwZeaRgOOgaMj7gAo" + + "qzprKXegUwOVFGsvcAPMa4CSQhb4VpbDKbB3xO5Wr8ECtoEdMAJ6H8ALYBv/ew5bgMMAlwZxkwMwawrUDMZNihRAcwqeyI7d" + + "vCR/YKNxqeLkM3wCcUQZFXL2p1wAAAAASUVORK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAv0lEQVQ4T+2SvQ3CQAyFv7RI1FCwAz89YgtoYYyUKUBsAQUN" + + "jMEAQCaAErZAlk7iiGzioKPDzRX39Pk92xmJK0vM4+fAFjABTsDjG/eawwvQB64BfA6vq4kGXAG54e4WwZeaRgOOgaMj7gAo" + + "qzprKXegUwOVFGsvcAPMa4CSQhb4VpbDKbB3xO5Wr8ECtoEdMAJ6H8ALYBv/ew5bgMMAlwZxkwMwawrUDMZNihRAcwqeyI7d" + + "vCR/YKNxqeLkM3wCcUQZFXL2p1wAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAZ0lEQVQ4jWNgGAUMDAwO1DbwPgMDw38ovZ6BgaGBUkv6oQZi" + + "w8iWEA0M8BiIjBVIMRTmbXy4gBQD8Xkbhs+TYmAAEQaS5G0BBgaG/UQYSJK3YUAB6uIGLJasJ8dAfJaQ5cJRMArQAACZ8kHB" + + "SAvL+gAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAZ0lEQVQ4jWNgGAUMDAwO1DbwPgMDw38ovZ6BgaGBUkv6oQZi" + + "w8iWEA0M8BiIjBVIMRTmbXy4gBQD8Xkbhs+TYmAAEQaS5G0BBgaG/UQYSJK3YUAB6uIGLJasJ8dAfJaQ5cJRMArQAACZ8kHB" + + "SAvL+gAAAABJRU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACKSURBVDhP" + + "7dHBDUAwFMbxikWM4OhoBKMYwQZGMQJHN0yAmy34XrwmTRVP49h/8kudXltVISrn1auIV7MZElhghAk65lUN+w3arIEKxKXg" + + "GmajW4ijk7iGmEoQ93RtbQBxBbiG2C7Xjnm12yCDt/+0Qn9+yqOhdGJ62RbME9KL/5Le5NPDhELOlDoAyg88S5w3VsoAAAAA" + + "SUVORK5CYII=") + public void transformFillRect() throws Exception { + draw("\n", + "context.transform(1, .2, .3, 1, 0, 0); context.fillRect(3, 3, 10, 7);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAQUlEQVQ4T2NkoDJgpLJ5DKMGUh6iIzgMFRgYGJJICME6XGqR" + + "w7CJBAPnMTAwPMCmfgRHCgnBh1/paBhSHpRUD0MAmf0DFZFZTHcAAAAASUVORK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAQUlEQVQ4T2NkoDJgpLJ5DKMGUh6iIzgMFRgYGJJICME6XGqR" + + "w7CJBAPnMTAwPMCmfgRHCgnBh1/paBhSHpRUD0MAmf0DFZFZTHcAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAIUlEQVQ4jWNgGAWjYJiDBhIw0Qb2E4kFKHD4KBgFQw8AACnP" + + "C6czPZCAAAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAIUlEQVQ4jWNgGAWjYJiDBhIw0Qb2E4kFKHD4KBgFQw8AACnP" + + "C6czPZCAAAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAqSURBVDhP" + + "YxgFo2A4AkYoDQINUJoYgFMtE5SGAX4isQAQj4JRMFIAAwMAXz4BqtdD7oMAAAAASUVORK5CYII=") + public void moveToLineToTransformStroke() throws Exception { + draw("\n", + "context.moveTo(2, 10); context.lineTo(13, 10);" + + "context.transform(1, .2, .3, 1, 0, 0); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAZklEQVQ4T2NkoDJgpLJ5DKMGUh6io2EIDkMWBgaGP+SGJq4w" + + "fMDAwHCbgYHhAhK+Sowl+CJFm4GBwQANI1sAYmNYQmoso1uiysDAoIDsclINxOZrlDCnhoEolowaSExKw6+G6mEIAEtuDRVn" + + "zxh2AAAAAElFTkSuQmCC", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAZklEQVQ4T2NkoDJgpLJ5DKMGUh6io2EIDkMWBgaGP+SGJq4w" + + "fMDAwHCbgYHhAhK+Sowl+CJFm4GBwQANI1sAYmNYQmoso1uiysDAoIDsclINxOZrlDCnhoEolowaSExKw6+G6mEIAEtuDRVn" + + "zxh2AAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAQklEQVQ4jWNgGAWjYIQAAVoY+p6BgWE9AwNDPwMDQwADA4MC" + + "NQx1YGBgSIAaup+BgeE/PSx5Tw1D0QFNwnwUDGYAAER6Cjb+yQ7RAAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAQklEQVQ4jWNgGAWjYIQAAVoY+p6BgWE9AwNDPwMDQwADA4MC" + + "NQx1YGBgSIAaup+BgeE/PSx5Tw1D0QFNwnwUDGYAAER6Cjb+yQ7RAAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABWSURBVDhP" + + "YxgFo2CkAAEoTRZghtLI4AcQvwdiCyjmhIp9AGKCgBFKYwMOQKwAxPpAbADlbwDiB0B8EIgvQNkoAJ+B2AC6JSAsCMRUBRSF" + + "+SgYeoCBAQD2+wpun2ZPIwAAAABJRU5ErkJggg==") + public void transformMoveToLineToStroke() throws Exception { + draw("\n", + "context.transform(1, .2, .3, 1, 0, 0); context.moveTo(2, 10);" + + "context.lineTo(13, 10); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAM0lEQVQ4T2NkoDJgpLJ5DKMGUh6iIzwMGygMQbB+5DCkuoEU" + + "OhCifYTH8mgYkhcCVE82AJYgAhXAytwXAAAAAElFTkSuQmCC", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAM0lEQVQ4T2NkoDJgpLJ5DKMGUh6iIzwMGygMQbB+5DCkuoEU" + + "OhCifYTH8mgYkhcCVE82AJYgAhXAytwXAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGklEQVQ4jWNgGAWjYJiDBgox7Q0cBaNg2AAAkUIQAVuzCpUA" + + "AAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGklEQVQ4jWNgGAWjYJiDBgox7Q0cBaNg2AAAkUIQAVuzCpUA" + + "AAAASUVORK5CYII=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAkSURBVDhP" + + "YxgFo2A4AkYoDQINUJpcANbPBGaOglEwCvABBgYAX1ABBKc2Rr8AAAAASUVORK5CYII=") + public void moveToLineToRotateStroke() throws Exception { + draw("\n", + "context.moveTo(2, 10); context.lineTo(18, 10); context.rotate(90); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAsElEQVQ4T+3SsQkCQRCF4f9ysQYRTC+zCQNLsAkNROMztwnR" + + "GmxCLEEswEwEAxl4Ixucy+5qYHATz/sYHlMBNXDmR1MBe+AGbIDLt66BPWAFLIFG8L0UNtBnAKyBqdBtCRqCnh/r4pHgXQ7c" + + "Bnp+IvipKo4pcAz0/ExV2CdYx6cYnAJ6fq6LD6ri2gbngJbvC10EH/EI4VzQs0PB1qtd/J5S8GONHZjyuvGdrsM/7PAFTW0Z" + + "FZFBvS8AAAAASUVORK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAsElEQVQ4T+3SsQkCQRCF4f9ysQYRTC+zCQNLsAkNROMztwnR" + + "GmxCLEEswEwEAxl4Ixucy+5qYHATz/sYHlMBNXDmR1MBe+AGbIDLt66BPWAFLIFG8L0UNtBnAKyBqdBtCRqCnh/r4pHgXQ7c" + + "Bnp+IvipKo4pcAz0/ExV2CdYx6cYnAJ6fq6LD6ri2gbngJbvC10EH/EI4VzQs0PB1qtd/J5S8GONHZjyuvGdrsM/7PAFTW0Z" + + "FZFBvS8AAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAdklEQVQ4je3MsQ0BAQAF0NdKxAQicRtco1YpjKAxgsIGl4tY" + + "4HISuQk0RlAYQXMjaEwgYomvcm+Axw80OGGWCsc44IMao1Q8xxlP7FIpLHDFA5tkvMYdN6yS8RY9LiiT8R4vtJim0gmOeKNK" + + "pVCgwzKZDgb/4wtTphDgBFZFZQAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAdklEQVQ4je3MsQ0BAQAF0NdKxAQicRtco1YpjKAxgsIGl4tY" + + "4HISuQk0RlAYQXMjaEwgYomvcm+Axw80OGGWCsc44IMao1Q8xxlP7FIpLHDFA5tkvMYdN6yS8RY9LiiT8R4vtJim0gmOeKNK" + + "pVCgwzKZDgb/4wtTphDgBFZFZQAAAABJRU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACESURBVDhP" + + "7cixCYNQFIXhV9hIIK2NhJANUjiChbiBRVZIkQ0UQiYQCeICFq5gkRFSZAULNxDJf91AOOX74btwj6PIjrIODU7bJ+iAJ1ZU" + + "CCHpjDcm3G1QlWDAF4UNqjJ8MCK1QdUNP/S42qDqgRk1YhsUHfHCghIBJF3QIt8+n8+3K+f+D8wRAv4wDRcAAAAASUVORK5C" + + "YII=") + public void rotateMoveToLineToStroke() throws Exception { + draw("\n", + "context.rotate(.5); context.moveTo(1, 1); context.lineTo(18, 1); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAN0lEQVQ4T2NkoDJgpLJ5DMgG/qfQcLBZowZSFIq0D0OKnAfT" + + "TNN0OOpC8kJgNFLICzdkXYM/DAFt+QYVhcRJbAAAAABJRU5ErkJggg==", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAN0lEQVQ4T2NkoDJgpLJ5DMgG/qfQcLBZowZSFIq0D0OKnAfT" + + "TNN0OOpC8kJgNFLICzdkXYM/DAFt+QYVhcRJbAAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAG0lEQVQ4jWNgGErgP4V41MChYOAoGAWjYOgCAGnPX6Ee+YVU" + + "AAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAG0lEQVQ4jWNgGErgP4V41MChYOAoGAWjYOgCAGnPX6Ee+YVU" + + "AAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAnSURBVDhP" + + "Yxj0gBFKg8B/KE0uAJvFBGZSEYwaOApGwSgYBSDAwAAA4YcBDBgCJpwAAAAASUVORK5CYII=") + public void rectFill() throws Exception { + draw("\n", + "context.rect(2, 2, 16, 6); context.fill();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA90lEQVQ4T8XTwSoFcRQH4O8+hPIAkuRulSXqLiyUPMFlYyMW" + + "srUXi5uNEkrd7uJ2ywvYsLCyEEmegKw8AR2N0mTMf24Ts5w635wzv3Maan4aNXv+BNzg80NtPOECA7ymTJPvMLA57GXYDFYw" + + "mb07LEPz4CZucJUrbOIYj9jGcxGcB2/RwktBwQGmMJsK9tHFedloqeAaFrBYFziCayzhbhj0pz2MLiPZ6brAcM7whvWqaNGl" + + "jKKHS+xUQX87vTEc4b5Kp2W3HJ3uYgKrKUGVgV/TRlBbeMBJtgnjWXD7339JKhg1sVLLmEdgp3hHZ1gwKZsqHf4P+AEXuSUV" + + "Nt04AAAAAABJRU5ErkJggg==", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA90lEQVQ4T8XTwSoFcRQH4O8+hPIAkuRulSXqLiyUPMFlYyMW" + + "srUXi5uNEkrd7uJ2ywvYsLCyEEmegKw8AR2N0mTMf24Ts5w635wzv3Maan4aNXv+BNzg80NtPOECA7ymTJPvMLA57GXYDFYw" + + "mb07LEPz4CZucJUrbOIYj9jGcxGcB2/RwktBwQGmMJsK9tHFedloqeAaFrBYFziCayzhbhj0pz2MLiPZ6brAcM7whvWqaNGl" + + "jKKHS+xUQX87vTEc4b5Kp2W3HJ3uYgKrKUGVgV/TRlBbeMBJtgnjWXD7339JKhg1sVLLmEdgp3hHZ1gwKZsqHf4P+AEXuSUV" + + "Nt04AAAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAm0lEQVQ4je3UsRWCMBRG4W8AqZ2JFg+sYOci2OkaqC0DoNbO" + + "wgAWL5VHPSLp9FZpcpP38r/wByU69NijnisbsU7rDQZc0Xwj7JLskQo3tFOFfbrZM4p04HGKcCfKfMdyirDGecqGT7hglVPY" + + "iAcockq3OOQUwknkLxsLEZFO5vJb0dMqp7QR5Q8ip6WYqHGuuBYfRi9a8Wqqfok70oEc6oUScX0AAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAm0lEQVQ4je3UsRWCMBRG4W8AqZ2JFg+sYOci2OkaqC0DoNbO" + + "wgAWL5VHPSLp9FZpcpP38r/wByU69NijnisbsU7rDQZc0Xwj7JLskQo3tFOFfbrZM4p04HGKcCfKfMdyirDGecqGT7hglVPY" + + "iAcockq3OOQUwknkLxsLEZFO5vJb0dMqp7QR5Q8ip6WYqHGuuBYfRi9a8Wqqfok70oEc6oUScX0AAAAASUVORK5CYII=", + IE = "context.ellipse not supported") + public void ellipseStroke() throws Exception { + draw("\n", + "if (!context.ellipse) { log('context.ellipse not supported'); return; }\n" + + "context.ellipse(10, 10, 8, 4, Math.PI / 4, 0, 1.5 * Math.PI); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA50lEQVQ4T82UvQ4BURBGz5QKtVqLxBtorQdQKyU6T6JTqGi9" + + "ALUnIEKr1yqUI3ezkrX3V7IRU8+cO9/MN1eoOaRmHr8BqpIBTeAqwuUbFVaHquyBYQlyAhYibFLAH8Cis52n0Dw0E+EWAleB" + + "Y2AbKHgCmQgHX04V2APOEWl3EVpJQJOkyhHoR6AjkXzWVriWMgHWEeBKhGkSsOjSLMZYxxde2U5jq9KG3H+NANQp23spqgwg" + + "n5MP6pQdPL0I1Ck7esuF/KVnppbsKPA9Q1XM9ucVS1myk4ElcBfoAA+XF78Gxj6I/we+AL7COxV8h8fPAAAAAElFTkSuQmCC", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA50lEQVQ4T82UvQ4BURBGz5QKtVqLxBtorQdQKyU6T6JTqGi9" + + "ALUnIEKr1yqUI3ezkrX3V7IRU8+cO9/MN1eoOaRmHr8BqpIBTeAqwuUbFVaHquyBYQlyAhYibFLAH8Cis52n0Dw0E+EWAleB" + + "Y2AbKHgCmQgHX04V2APOEWl3EVpJQJOkyhHoR6AjkXzWVriWMgHWEeBKhGkSsOjSLMZYxxde2U5jq9KG3H+NANQp23spqgwg" + + "n5MP6pQdPL0I1Ck7esuF/KVnppbsKPA9Q1XM9ucVS1myk4ElcBfoAA+XF78Gxj6I/we+AL7COxV8h8fPAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAi0lEQVQ4je3TTQ2AMAyG4U/CJCBhEpCAJBwgAQlIQAISkICE" + + "l0tJduCnGzsRmvT6pF/TSn9JEqgBtbWwAbSBsJ5B3ZvJUiztqQSMF9jRCyjmgOEBBLTlTrk4UP9OHbEBjblTzrVjB0f0vFOy" + + "E6oX29AIWqvETtBws9OyDzK4O5m2LwYTuDHc/zHfrh1q4TK9oNRCpgAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAi0lEQVQ4je3TTQ2AMAyG4U/CJCBhEpCAJBwgAQlIQAISkICE" + + "l0tJduCnGzsRmvT6pF/TSn9JEqgBtbWwAbSBsJ5B3ZvJUiztqQSMF9jRCyjmgOEBBLTlTrk4UP9OHbEBjblTzrVjB0f0vFOy" + + "E6oX29AIWqvETtBws9OyDzK4O5m2LwYTuDHc/zHfrh1q4TK9oNRCpgAAAABJRU5ErkJggg==", + IE = "context.ellipse not supported") + public void ellipseFill() throws Exception { + draw("\n", + "if (!context.ellipse) { log('context.ellipse not supported'); return; }\n" + + "context.fillStyle = 'yellow';" + + "context.ellipse(10, 10, 8, 4, Math.PI / 4, 0, 1.5 * Math.PI); context.fill();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAwUlEQVQ4T+3UIW4CQRTG8d9WoRCk3ICkjjPUgaguCk1Jg8Sh" + + "UFyAEJI6VDkBkjPgUBygTQWqooJssiRku7PZTUYybjLf+7/5vry8ROSTROa5AwsTbeGnatZlGXYwxQmLGMAP/OGtKizVhX7Y" + + "wwQvdWBlwBkeMI8FfEcXowBwjQOW+feQ5QHGeA4A91jhsyow1e1wxmuuaIsm+kXNysamjQ0aOGbFT/jFEF91gVd9av8xu3wX" + + "2bwF35dD3TH+r4+e4QUSbhYV9wlfkwAAAABJRU5ErkJggg==", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAwUlEQVQ4T+3UIW4CQRTG8d9WoRCk3ICkjjPUgaguCk1Jg8Sh" + + "UFyAEJI6VDkBkjPgUBygTQWqooJssiRku7PZTUYybjLf+7/5vry8ROSTROa5AwsTbeGnatZlGXYwxQmLGMAP/OGtKizVhX7Y" + + "wwQvdWBlwBkeMI8FfEcXowBwjQOW+feQ5QHGeA4A91jhsyow1e1wxmuuaIsm+kXNysamjQ0aOGbFT/jFEF91gVd9av8xu3wX" + + "2bwF35dD3TH+r4+e4QUSbhYV9wlfkwAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAbklEQVQ4je3QsQ2AIBCF4b81LuAmzGNJ6xxuIAWtVs7BOBbU" + + "FpydIUKusLivIrzjJQcYswKLVtkBnMCoUTYBl0bRYwZ2zUIPhEq+ycxnDsiVPMtMkwikl/skWbNBHmbKikHOUbJujvJfno41" + + "zQ/codMRZHZFRf8AAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAbklEQVQ4je3QsQ2AIBCF4b81LuAmzGNJ6xxuIAWtVs7BOBbU" + + "FpydIUKusLivIrzjJQcYswKLVtkBnMCoUTYBl0bRYwZ2zUIPhEq+ycxnDsiVPMtMkwikl/skWbNBHmbKikHOUbJujvJfno41" + + "zQ/codMRZHZFRf8AAAAASUVORK5CYII=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACPSURBVDhP" + + "YxgFIwAwQ2lsgBOI5wGxABBfAAlQChYD8SkIk3JgAsRXIUzSABOURgdOQLwXwiQN4DLwExCzQ5hYwUwgzoYwiQM2QHwPwsQK" + + "QMFhC2ESDzYC8QwIEwVMAeJlECbpYC0Qg1w6FYhBMX4biJcAMSsQYwWMUBofMANiUKzzAPFuID4PxKNg6AAGBgDVbRIf3/D2" + + "vgAAAABJRU5ErkJggg==") + public void arcStroke() throws Exception { + draw("\n", + "context.arc(10, 10, 4, 0, 4.3); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAApElEQVQ4T+3SLQoCURSG4WeCYLLoAmw2k4uwWjS5FifbRVyC" + + "FrfgAgTBJha7ZjEY5F4mCQMzzkzz5HNevp+TIFXjJBmwLmj6B1Zu559h5Qg1m+EMvUzkA9sfBEeFSwzRxiWDDPDCHPcS4Ai8" + + "4oTp1+EOHYzLAm/o5xwdsC5hfxEUHjHKAW5wxqqgymi5dmCdlpspJbzNBC2E/wvTxRt7PAvmF9c+ZTExFH4T/k4AAAAASUVO" + + "RK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAApElEQVQ4T+3SLQoCURSG4WeCYLLoAmw2k4uwWjS5FifbRVyC" + + "FrfgAgTBJha7ZjEY5F4mCQMzzkzz5HNevp+TIFXjJBmwLmj6B1Zu559h5Qg1m+EMvUzkA9sfBEeFSwzRxiWDDPDCHPcS4Ai8" + + "4oTp1+EOHYzLAm/o5xwdsC5hfxEUHjHKAW5wxqqgymi5dmCdlpspJbzNBC2E/wvTxRt7PAvmF9c+ZTExFH4T/k4AAAAASUVO" + + "RK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAf0lEQVQ4je3SsQnDMBAF0NdmIs+ULVRkC7vwJiKtIfY2bty4" + + "0JEqCJSoChYcHOjz4HSCjNSpsmh6nXSBF/j34IB71PAL+MCMHRPG6GfcvgE3LB8ul0CbwaMS2LWNn+BVCUwN2BtcK4FRWVIT" + + "2H3k7kt5Bnoo77lGvylfKjVUPgEr0zlzAxnltAAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAf0lEQVQ4je3SsQnDMBAF0NdmIs+ULVRkC7vwJiKtIfY2bty4" + + "0JEqCJSoChYcHOjz4HSCjNSpsmh6nXSBF/j34IB71PAL+MCMHRPG6GfcvgE3LB8ul0CbwaMS2LWNn+BVCUwN2BtcK4FRWVIT" + + "2H3k7kt5Bnoo77lGvylfKjVUPgEr0zlzAxnltAAAAABJRU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACjSURBVDhP" + + "Y2RgYNgPxAeBmBrAHkQ0gJnUAQ1MUAbVwKiBlINRAykHyAYqAnEyFIPYZAGYgfOA+BgQO0ExiA0SIxmADPQHYl4glgTiaCgG" + + "sUFiZBn6GUpjA8+BmBTvgwuH+xA2VrAPiPHJYwBiYhkUSUQDkIH4vASKIJAriQYgA+8A8WowDxWAxLYDMUlehlUBAkCsAsQw" + + "zSBXgyzaCOYRDRjsAb/2Fyf2EU9MAAAAAElFTkSuQmCC") + public void arcCircleStroke() throws Exception { + draw("\n", + "context.arc(4, 16, 4, 0, 2 * Math.PI); context.stroke(); context.strokeRect(0, 0, 20, 20);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAd0lEQVQ4T+3UsQ3CMBBA0eeShpaGni4VQ2QJWjaKUEZIpmAG" + + "1oABUiK3loOs4CKF3fvp/C1dUPmEyp4GZote0eGAD6Zf3Usa3nHCGRcsuOGdg0vA9N6MI/paYHSeeOSev2XCCI54YUin3Aqu" + + "/ksD/18VreEOG34BnYcKFagjKwUAAAAASUVORK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAd0lEQVQ4T+3UsQ3CMBBA0eeShpaGni4VQ2QJWjaKUEZIpmAG" + + "1oABUiK3loOs4CKF3fvp/C1dUPmEyp4GZote0eGAD6Zf3Usa3nHCGRcsuOGdg0vA9N6MI/paYHSeeOSev2XCCI54YUin3Aqu" + + "/ksD/18VreEOG34BnYcKFagjKwUAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAR0lEQVQ4je3QMQ2AMBRF0bNWBDqwVGbkAAl6KqgzA9RA8xeS" + + "fwTc5D3SLy2o2LBGBHdcONBxo0SEh/ZFQ3VB84fT+2lKacoDTsgIDIbBFacAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAR0lEQVQ4je3QMQ2AMBRF0bNWBDqwVGbkAAl6KqgzA9RA8xeS" + + "fwTc5D3SLy2o2LBGBHdcONBxo0SEh/ZFQ3VB84fT+2lKacoDTsgIDIbBFacAAAAASUVORK5CYII=", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABUSURBVDhP" + + "YxgFgw8wQ2l8QBKI/YHYA4hfAvF7IMYJmKA0PpAAxL5ArAzEJ4B4NRBTFSwH4jkQJvXAQyBWgzBRATFhiA0YQ+lzUHoUjIJR" + + "QAJgYAAAKqEIH3WHwEcAAAAASUVORK5CYII=") + public void arcAnticlockwiseStroke() throws Exception { + draw("\n", + "context.arc(10, 10, 4, 0, 4.3, true); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAmklEQVQ4T+3UoQ0CQRBG4e8cCgU14KgBSQWg0IRcPYSgUVAB" + + "khpw1AAKhSSbHILL7iZcNqhbO5mXff9MplL4VYV5emA00SVGTeWBYy73XIZjHDDArYFM8MIK9xg4BzzjiUWr8YQh5r8Ag+YG" + + "s4TeBbuYfuqHNaZYJ4B7XLFt1/8GLK4cTIoOJQCLr80n72KL3ekQ9demU2xfTW+HmB4VAkhDzQAAAABJRU5ErkJggg==", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAmklEQVQ4T+3UoQ0CQRBG4e8cCgU14KgBSQWg0IRcPYSgUVAB" + + "khpw1AAKhSSbHILL7iZcNqhbO5mXff9MplL4VYV5emA00SVGTeWBYy73XIZjHDDArYFM8MIK9xg4BzzjiUWr8YQh5r8Ag+YG" + + "s4TeBbuYfuqHNaZYJ4B7XLFt1/8GLK4cTIoOJQCLr80n72KL3ekQ9demU2xfTW+HmB4VAkhDzQAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAaUlEQVQ4je2SQQrAIAwE59oX5U2+yRzyHh/kuQfTQ6FSgoFS" + + "cEAIblhcXNj8EgGKH1kxOgADOqBA9dlcC2NAe7hvroUQf82MTjB+YUScob4TMtQXwxDpkSH5U+Bem8qIuVSbi7Ribz7iBHkE" + + "GXFzGcnHAAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAaUlEQVQ4je2SQQrAIAwE59oX5U2+yRzyHh/kuQfTQ6FSgoFS" + + "cEAIblhcXNj8EgGKH1kxOgADOqBA9dlcC2NAe7hvroUQf82MTjB+YUScob4TMtQXwxDpkSH5U+Bem8qIuVSbi7Ribz7iBHkE" + + "GXFzGcnHAAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACJSURBVDhP" + + "YxgFgw8wQml8wByIjSBMhnNAfBLCJB1wAvECIP4GxHOAeDaUDRIDyZEMQBpPQZgoACQGkiMJgLwJcg0uAJIDqcEAzFAaHfgB" + + "8Rsg3gzmYQJFKH0GSsMBE5TGBghF2HQoTRQg28v4AFUjBQSQkw0oyYCSDogNEsOZbOiasEfBgAAGBgDFsxrAzDMHqwAAAABJ" + + "RU5ErkJggg==") + public void arcCircleAnticlockwiseStroke() throws Exception { + draw("\n", + "context.arc(10, 10, 4, 0, 2 * Math.PI, true); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAdklEQVQ4T+2UsQ2AMAwEzxPBVBQwBGEIKJgKJjIKBUIoThEM" + + "VdL73rm8IjgfceZRge+N5h0GepQOoTmjlB1hJbBY0TYwwmA2BgcLagNHtmuzJzVuOtGmwnIbatZoSFfuR+AHV3Z+lCjQtTaF" + + "Ha+fQ6G425i7wwPzuB4VlcqptAAAAABJRU5ErkJggg==", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAdklEQVQ4T+2UsQ2AMAwEzxPBVBQwBGEIKJgKJjIKBUIoThEM" + + "VdL73rm8IjgfceZRge+N5h0GepQOoTmjlB1hJbBY0TYwwmA2BgcLagNHtmuzJzVuOtGmwnIbatZoSFfuR+AHV3Z+lCjQtTaF" + + "Ha+fQ6G425i7wwPzuB4VlcqptAAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAZElEQVQ4jWNgGAUjHTQwCDA0MPQzNDCcZ2hguM/QwDCfoYFB" + + "gRLD3jM0MPxHw+/JMxTiGnTDYHg+OQbex2Pg+0FhID4vryfHQAGcrmtgMCDdQISh86GGvGdoYNhPfrIZBcMHAABnQk69XCBV" + + "ZwAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAZElEQVQ4jWNgGAUjHTQwCDA0MPQzNDCcZ2hguM/QwDCfoYFB" + + "gRLD3jM0MPxHw+/JMxTiGnTDYHg+OQbex2Pg+0FhID4vryfHQAGcrmtgMCDdQISh86GGvGdoYNhPfrIZBcMHAABnQk69XCBV" + + "ZwAAAABJRU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAClSURBVDhP" + + "YxgFIwAwQmnsoJ5BAEgWAFX5A2kQewPDf4ZGIPwAksYGcBsIMoyRYT+QZQARgIMHQEMNcRnKBKWxgQIgRjcMBBSAFvVD2RgA" + + "t4GMDPFQFjYQAKUxAD4X4gM4wxCfgRugNDZwAEpjANwGgmKTgeEChIMCQJECksMKmKE0JjjI8IPBnmElMCw5gDwNIP4BxDuA" + + "hkUCjXsAUjIKRiZgYAAArLcaWxWRPP8AAAAASUVORK5CYII=") + public void arcFillPath() throws Exception { + draw("\n", + "context.fillStyle = 'green'; context.beginPath();" + + "context.arc(10, 10, 4, 0, 2 * Math.PI); context.fill();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABCElEQVQ4T83US0oDQRSF4a/FhSi6DgXRbQgq6C5MKe7BVjSI" + + "I2cuQMHHxAU4UiHZgyNBMWJXh7RtJ+k0QbxQUINTP6du3VOJKVcyZZ7hwH3LPq1jCXOYRRe3OBPcV5mpBgYn2Brj/liwU9b8" + + "BgZXWK3ZimvBWlH7ExgcYbsmrC9rC4PbDIAh69XdhLAoT6xouYnbfgVtbDQCxkfKzhaBHcw3BHYEC2VgryEsHgvRXNHhez5r" + + "k3IvzEjtxv4XgS9YrEl7Q+pD6sBT9dgEp9gcCUx09aTZ2vM6Oikxat+xqqqHzFFwPu4G5cEuR+5S4lArS0+tGha957zRj7Uo" + + "BdEffl+TWsv1/9/hF6I7OBXnPPH0AAAAAElFTkSuQmCC", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABCElEQVQ4T83US0oDQRSF4a/FhSi6DgXRbQgq6C5MKe7BVjSI" + + "I2cuQMHHxAU4UiHZgyNBMWJXh7RtJ+k0QbxQUINTP6du3VOJKVcyZZ7hwH3LPq1jCXOYRRe3OBPcV5mpBgYn2Brj/liwU9b8" + + "BgZXWK3ZimvBWlH7ExgcYbsmrC9rC4PbDIAh69XdhLAoT6xouYnbfgVtbDQCxkfKzhaBHcw3BHYEC2VgryEsHgvRXNHhez5r" + + "k3IvzEjtxv4XgS9YrEl7Q+pD6sBT9dgEp9gcCUx09aTZ2vM6Oikxat+xqqqHzFFwPu4G5cEuR+5S4lArS0+tGha957zRj7Uo" + + "BdEffl+TWsv1/9/hF6I7OBXnPPH0AAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAmUlEQVQ4je3TawnDMBSG4VdCJFRCJVRKJUTC52ASKqESIqUS" + + "ImH9kQ46dtJcGINBD5x/4eHcAv8bYkB4REBExIZYEQ+Ea8X8gTwv0tdADrEUoHOuNZXVYq+cr6ortZnLwQLViWXmmTbYCxqz" + + "TGfRC8ZvggExWmBoqiidlwG1LSUe74ytfoKu0Jan48vNBjS1Q+/okh/0Hb+IHUTl6U4n5uMBAAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAmUlEQVQ4je3TawnDMBSG4VdCJFRCJVRKJUTC52ASKqESIqUS" + + "ImH9kQ46dtJcGINBD5x/4eHcAv8bYkB4REBExIZYEQ+Ea8X8gTwv0tdADrEUoHOuNZXVYq+cr6ortZnLwQLViWXmmTbYCxqz" + + "TGfRC8ZvggExWmBoqiidlwG1LSUe74ytfoKu0Jan48vNBjS1Q+/okh/0Hb+IHUTl6U4n5uMBAAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAECSURBVDhP" + + "7ZPtEYIwDIaDLsAIuIFOoE4gI+gE4gTABI4gG3hOoG7ACG4gG+CbNkC1BZQ77/zhwzUfUN42JdDP44m3iWkKG2LGCj7AKDBu" + + "GDmVlOLi3MIWjMmHXeNJDM+xGy2aSFZjCyZ0hA110ssF85cSK8biNTFFWCKS7B0CmuONK4SFZod8Zh6dEbWX2UZJE5TP50sj" + + "dUOzwPhcjPFoK5EhqL/mULgjFOYOuTWG4hQcygVnWH9pU9DZqC3w3AxCM9U2KZpdaARLOknURaEaWgttTKEKs218ZHfJXuGy" + + "eMEMIp2VPP8pCe1hzcZmoRQ+7xOqcP16B9gAQjtXSX++DdEDir42LCGgXtoAAAAASUVORK5CYII=") + public void arcFillPathAngle() throws Exception { + draw("\n", + "context.fillStyle = 'green'; context.beginPath();" + + "context.arc(10, 10, 8, 2.3, 2 * Math.PI); context.fill();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAt0lEQVQ4T8WTsQ0CMQxF381CcTuwAAvQUt0EMAhMQEV7C7AA" + + "O1CwC7J0h6IQ+7uIIFWk2O9/Jz8DndfQmcdPgDfglXS+AQ5lbe1wD1yAaxI4AUdgXutbIz+Ac1nkwE38BGwjh3bWLGxAm8Le" + + "oyiXrqgHVC5dwSg2XlMoFgG9xvA6VLDrZnUV8qfUAPVYEmhpWSG2/8pdHSc1cplL28vAZ4AGei5ORvUls8DdArr3AirO5zzr" + + "8H/AN8CgIxU+kSAmAAAAAElFTkSuQmCC", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAt0lEQVQ4T8WTsQ0CMQxF381CcTuwAAvQUt0EMAhMQEV7C7AA" + + "O1CwC7J0h6IQ+7uIIFWk2O9/Jz8DndfQmcdPgDfglXS+AQ5lbe1wD1yAaxI4AUdgXutbIz+Ac1nkwE38BGwjh3bWLGxAm8Le" + + "oyiXrqgHVC5dwSg2XlMoFgG9xvA6VLDrZnUV8qfUAPVYEmhpWSG2/8pdHSc1cplL28vAZ4AGei5ORvUls8DdArr3AirO5zzr" + + "8H/AN8CgIxU+kSAmAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAXklEQVQ4je2PsREAIAgDM6QDOZ07WLuIDTR6aEA7/Tu6JL7A" + + "8+TgmSQAzTHUpLOkMCHJFCJHB9mHqTBtxxZcdruS225XDNlZ5bCdNXBkN44c2yk6dMVOqXLX0C9/ZjqpYSbR+dDHYAAAAABJ" + + "RU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAXklEQVQ4je2PsREAIAgDM6QDOZ07WLuIDTR6aEA7/Tu6JL7A" + + "8+TgmSQAzTHUpLOkMCHJFCJHB9mHqTBtxxZcdruS225XDNlZ5bCdNXBkN44c2yk6dMVOqXLX0C9/ZjqpYSbR+dDHYAAAAABJ" + + "RU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACASURBVDhP" + + "7c7BCYAwDAXQqiu6gYs4mUcnEMENHMOkzVcotElbb/ogpEISv/ueTjrM0kvde7102Kim8DThWd7JWqnG8MziGZ5VWQetP/a0" + + "YXM60BaK0kFqqTgdpBar0kG8XJ0O4gNN6QBHmtMBDr2SDg4p1SBdc1ItVLv/+j2cuwDuXB2rdVDEoAAAAABJRU5ErkJggg==") + public void closePath() throws Exception { + draw("\n", + "context.moveTo(4,4); context.lineTo(10,16);" + + "context.lineTo(16,4); context.closePath(); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAKElEQVQ4T2NkoDJgpLJ5DKMGUh6io2E4GoZkhMBosiEj0NC0" + + "jMAwBABIxgAVO+SUsAAAAABJRU5ErkJggg==", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAKElEQVQ4T2NkoDJgpLJ5DKMGUh6io2E4GoZkhMBosiEj0NC0" + + "jMAwBABIxgAVO+SUsAAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAFUlEQVQ4jWNgGAWjYBSMglEwCqgDAAZUAAHyXCJfAAAAAElF" + + "TkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAFUlEQVQ4jWNgGAWjYBSMglEwCqgDAAZUAAHyXCJfAAAAAElF" + + "TkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAWSURBVDhP" + + "YxgFo2AUjIJRMAqoAhgYAAZUAAE6HI5PAAAAAElFTkSuQmCC") + public void closePathNoSubpath() throws Exception { + draw("\n", + "context.closePath();context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAKElEQVQ4T2NkoDJgpLJ5DKMGUh6io2E4GoZkhMBosiEj0NC0" + + "jMAwBABIxgAVO+SUsAAAAABJRU5ErkJggg==", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAKElEQVQ4T2NkoDJgpLJ5DKMGUh6io2E4GoZkhMBosiEj0NC0" + + "jMAwBABIxgAVO+SUsAAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAFUlEQVQ4jWNgGAWjYBSMglEwCqgDAAZUAAHyXCJfAAAAAElF" + + "TkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAFUlEQVQ4jWNgGAWjYBSMglEwCqgDAAZUAAHyXCJfAAAAAElF" + + "TkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAWSURBVDhP" + + "YxgFo2AUjIJRMAqoAhgYAAZUAAE6HI5PAAAAAElFTkSuQmCC") + public void closePathPointOnly() throws Exception { + draw("\n", + "context.moveTo(4,4); context.closePath(); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAKElEQVQ4T2NkoDJgpLJ5DKMGUh6io2E4GoZkhMBosiEj0NC0" + + "jMAwBABIxgAVO+SUsAAAAABJRU5ErkJggg==", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAKElEQVQ4T2NkoDJgpLJ5DKMGUh6io2E4GoZkhMBosiEj0NC0" + + "jMAwBABIxgAVO+SUsAAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAFUlEQVQ4jWNgGAWjYBSMglEwCqgDAAZUAAHyXCJfAAAAAElF" + + "TkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAFUlEQVQ4jWNgGAWjYBSMglEwCqgDAAZUAAHyXCJfAAAAAElF" + + "TkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAWSURBVDhP" + + "YxgFo2AUjIJRMAqoAhgYAAZUAAE6HI5PAAAAAElFTkSuQmCC") + public void closePathTwice() throws Exception { + draw("\n", + "context.closePath(); context.closePath(); context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAArklEQVQ4T+2TsRGCQBBFH7UY0AMN2ICpERVIIVIBkSkN2IA9" + + "GNiLs86tsywHh7OGXMTsn/9u+Xwq/nwqwzsCd8e3sxvwcvoBONuZAk9ABzTO8ACuadYDg9Nb4AKMOrcbqllFf0lJ/zAt8FeA" + + "v2AGlIF9xVIEOX2yoQB1S3mW7L7ZpIxK+gwovmcy1wuNWtVthuqXqsjxFdqk54Chqu/AUHzZYoeJ+0cJR5j9l0PUN96cIRWF" + + "sMoDAAAAAElFTkSuQmCC", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAArklEQVQ4T+2TsRGCQBBFH7UY0AMN2ICpERVIIVIBkSkN2IA9" + + "GNiLs86tsywHh7OGXMTsn/9u+Xwq/nwqwzsCd8e3sxvwcvoBONuZAk9ABzTO8ACuadYDg9Nb4AKMOrcbqllFf0lJ/zAt8FeA" + + "v2AGlIF9xVIEOX2yoQB1S3mW7L7ZpIxK+gwovmcy1wuNWtVthuqXqsjxFdqk54Chqu/AUHzZYoeJ+0cJR5j9l0PUN96cIRWF" + + "sMoDAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAWElEQVQ4jWNgGCDQQABjAD4GBoZjWMSPQeVCGBgYHmMx6DFU" + + "Dis4hiYZgmYJIXkMQKoB6PJ4XYnLdkLyOF2Jy3ZC8ljBTSgmVx6rK/DZTkh+FIyCUUB/AADnCiBrRndbagAAAABJRU5ErkJg" + + "gg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAWElEQVQ4jWNgGCDQQABjAD4GBoZjWMSPQeVCGBgYHmMx6DFU" + + "Dis4hiYZgmYJIXkMQKoB6PJ4XYnLdkLyOF2Jy3ZC8ljBTSgmVx6rK/DZTkh+FIyCUUB/AADnCiBrRndbagAAAABJRU5ErkJg" + + "gg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAB2SURBVDhP" + + "Y6A2YITShEADlMYF4PJMUJoPiI9BmCgAJAaSuwLEySABNAASA8lhBSDNIRAmGIDYyJYQkscApBqALo8VwBSha4YBQvIYAKYQ" + + "phEdEJLHCm5CMS6AV54ZSiODF0C8D4ivgXmYgJD8KBgFo4DegIEBAO+EHxk/jOycAAAAAElFTkSuQmCC") + public void closePathClosesOnlyLastSubpath() throws Exception { + draw("\n", + "context.moveTo(2,2); context.lineTo(5,8); context.lineTo(8,2);" + + "context.moveTo(10,2); context.lineTo(13,8); context.lineTo(16,2); context.closePath();" + + "context.stroke();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAZklEQVQ4T2Nk2Mf8nwEZOP1lROET4qDpZ6S6gfsYUF3oxECa" + + "C9H1M1LdQHgQURqWUIMQEUBtAyn1OsyncBdS3UBCyY1YedISMRGmjhpIRCARUDISwhCjPKQ02KhtIEZ5SLED0QpoADR/JhX5" + + "NimNAAAAAElFTkSuQmCC", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAZklEQVQ4T2Nk2Mf8nwEZOP1lROET4qDpZ6S6gfsYUF3oxECa" + + "C9H1M1LdQHgQURqWUIMQEUBtAyn1OsyncBdS3UBCyY1YedISMRGmjhpIRCARUDISwhCjPKQ02KhtIEZ5SLED0QpoADR/JhX5" + + "NimNAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAN0lEQVQ4jWNg2Mf8HwWTCjD0U9vAfQzM/5Exyeah66e6gTid" + + "TjGgtoGUep32Bo6CUTCkwWgZAADAuXABXILcxAAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAN0lEQVQ4jWNg2Mf8HwWTCjD0U9vAfQzM/5Exyeah66e6gTid" + + "TjGgtoGUep32Bo6CUTCkwWgZAADAuXABXILcxAAAAABJRU5ErkJggg==", + IE = "no ctor") + public void putImageDataInside() throws Exception { + draw("\n", + "if (typeof ImageData != 'function') { log('no ctor'); return; }\n" + + " var arr = new Uint8ClampedArray(64);\n" + + " for (var i = 0; i < 32; i += 4) {\n" + + " arr[i + 0] = 0; arr[i + 1] = 190; arr[i + 2] = 3; arr[i + 3] = 255;\n" + + " }\n" + + " for (var i = 32; i < 64; i += 4) {\n" + + " arr[i + 0] = 190; arr[i + 1] = 0; arr[i + 2] = 3; arr[i + 3] = 255;\n" + + " }\n" + + + " var imageData = new ImageData(arr, 4, 4);\n" + + " context.putImageData(imageData, 0, 0);\n" + + " context.putImageData(imageData, 2, 4);\n" + + " context.putImageData(imageData, 16, 0);\n" + + " context.putImageData(imageData, 16, 16);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAa0lEQVQ4T2Nk2Mf8n4GBgWGfE4hEACeGv4yoIsTxGKlu4D4G" + + "iAvJdRG6uxmpbiDcBmhYwvlO5IYhzARqGwjzOsx8csMUnjSobiBxqYywKrISLz5jRw0kHOiEVIyGIaEQIixPvTCEFi5UNxAA" + + "QAsdlUr5XXwAAAAASUVORK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAa0lEQVQ4T2Nk2Mf8n4GBgWGfE4hEACeGv4yoIsTxGKlu4D4G" + + "iAvJdRG6uxmpbiDcBmhYwvlO5IYhzARqGwjzOsx8csMUnjSobiBxqYywKrISLz5jRw0kHOiEVIyGIaEQIixPvTCEFi5UNxAA" + + "QAsdlUr5XXwAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAOklEQVQ4jWNg2Mf8n2Ef8/99DKiYgWxAbQMpdxGtDUSYDPE6" + + "HA86A6kXy7QycBSMglFAF0C1UgrNQAAO0T8Blr60fgAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAOklEQVQ4jWNg2Mf8n2Ef8/99DKiYgWxAbQMpdxGtDUSYDPE6" + + "HA86A6kXy7QycBSMglFAF0C1UgrNQAAO0T8Blr60fgAAAABJRU5ErkJggg==", + IE = "no ctor") + public void putImageDataOutside() throws Exception { + draw("\n", + "if (typeof ImageData != 'function') { log('no ctor'); return; }\n" + + " var arr = new Uint8ClampedArray(64);\n" + + " for (var i = 0; i < 32; i += 4) {\n" + + " arr[i + 0] = 0; arr[i + 1] = 190; arr[i + 2] = 3; arr[i + 3] = 255;\n" + + " }\n" + + " for (var i = 32; i < 64; i += 4) {\n" + + " arr[i + 0] = 190; arr[i + 1] = 0; arr[i + 2] = 3; arr[i + 3] = 255;\n" + + " }\n" + + + " var imageData = new ImageData(arr, 4, 4);\n" + + " context.putImageData(imageData, -2, 0);\n" + + " context.putImageData(imageData, 2, -2);\n" + + " context.putImageData(imageData, 2, 4);\n" + + " context.putImageData(imageData, 18, 18);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAXUlEQVQ4T+2SyQkAIAwEE+zMwtOZKNGPEGE99qnfwDAOq0J+" + + "SuVZqh1okmqW8gx3zjNk/iEd6HCq4RLo2n64bRoM6cAwIxvGkvdWgBvSgYfLx4YfiAr8hqgQvtMbNp+UFFXneC64AAAAAElF" + + "TkSuQmCC", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAXUlEQVQ4T+2SyQkAIAwEE+zMwtOZKNGPEGE99qnfwDAOq0J+" + + "SuVZqh1okmqW8gx3zjNk/iEd6HCq4RLo2n64bRoM6cAwIxvGkvdWgBvSgYfLx4YfiAr8hqgQvtMbNp+UFFXneC64AAAAAElF" + + "TkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAOElEQVQ4jWNgGNRgH/N/CM0AZVBqHpXMoZ2B9AH7GJj/U9Xp" + + "VDcQ0wbm//DkMDgNHAWjYBQwMAAACd4VASBR1nMAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAOElEQVQ4jWNgGNRgH/N/CM0AZVBqHpXMoZ2B9AH7GJj/U9Xp" + + "VDcQ0wbm//DkMDgNHAWjYBQwMAAACd4VASBR1nMAAAAASUVORK5CYII=", + IE = "no ctor") + public void putImageDataDirty() throws Exception { + draw("\n", + "if (typeof ImageData != 'function') { log('no ctor'); return; }\n" + + " var arr = new Uint8ClampedArray(64);\n" + + " for (var i = 0; i < 32; i += 4) {\n" + + " arr[i + 0] = 0; arr[i + 1] = 190; arr[i + 2] = 3; arr[i + 3] = 255;\n" + + " }\n" + + " for (var i = 32; i < 64; i += 4) {\n" + + " arr[i + 0] = 190; arr[i + 1] = 0; arr[i + 2] = 3; arr[i + 3] = 255;\n" + + " }\n" + + + " var imageData = new ImageData(arr, 4, 4);\n" + + " context.putImageData(imageData, 0, 0, 1, 2, 1, 1);\n" + + " context.putImageData(imageData, 4, 4, 0, 2, 2, 2);\n" + + " context.putImageData(imageData, 8, 8, 0, 0, 2, 2);\n" + + " context.putImageData(imageData, 18, 0, 1, 1, 2, 3);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABfElEQVQ4T63Uv0uXURTH8ZdIk39AppMQNUXQGLZIGILQIgRF" + + "BC7+aFKcxEEcGnVoMCGKkGhpDLKmQNRNEMQQmiQQFwmVICOUA8+Vy9Pz1af0jvfe8z6/Puc0ueDTlPHu4VOJH3eX8KGu3wTs" + + "wyhulwy/oh238K0ONI9wGdN4j5sYRC8C2oFwunYWNAeGwRS+4waa8QUbeIQ2LGEGHxuBc+AkxjGLxYoSxN0WujCH+P/XScB4" + + "7C5gQ8WvlH4yuooVDGMEn6ugAezBK1zDPjYLwvWKAKKmr3EXC+gvpx/A8PQGbwtASCVOWUKJP4b7eIEnRWYnvgO4jStZNEdn" + + "dTJ7/1lI7aT7AZzH4/8EHuIpXib7AEZD8o79S4TBeYeHFwX8jWd5QOdNeQcT5ZTP05QDdOYjWSWbujWMDq/iTq6KKmHXBcYQ" + + "PKgSdjhIoxei3quhw108bzR6yT6gA2g9BRhp/inW3KnLITFirmPjxEKNlC7jF36gBevFimu4vo4BevlWFYnpLtIAAAAASUVO" + + "RK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABfElEQVQ4T63Uv0uXURTH8ZdIk39AppMQNUXQGLZIGILQIgRF" + + "BC7+aFKcxEEcGnVoMCGKkGhpDLKmQNRNEMQQmiQQFwmVICOUA8+Vy9Pz1af0jvfe8z6/Puc0ueDTlPHu4VOJH3eX8KGu3wTs" + + "wyhulwy/oh238K0ONI9wGdN4j5sYRC8C2oFwunYWNAeGwRS+4waa8QUbeIQ2LGEGHxuBc+AkxjGLxYoSxN0WujCH+P/XScB4" + + "7C5gQ8WvlH4yuooVDGMEn6ugAezBK1zDPjYLwvWKAKKmr3EXC+gvpx/A8PQGbwtASCVOWUKJP4b7eIEnRWYnvgO4jStZNEdn" + + "dTJ7/1lI7aT7AZzH4/8EHuIpXib7AEZD8o79S4TBeYeHFwX8jWd5QOdNeQcT5ZTP05QDdOYjWSWbujWMDq/iTq6KKmHXBcYQ" + + "PKgSdjhIoxei3quhw108bzR6yT6gA2g9BRhp/inW3KnLITFirmPjxEKNlC7jF36gBevFimu4vo4BevlWFYnpLtIAAAAASUVO" + + "RK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABCElEQVQ4jb3UP07DUAzH8c+AGLlCl54B1Dt0LBI7EwNbB8TA" + + "RXoBlhwAqROIbqBuiIETwFKCVP6pZcCRovS1JG3FT/Jgx/7mOX4O/6weuusU7mGUiD/gFe11oKM4EezgDE/IMI5YI/VwF4AZ" + + "3jDEAC+Yx7NWXeAxvnGJI4uf4BZXmETun7Ac5wEqt1+ojWf0I3cptBVv7YT/GJZSN6CHUZNsP8NFye8lTldWHzdRk6USZtgt" + + "+fOGtjD9+4rfBDbFQRU42AA4k9ikTYCfONlmyzn2q8CtD6V6bZoM5LoKY/Fi1wW+W7HXxep1asK+cLoMVoZOarQ5rQMr1PL7" + + "yyom+BGWR2y4qk34AQ9nqmQoAfOBAAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABCElEQVQ4jb3UP07DUAzH8c+AGLlCl54B1Dt0LBI7EwNbB8TA" + + "RXoBlhwAqROIbqBuiIETwFKCVP6pZcCRovS1JG3FT/Jgx/7mOX4O/6weuusU7mGUiD/gFe11oKM4EezgDE/IMI5YI/VwF4AZ" + + "3jDEAC+Yx7NWXeAxvnGJI4uf4BZXmETun7Ac5wEqt1+ojWf0I3cptBVv7YT/GJZSN6CHUZNsP8NFye8lTldWHzdRk6USZtgt" + + "+fOGtjD9+4rfBDbFQRU42AA4k9ikTYCfONlmyzn2q8CtD6V6bZoM5LoKY/Fi1wW+W7HXxep1asK+cLoMVoZOarQ5rQMr1PL7" + + "yyom+BGWR2y4qk34AQ9nqmQoAfOBAAAAAElFTkSuQmCC", + IE = "no ctor") + public void clip() throws Exception { + draw("\n", + "if (typeof ImageData != 'function') { log('no ctor'); return; }\n" + + "context.moveTo(2,2); context.lineTo(5,8); context.lineTo(8,2);" + + "context.arc(8, 12, 8, 0, 2 * Math.PI); context.stroke();" + + "context.clip(); context.fillRect(4, 9, 19, 14);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAArUlEQVQ4T2NkoDJgpLJ5DDgN/C8yyZ7hP1Mc49ucZFIsxWPg" + + "5P8ggxjf5JLki1EDEcH/X2TYhyHMizBPw5ILujiuNAlTD082/0Um32VgYFAi08B7jG9ylcHpFmbAf+EpcxkY/yeRZeB/xnmw" + + "HIXkwkn2DAyMB8gykOG/A+ObvIMoLgRx/otMnsXAwJCKnOWICMPZjG9y0+AOwRXIQyEdUrn4IqUMRFZLUllHjCUA7nRdFSxw" + + "V1kAAAAASUVORK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAArUlEQVQ4T2NkoDJgpLJ5DDgN/C8yyZ7hP1Mc49ucZFIsxWPg" + + "5P8ggxjf5JLki1EDEcH/X2TYhyHMizBPw5ILujiuNAlTD082/0Um32VgYFAi08B7jG9ylcHpFmbAf+EpcxkY/yeRZeB/xnmw" + + "HIXkwkn2DAyMB8gykOG/A+ObvIMoLgRx/otMnsXAwJCKnOWICMPZjG9y0+AOwRXIQyEdUrn4IqUMRFZLUllHjCUA7nRdFSxw" + + "V1kAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAbklEQVQ4jWNgGLLgv+hUg/8ikwqoZ6DI5Pf/RSb/p6aB/0cN" + + "HG4G/heech9mCLJByGJ48HtsBs6nwMD9WLw4sYF8A6f0Yxoo0K9ApoHv/4tMdsAejiKTCkg3cGID4RhiGIzJBsNA0akGRHtn" + + "SAEAyuPmw0SBrRQAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAbklEQVQ4jWNgGLLgv+hUg/8ikwqoZ6DI5Pf/RSb/p6aB/0cN" + + "HG4G/heech9mCLJByGJ48HtsBs6nwMD9WLw4sYF8A6f0Yxoo0K9ApoHv/4tMdsAejiKTCkg3cGID4RhiGIzJBsNA0akGRHtn" + + "SAEAyuPmw0SBrRQAAAAASUVORK5CYII=", + IE = "no ctor") + public void clipWindingEvenOdd() throws Exception { + draw("\n", + "if (typeof ImageData != 'function') { log('no ctor'); return; }\n" + + "context.rect(6, 2, 2, 16); context.rect(2, 10, 16, 5); context.clip('evenodd');" + + "context.beginPath(); context.arc(10, 10, 8, 0, 2 * Math.PI);" + + "context.fillStyle = 'deeppink';context.fill();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA7UlEQVQ4T+3Ur0pEQRTH8c/ULYIIg" + + "iAbFsEmGIXFJvoOBv+wBsEgGmQtIth8htXiKxiFfQKDyWQwb9VguDK7szhcYb1cjPeUA8OZ7/zmd8" + + "5MwBU2TWKYcu0U0s4IjTHNDbC6A5mHe8vcjbCFNewSHnJUMWneBbbT+mFgkNeUgV84RQs3uCTEQ8a" + + "RgEfooY0TnAc+pjVl4NOPqiKCHwmvJWAnqipYiDBczwJWUfgnMA32zhzHn6x3WFpkf8D9e+5Pj/Yq" + + "82c8r9C6ZeOA4YgoZBzxyhmw+0b/pXpPf1fO8LAetnl6zW9TY3L+fWy+AejsRJW3OyxAAAAAAElFT" + + "kSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAlklEQVQ4je2SsQnDMBBF30yezCOI1NlAC3gEdW5cuXYX0miB" + + "4Am+GyWWDwXFxKSJDz7ow7/H3SEAB/RJ7gCBNUfUfwJ9AHUgJbU2JGgFg9bQtQaMWbveAdO7EUSbKUz4ah9ATQHYZb4K/GTC" + + "KtABPVxucI/reXzAfFoPYYTp6R8w24wBjlMhsFeblbMbflcb+gk8gT8GLkqKbVBaXVuaAAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAjklEQVQ4je2TwQmFMBBEX4+2YAE2EEgBFpJU4SWnnFOBjcy/" + + "iOYvQgSDF12Yw4TZx7JkATywbPIdBNb0qHcCXQQFkDYlGxIMgqQjtLaAqtoDaDoBrpVPgqEx4R6fQPMJMFQ+tIBXJmwCPbDA" + + "WCCXYz25YD6tg5hhf89QHESTs8Bul2J3eK/+6B/wAz4M/AGbI3F9tohoTwAAAABJRU5ErkJggg==", + IE = "no ctor") + @HtmlUnitNYI(FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAcElEQVR42mNgYGD4T2UMBygcaoCRaeB/EJ4NxO+AOBCPopVA" + + "/AWIA4gxEKjovw8QX8ajyAeIg4D4FzEGsgExOxB/waOIGcYmxkAPIPYG4nO4FGFj4zNwGRC/BGJ3cg1ESuX/qZ1T/v8fzSmj" + + "Bg4HAwGGsHedCdecqgAAAABJRU5ErkJggg==", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAcElEQVR42mNgYGD4T2UMBygcaoCRaeB/EJ4NxO+AOBCPopVA" + + "/AWIA4gxEKjovw8QX8ajyAeIg4D4FzEGsgExOxB/waOIGcYmxkAPIPYG4nO4FGFj4zNwGRC/BGJ3cg1ESuX/qZ1T/v8fzSmj" + + "Bg4HAwGGsHedCdecqgAAAABJRU5ErkJggg==") + public void fillTextAndTransform() throws Exception { + draw("\n", + "if (typeof ImageData != 'function') { log('no ctor'); return; }\n" + + "context.moveTo(0, 0);\n" + + " context.lineTo(20, 0);\n" + + " context.moveTo(2, 0);\n" + + " context.lineTo(2, 20);\n" + + " context.moveTo(0, 10);\n" + + " context.lineTo(20, 10);\n" + + " context.stroke();\n" + + + " context.fillStyle = 'blue';\n" + + " context.fillText('p', 2, 10);\n" + + + " context.fillStyle = 'red';\n" + + " context.setTransform(1.0, 0.0, -0.0, 1.0, 11.0, 10.0);\n" + + " context.fillText('n', 0, 0);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAkElEQVQ4T63UWw6AIAxE0WFzumZdnSkJBKSPoaE/hhAv56sF" + + "h6cc7mEMPgCu5AMvgFv+HYMSk2hmJCbRKSjnjLLrtGBG2XVacFc56azgjnLSWUFWuei8IKNcdF4wUqq6KOgpVV0UtJSmjglq" + + "SlPHBP9KV8cGR6WrY4NNKd+6Ubxh92Fba3WjnAhGnX7PCungBz2THhX/dvFdAAAAAElFTkSuQmCC", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAkElEQVQ4T63UWw6AIAxE0WFzumZdnSkJBKSPoaE/hhAv56sF" + + "h6cc7mEMPgCu5AMvgFv+HYMSk2hmJCbRKSjnjLLrtGBG2XVacFc56azgjnLSWUFWuei8IKNcdF4wUqq6KOgpVV0UtJSmjglq" + + "SlPHBP9KV8cGR6WrY4NNKd+6Ubxh92Fba3WjnAhGnX7PCungBz2THhX/dvFdAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAZElEQVQ4jdXOwQkAIQxE0SnJEuzcEizJPUjAg2aTSUD8MNfh" + + "AS/VAQxybXdYAoc1U7nVRZRHHaNUdYzyV+dRmnQepVlnUbp0FqVbpykpnaakddKqDOmkVVkzDoGpTNFJBYm6u30fnn+BCcsO" + + "DQAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAZElEQVQ4jdXOwQkAIQxE0SnJEuzcEizJPUjAg2aTSUD8MNfh" + + "AS/VAQxybXdYAoc1U7nVRZRHHaNUdYzyV+dRmnQepVlnUbp0FqVbpykpnaakddKqDOmkVVkzDoGpTNFJBYm6u30fnn+BCcsO" + + "DQAAAABJRU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABvSURBVDhP" + + "1c5BCoAwDETRHMkjeHOP4JE0XXwoGNMkLYgfZjeLJ7/q1F3FHbpHm846R7brzCpKU0cV5auOMkpXRxnlUEcRZUhHEWVYR54y" + + "pSNPmdaRpSzpyFKWddQrp3TUK6d11JRLdNSUy3RfJnIDH55/ge/XbBAAAAAASUVORK5CYII=") + public void pathFill() throws Exception { + draw("\n", + "context.moveTo(2, 2);\n" + + " context.lineTo(10, 18);\n" + + " context.lineTo(18, 2);\n" + + " context.closePath();\n" + + " context.fill();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABCklEQVQ4T7XUvytHURjH8df3P7FIJotQhJQyyCopUSxWShSD" + + "UvIPGBiIJJtBWUwMyh+hKMI/oVPfW8ft/ji3rrOcep5P7+c8v05Hy6fTMk8MfMZwYoALLBVpY+Au9hOAXxjCWx1wEC8JwHUc" + + "l+nyNXzEWAX0DrNVQfPALRwmvDIvOcdyMOaBoSmhOU1OqOUkXouAwfaAqQbENZxm+qI53MFBIvAKi7G2CDiKpwTgB0bwXgeM" + + "077HTAn8T6pVKQffHjYwgSNM56A3mK8b7Ng/jj6cYLV7Z/4fDOCzCTDW9mQj0TWu4Cx1U8p0t5jDNRaabEqZdhPb6Md3G8Cw" + + "Qb24rBunf/1g64In+X8BpH0mFSP8dhoAAAAASUVORK5CYII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABCklEQVQ4T7XUvytHURjH8df3P7FIJotQhJQyyCopUSxWShSD" + + "UvIPGBiIJJtBWUwMyh+hKMI/oVPfW8ft/ji3rrOcep5P7+c8v05Hy6fTMk8MfMZwYoALLBVpY+Au9hOAXxjCWx1wEC8JwHUc" + + "l+nyNXzEWAX0DrNVQfPALRwmvDIvOcdyMOaBoSmhOU1OqOUkXouAwfaAqQbENZxm+qI53MFBIvAKi7G2CDiKpwTgB0bwXgeM" + + "077HTAn8T6pVKQffHjYwgSNM56A3mK8b7Ng/jj6cYLV7Z/4fDOCzCTDW9mQj0TWu4Cx1U8p0t5jDNRaabEqZdhPb6Md3G8Cw" + + "Qb24rBunf/1g64In+X8BpH0mFSP8dhoAAAAASUVORK5CYII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAeUlEQVQ4jdWSwQ2AMAwDPUJGZZOOwgiMwgiMAK+KCBE4Iz61" + + "1K+bu0QaKaukHb6ZFDZYtkkKUhiwcCJlPW/YCDWHYuOPKLbl1Nk2cupgI6cUG5+PdGIvD4XW+bQ0wZ1T+3wiTXB1aqFW5Z9R" + + "q3RsG7VKdvpLstPBcwARMoH8labnlgAAAABJRU5ErkJggg==", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAeUlEQVQ4jdWSwQ2AMAwDPUJGZZOOwgiMwgiMAK+KCBE4Iz61" + + "1K+bu0QaKaukHb6ZFDZYtkkKUhiwcCJlPW/YCDWHYuOPKLbl1Nk2cupgI6cUG5+PdGIvD4XW+bQ0wZ1T+3wiTXB1aqFW5Z9R" + + "q3RsG7VKdvpLstPBcwARMoH8labnlgAAAABJRU5ErkJggg==", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACUSURBVDhP" + + "1ZLBCYAwDEULLuAIHl3DjdzEURzBURzBqzf9gQZKSMkPnvzwKIi2fd+UX+UED8kOwmzA+9hygRGEkZe8DSwroBNpU6ptWG1L" + + "9yBWuyXsNPO3hbDTjDbVKatNj49EtY+6eqTGR7T1Bl6n6fGRjfQGttOUqhfbaUq1F9UOVYe6RpnADBZwy4OvaTv9dUp5Afx3" + + "gfLtY6izAAAAAElFTkSuQmCC") + public void pathFillTransform() throws Exception { + draw("\n", + " context.moveTo(2, 2);\n" + + " context.lineTo(6, 14);\n" + + " context.lineTo(14, 2);\n" + + " context.closePath();\n" + + + " context.setTransform(1.0, 0.0, 0.0, 1.0, 4.0, 4.0);\n" + + " context.moveTo(2, 2);\n" + + " context.lineTo(6, 14);\n" + + " context.lineTo(14, 2);\n" + + " context.closePath();\n" + + + " context.fill();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA6UlEQVQ4T62U0Q3CMAxEL/NUFUPwyQwswBIwTFfgC4boHgwR" + + "dCGNjOtgV9Q/lZL0cu/iJGHnSjvrQQrOAA7BDSYAZ2utFLwCuAUEXwAGAPyuSgrSHV16RWd0aJbO0MPuoi7qWrBhe8rK3pRq" + + "plqwYUcDrVkOqWZqtU0xFw2Up51EppbgFuyG2suQ41Hs0j4L6i9BzhXsI3B/AqdOh3yheoJs8AsdZOBh3KAVqidI7JENnAF9" + + "4CaqJ9gos8i0DpqoYUEuzDVTOl4aOHr1zHX582iUTPWp6h9C72HFHmUD/+XQe37kfMjhFsE3a3YyFbFVojMAAAAASUVORK5C" + + "YII=", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA6UlEQVQ4T62U0Q3CMAxEL/NUFUPwyQwswBIwTFfgC4boHgwR" + + "dCGNjOtgV9Q/lZL0cu/iJGHnSjvrQQrOAA7BDSYAZ2utFLwCuAUEXwAGAPyuSgrSHV16RWd0aJbO0MPuoi7qWrBhe8rK3pRq" + + "plqwYUcDrVkOqWZqtU0xFw2Up51EppbgFuyG2suQ41Hs0j4L6i9BzhXsI3B/AqdOh3yheoJs8AsdZOBh3KAVqidI7JENnAF9" + + "4CaqJ9gos8i0DpqoYUEuzDVTOl4aOHr1zHX582iUTPWp6h9C72HFHmUD/+XQe37kfMjhFsE3a3YyFbFVojMAAAAASUVORK5C" + + "YII=", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAh0lEQVQ4jdXQyw2AIBBF0VvC7GzTTijFjf1MCZQwLvzEaAhP" + + "cKEvYXvhAH+aAyGeSQkmMZYBU4ImBkcltq/GlqjnHWyHCP0ULzrYSY/lqPypA2F6sPqnT9jSn6rsKvXGHmDuoV7ZGbAAb6We" + + "Z2wvCEg91NtifWUztRT1VmopmLqpl6C9Qv3EFlkx1KTcSB3bAAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAh0lEQVQ4jdXQyw2AIBBF0VvC7GzTTijFjf1MCZQwLvzEaAhP" + + "cKEvYXvhAH+aAyGeSQkmMZYBU4ImBkcltq/GlqjnHWyHCP0ULzrYSY/lqPypA2F6sPqnT9jSn6rsKvXGHmDuoV7ZGbAAb6We" + + "Z2wvCEg91NtifWUztRT1VmopmLqpl6C9Qv3EFlkx1KTcSB3bAAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACjSURBVDhP" + + "1ZLBDYAgDEU7gifndBNG8eI+jMAG6i8JpKkNFPWgL/mBA/36CPQrInI4syJdAmIN6yRkQrrwIatAZ0Hc9LRdqpKqjeYDG1f2" + + "xoeqNprNYR2UJazNO83aOGEW6KCwe6du7ZaqxKXtUZVk7Zlo00UlHlUJa+cHjMFolA0/H1bJf4DhoMqGVC/wsCocUjUp2ndU" + + "TVj7saqEi15R/QBEJzGv1JNAAQutAAAAAElFTkSuQmCC") + public void pathFillTransform2() throws Exception { + draw("\n", + " context.beginPath();\n" + + " context.moveTo(2, 2);\n" + + " context.lineTo(6, 14);\n" + + " context.lineTo(14, 2);\n" + + " context.closePath();\n" + + " context.fill();\n" + + + " context.setTransform(1.0, 0.0, 0.0, 1.0, 4.0, 4.0);\n" + + " context.fillStyle = 'red';" + + " context.beginPath();\n" + + " context.moveTo(2, 2);\n" + + " context.lineTo(6, 14);\n" + + " context.lineTo(14, 2);\n" + + " context.closePath();\n" + + " context.fill();\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(CHROME = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAdUlEQVQ4T9WTwQ7AUAQE15/7cz2UNjSaEg59xyeZjAVh+NEw" + + "D38EMsTFwLUuni1vAYX9uAjfTFPDOaCKCc4sKUQK0OtmpMVx4J2g+Kl3DReBftoWhf3G6ZdPbw1IYU+hF9U2HANeicYT1ULZ" + + "cA9o5GDaN0yAB17KJBFC+xNmAAAAAElFTkSuQmCC", + EDGE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAdUlEQVQ4T9WTwQ7AUAQE15/7cz2UNjSaEg59xyeZjAVh+NEw" + + "D38EMsTFwLUuni1vAYX9uAjfTFPDOaCKCc4sKUQK0OtmpMVx4J2g+Kl3DReBftoWhf3G6ZdPbw1IYU+hF9U2HANeicYT1ULZ" + + "cA9o5GDaN0yAB17KJBFC+xNmAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAARUlEQVQ4jWNgGAXUBw0M/1HwoDXwPwMqHkQGQgHCIHSzB4uB" + + "SEYPegPRjKdVZFE/9qmVAahuIBygG0ixwVQ3EJfB1DYQACh5i4ny3fVlAAAAAElFTkSuQmCC", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAARUlEQVQ4jWNgGAXUBw0M/1HwoDXwPwMqHkQGQgHCIHSzB4uB" + + "SEYPegPRjKdVZFE/9qmVAahuIBygG0ixwVQ3EJfB1DYQACh5i4ny3fVlAAAAAElFTkSuQmCC", + IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABpSURBVDhP" + + "7ZPRCsAgCEV1X+6fO2ladGkxWDQfdl7MEDmI0s9r2GNDSP11IYOaCYfHZdwaqpSsYoWPTDcYOqZZTBlGaj9T032GDQXFfIY9" + + "MdvAGnQ98hgy7Glc1PeGFbx5J5FhAKaLDYlOKXoSF+jZIBEAAAAASUVORK5CYII=") + public void saveRestore() throws Exception { + draw("\n", + " context.fillStyle = 'green';\n" + + " context.save();\n" + + " context.fillRect(4, 4, 4, 4);\n" + + + " context.fillStyle = 'red';\n" + + " context.fillRect(6, 6, 4, 4);\n" + + " context.save();\n" + + + " context.fillStyle = 'blue';\n" + + " context.fillRect(8, 8, 4, 4);\n" + + + " context.restore();\n" + + " context.fillRect(12, 12, 4, 4);\n" + + + " context.restore();\n" + + " context.fillRect(14, 14, 4, 4);\n" + + + " context.restore();\n" + + " context.fillRect(16, 16, 4, 4);\n"); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAvUlEQVQ4T2NkQAWODAwM5lChkwwMDPvR5AlyGaEqeEUYGLYIM" + + "DDoBzAwcIPENjAwfP3AwHDxDQODDwMDw2eCJkEVgA0UYWA4mMDAYNXNwMCCrLGUgeHPAgaGY28YGOxJMdBRhYFh/W0GBn5sml" + + "QZGD7eYWAIJNb7IBdWlDAwNKO7DmY4yJU9DAy1DAwMHcS4kiYGUt3LVI8UUNBQN9kgBTbVEjYxEUiUGlhOIUoxMYpGDSQmlPC" + + "rGQ1DysMQAFq2MhXKNeEnAAAAAElFTkSuQmCC", + FF = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAjElEQVQ4je3SMQrCQBBA0dckZltLrxEkVxEUUudiqaw8l5VW" + + "wZXYRFSI4mrKPJj2M8Muryo0w1T+EAJtxmXDcccpIy7ZI6TXaEtiT/885SOapMpHYvfJiRLPb7ac3wVrutQNvwk2KcHJTxZo" + + "1yOxkrjikBQbFIE2J9Z0Nd2C6/DCxS/Bu8k+9mw2++QGj8thmtPon2MAAAAASUVORK5CYII=", + FF78 = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAjElEQVQ4je3SMQrCQBBA0dckZltLrxEkVxEUUudiqaw8l5VWw" + + "ZXYRFSI4mrKPJj2M8Muryo0w1T+EAJtxmXDcccpIy7ZI6TXaEtiT/885SOapMpHYvfJiRLPb7ac3wVrutQNvwk2KcHJTxZo1y" + + "OxkrjikBQbFIE2J9Z0Nd2C6/DCxS/Bu8k+9mw2++QGj8thmtPon2MAAAAASUVORK5CYII=", + IE = {}) + @HtmlUnitNYI(IE = "data:image/png;base64," + + "iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAzUlEQVR42u2SvwpBYRyGn8Eiyqos/kxGVrkDo8VkJYNcgUtwD" + + "crA7M+CLMoFGJQTirIapAgd78mmQ32nbOetZ/p+Pf2+7/3gX9lBvAGLHJxjcMvANgpVT7I9pPJwL4A9EZLbA5GFaxB6xsIKrI" + + "oS2B/cRRKOGikbCdPwWLoIHbqw0UjfdElXmcMWLJ0fjGwq4WJ9EbZhqJGxkTABnRo8XYSn0FtWN71yWG3uSip8rW0d0RymERj" + + "pbCYCXn5PWLR4v5mcqCeaXmV+/Pj5lRf9o2ZS6A1d/wAAAABJRU5ErkJggg==") + public void imageOnLoad() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "\n" + + LOG_TEXTAREA + + ""; + + loadPageVerifyTextArea2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ImageDataTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ImageDataTest.java index 4b07bee9e..4ed73fcc5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ImageDataTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/ImageDataTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -35,15 +35,16 @@ public class ImageDataTest extends WebDriverTestCase { */ @Test @Alerts(DEFAULT = {"8", "1", "2", - "0", "190", "3", "255", "0", "190", "3", "255", - "8", "2", "1", - "0", "190", "3", "255", "0", "190", "3", "255"}, + "0", "190", "3", "255", "0", "190", "3", "255", + "8", "2", "1", + "0", "190", "3", "255", "0", "190", "3", "255"}, IE = "no ctor") public void ctorArray() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -127,45 +129,46 @@ public void ctorArrayWidthHeight() throws Exception { public void ctorArrayInvalid() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -177,24 +180,25 @@ public void ctorArrayInvalid() throws Exception { public void ctorWidthHeight() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -205,6 +209,7 @@ public void ctorWidthHeight() throws Exception { public void getImageData() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -64,14 +65,15 @@ public void getRandomValues() throws Exception { @Alerts("exception") public void getRandomValuesQuotaExceeded() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -82,12 +84,13 @@ public void getRandomValuesQuotaExceeded() throws Exception { IE = "exception") public void subtle() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/SubtleCryptoTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/SubtleCryptoTest.java index 5d25b3179..64476598d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/SubtleCryptoTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/crypto/SubtleCryptoTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,6 +24,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; import com.gargoylesoftware.htmlunit.WebDriverTestCase; @@ -32,27 +33,60 @@ * * @author Ahmed Ashour * @author Ronald Brill + * @author Atsushi Nakagawa */ @RunWith(BrowserRunner.class) public class SubtleCryptoTest extends WebDriverTestCase { + /** + * Methods in SubtleCrypto should always wraps errors in a Promise and never throw directly. + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = "TypeError true", + IE = {}) + @HtmlUnitNYI(CHROME = "TypeError false", + EDGE = "TypeError false", + FF = "TypeError false", + FF78 = "TypeError false") + public void unsupportedCall() throws Exception { + final String html + = "" + + "\n" + + ""; + + loadPageWithAlerts2(html, URL_FIRST, DEFAULT_WAIT_TIME * 3); + } + /** * @throws Exception if the test fails */ @Test @Alerts(DEFAULT = {"[object Crypto]", "public", "true", "verify", - "name RSASSA-PKCS1-v1_5", "hash [object Object]", "modulusLength 2048", - "publicExponent 1,0,1", - "private", "false", "sign", - "name RSASSA-PKCS1-v1_5", "hash [object Object]", "modulusLength 2048", - "publicExponent 1,0,1"}, + "name RSASSA-PKCS1-v1_5", "hash [object Object]", "modulusLength 2048", + "publicExponent 1,0,1", + "private", "false", "sign", + "name RSASSA-PKCS1-v1_5", "hash [object Object]", "modulusLength 2048", + "publicExponent 1,0,1"}, IE = "undefined") @NotYetImplemented({CHROME, EDGE, FF, FF78}) public void rsassa() throws Exception { final String html = "\n" + ""; - loadPageWithAlerts2(html, URL_FIRST, DEFAULT_WAIT_TIME * 3); + loadPage2(html); + verifyAlerts(getWebDriver(), "done"); + verifyTitle2(getWebDriver(), getExpectedAlerts()); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSCharsetRuleTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSCharsetRuleTest.java index 06f1c0e29..67f0a9ff0 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSCharsetRuleTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSCharsetRuleTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSFontFaceRuleTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSFontFaceRuleTest.java index 9bec5de63..ac3b5d7c5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSFontFaceRuleTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSFontFaceRuleTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -35,11 +35,11 @@ public class CSSFontFaceRuleTest extends WebDriverTestCase { */ @Test @Alerts(DEFAULT = {"[object CSSFontFaceRule]", "5", - "@font-face { font-family: Delicious; src: url(\"Delicious-Bold.otf\"); }"}, + "@font-face { font-family: Delicious; src: url(\"Delicious-Bold.otf\"); }"}, FF78 = {"[object CSSFontFaceRule]", "5", - "@font-face {\n font-family: Delicious;\n src: url(\"Delicious-Bold.otf\");\n}"}, + "@font-face {\n font-family: Delicious;\n src: url(\"Delicious-Bold.otf\");\n}"}, IE = {"[object CSSFontFaceRule]", "5", - "@font-face {\n\tfont-family: Delicious;\n\tsrc: url(Delicious-Bold.otf);\n}\n"}) + "@font-face {\n\tfont-family: Delicious;\n\tsrc: url(Delicious-Bold.otf);\n}\n"}) public void simple() throws Exception { final String html = "\n" diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSImportRuleTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSImportRuleTest.java index b6ad7ed42..018afd1ad 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSImportRuleTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSImportRuleTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -45,6 +45,7 @@ public class CSSImportRuleTest extends WebDriverTestCase { IE = {"[object CSSImportRule]", "§§URL§§second/", "all", "0", "[object CSSStyleSheet]"}) public void getImportFromCssRulesCollection_absolute() throws Exception { + expandExpectedAlertsVariables(URL_FIRST); getImportFromCssRulesCollection(URL_FIRST, URL_SECOND.toExternalForm(), URL_SECOND); } @@ -83,7 +84,7 @@ private void getImportFromCssRulesCollection(final URL pageUrl, final String css final String css = "#d { color: green }"; getMockWebConnection().setResponse(cssUrl, css, MimeType.TEXT_CSS); - loadPageWithAlerts2(html, pageUrl, 1000000); + loadPageWithAlerts2(html, pageUrl); } /** diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSKeyframesRuleTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSKeyframesRuleTest.java index 4e573e189..231b98aad 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSKeyframesRuleTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSKeyframesRuleTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSMediaRuleTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSMediaRuleTest.java index 9b5807ba0..e1be24012 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSMediaRuleTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSMediaRuleTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRuleListTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRuleListTest.java index 5483c89f4..24343017c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRuleListTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSRuleListTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSelector2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSelector2Test.java index 8017ff2bb..b5a23a95c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSelector2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSelector2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSelectorTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSelectorTest.java index 15dbafbd6..b783367dd 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSelectorTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSelectorTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -41,12 +41,13 @@ public class CSSSelectorTest extends WebDriverTestCase { @Test @Alerts({"0", "0"}) public void querySelectorAll_nullUndefined() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -57,7 +58,7 @@ public void querySelectorAll_nullUndefined() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -66,16 +67,17 @@ public void querySelectorAll_nullUndefined() throws Exception { @Test @Alerts({"exception", "exception"}) public void querySelectorAll_emptyString() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -86,7 +88,7 @@ public void querySelectorAll_emptyString() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -97,20 +99,21 @@ public void querySelectorAll_emptyString() throws Exception { @Test @Alerts({"li2", "li1", "li2", "li1", "li3", "li1", "2", "li1", "li2"}) public void nth_child() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -121,7 +124,7 @@ public void nth_child() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -130,15 +133,16 @@ public void nth_child() throws Exception { @Test @Alerts({"1", "li2", "2", "li1", "li3"}) public void nth_child_even_odd() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -149,7 +153,7 @@ public void nth_child_even_odd() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -158,16 +162,17 @@ public void nth_child_even_odd() throws Exception { @Test @Alerts({"1", "[object HTMLBodyElement]", "1", "0"}) public void childSelector_html_body() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -175,7 +180,7 @@ public void childSelector_html_body() throws Exception { + "
\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -185,11 +190,12 @@ public void childSelector_html_body() throws Exception { @Alerts("exception") public void nth_child_no_argument() throws Exception { final String html - = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "First\n" + "\n" @@ -200,7 +206,7 @@ public void nth_child_no_argument() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -210,11 +216,12 @@ public void nth_child_no_argument() throws Exception { @Alerts({"li1", "li4", "li7", "li10"}) public void nth_child_equation() throws Exception { final String html - = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "First\n" @@ -233,7 +240,7 @@ public void nth_child_equation() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -245,17 +252,18 @@ public void nth_child_equation() throws Exception { @Alerts("exception") public void invalid() throws Exception { final String html - = "First\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -264,13 +272,14 @@ public void invalid() throws Exception { @Test @Alerts({"1", "ul2"}) public void directAdjacentSelector() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -280,7 +289,7 @@ public void directAdjacentSelector() throws Exception { + "
    \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -289,13 +298,14 @@ public void directAdjacentSelector() throws Exception { @Test @Alerts({"1", "thing1"}) public void prefixAttribute() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -305,7 +315,7 @@ public void prefixAttribute() throws Exception { + "
      \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -314,14 +324,15 @@ public void prefixAttribute() throws Exception { @Test @Alerts("0") public void prefixAttributeEmpty() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" @@ -332,7 +343,7 @@ public void prefixAttributeEmpty() throws Exception { + "
        \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -341,13 +352,14 @@ public void prefixAttributeEmpty() throws Exception { @Test @Alerts({"1", "something"}) public void suffixAttribute() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -357,7 +369,7 @@ public void suffixAttribute() throws Exception { + "
          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -366,14 +378,15 @@ public void suffixAttribute() throws Exception { @Test @Alerts("0") public void suffixAttributeEmpty() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" @@ -384,7 +397,7 @@ public void suffixAttributeEmpty() throws Exception { + "
            \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -393,14 +406,15 @@ public void suffixAttributeEmpty() throws Exception { @Test @Alerts({"2", "something", "thing2"}) public void substringAttribute() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -410,7 +424,7 @@ public void substringAttribute() throws Exception { + "
              \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -419,14 +433,15 @@ public void substringAttribute() throws Exception { @Test @Alerts("0") public void substringAttributeEmpty() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" @@ -437,7 +452,7 @@ public void substringAttributeEmpty() throws Exception { + "
                \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -446,14 +461,15 @@ public void substringAttributeEmpty() throws Exception { @Test @Alerts({"2", "id1", "id2"}) public void oneOfAttribute() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -463,7 +479,7 @@ public void oneOfAttribute() throws Exception { + "
                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -472,12 +488,13 @@ public void oneOfAttribute() throws Exception { @Test @Alerts("0") public void oneOfAttributeEmpty() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -487,7 +504,7 @@ public void oneOfAttributeEmpty() throws Exception { + "
                    \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -496,14 +513,15 @@ public void oneOfAttributeEmpty() throws Exception { @Test @Alerts({"2", "id2", "id3"}) public void hasAttribute() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" @@ -514,7 +532,7 @@ public void hasAttribute() throws Exception { + "
                      \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -523,14 +541,15 @@ public void hasAttribute() throws Exception { @Test @Alerts({"5", "id1", "id2", "id5", "id6", "id7"}) public void hyphenSeparatedAttributeValue() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" @@ -549,7 +568,7 @@ public void hyphenSeparatedAttributeValue() throws Exception { + "

                      \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -558,14 +577,15 @@ public void hyphenSeparatedAttributeValue() throws Exception { @Test @Alerts({"2", "id1", "id4"}) public void hyphenSeparatedAttributeValueHyphenInSelector() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" @@ -577,7 +597,7 @@ public void hyphenSeparatedAttributeValueHyphenInSelector() throws Exception { + "

                      \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -586,14 +606,15 @@ public void hyphenSeparatedAttributeValueHyphenInSelector() throws Exception { @Test @Alerts({"2", "id2", "id6"}) public void hyphenSeparatedAttributeValueEmpty() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" @@ -608,7 +629,7 @@ public void hyphenSeparatedAttributeValueEmpty() throws Exception { + "

                      \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -617,14 +638,15 @@ public void hyphenSeparatedAttributeValueEmpty() throws Exception { @Test @Alerts({"1", "id3"}) public void emptyAttributeValue() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" @@ -635,7 +657,7 @@ public void emptyAttributeValue() throws Exception { + "
                        \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -644,14 +666,15 @@ public void emptyAttributeValue() throws Exception { @Test @Alerts({"2", "ul2", "ul3"}) public void generalAdjacentSelector() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" @@ -662,7 +685,7 @@ public void generalAdjacentSelector() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -671,14 +694,15 @@ public void generalAdjacentSelector() throws Exception { @Test @Alerts({"li3", "2", "li1", "li3"}) public void nth_last_child() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -689,7 +713,7 @@ public void nth_last_child() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -698,26 +722,27 @@ public void nth_last_child() throws Exception { @Test @Alerts({"2", "div1", "div3", "2", "div1", "div3", "2", "div1", "div3", "0"}) public void nth_last_child2() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -730,7 +755,7 @@ public void nth_last_child2() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -739,7 +764,7 @@ public void nth_last_child2() throws Exception { @Test @Alerts("id3") public void nth_of_type() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -832,7 +858,7 @@ public void pseudoCheckboxChecked() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -841,17 +867,18 @@ public void pseudoCheckboxChecked() throws Exception { @Test @Alerts({"1", "radio2", "1", "radio2"}) public void pseudoRadioChecked() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -861,7 +888,83 @@ public void pseudoRadioChecked() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); + } + + /** + * See https://www.w3.org/TR/selectors-4/#validity-pseudos. + * + * @throws Exception if an error occurs + */ + @Test + @Alerts(DEFAULT = {"theform", "id3"}, + IE = "id3") //minLength and maxLength not supported in IE + @HtmlUnitNYI(CHROME = {"id3", "id5", "id6"}, + EDGE = {"id3", "id5", "id6"}, + FF = {"id3", "id5", "id6"}, + FF78 = {"id3", "id5", "id6"}) + public void pseudoInvalid() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "
                          \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "

                          foo

                          \n" + + "
                          \n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * See https://www.w3.org/TR/selectors-4/#validity-pseudos. + * + * @throws Exception if an error occurs + */ + @Test + @Alerts({"id1", "id2", "id4", "id5", "id6"}) + @HtmlUnitNYI(CHROME = {"", "", "", "", "theform", "id1", "id2", "id4", "id7"}, + EDGE = {"", "", "", "", "theform", "id1", "id2", "id4", "id7"}, + FF = {"", "", "", "", "theform", "id1", "id2", "id4", "id7"}, + FF78 = {"", "", "", "", "theform", "id1", "id2", "id4", "id7"}, + IE = {"", "", "", "", "theform", "id1", "id2", "id4", "id5", "id6", "id7"}) + public void pseudoValid() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "
                          \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "

                          foo

                          \n" + + "
                          \n" + + ""; + + loadPageVerifyTitle2(html); } /** @@ -870,7 +973,7 @@ public void pseudoRadioChecked() throws Exception { @Test @Alerts("li1") public void first_child() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -971,7 +1078,7 @@ public void invalid_not() throws Exception { + "

                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -980,7 +1087,7 @@ public void invalid_not() throws Exception { @Test @Alerts("id4") public void last_of_type() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -1073,7 +1181,7 @@ public void empty() throws Exception { + " a text\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1082,7 +1190,7 @@ public void empty() throws Exception { @Test @Alerts("id2") public void not() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -1166,16 +1281,19 @@ public void notWithNthOfType() throws Exception { + "
                          3
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "exception", - FF = "id2") - @HtmlUnitNYI(FF = "exception") + @Alerts(DEFAULT = "id2", + FF78 = "exception", + IE = "exception") + @HtmlUnitNYI(CHROME = "exception", + EDGE = "exception", + FF = "exception") public void notWithLastOfType() throws Exception { final String html = "\n" + "\n" @@ -1199,37 +1317,41 @@ public void notWithLastOfType() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "exception", - FF = {"2", "id1", "id2", "2", "id1", "id3", "2", "id2", "id3", - "3", "id1", "id2", "id3"}) - @HtmlUnitNYI(FF = "exception") + @Alerts(DEFAULT = {"2", "id1", "id2", "2", "id1", "id3", "2", "id2", "id3", + "3", "id1", "id2", "id3"}, + FF78 = "exception", + IE = "exception") + @HtmlUnitNYI(CHROME = "exception", + EDGE = "exception", + FF = "exception") public void notWithNthLastOfType() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -1238,7 +1360,7 @@ public void notWithNthLastOfType() throws Exception { + "
                          3
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1247,14 +1369,15 @@ public void notWithNthLastOfType() throws Exception { @Test @Alerts({"2", "item_2", "item_3"}) public void childNot() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -1265,7 +1388,7 @@ public void childNot() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1274,13 +1397,14 @@ public void childNot() throws Exception { @Test @Alerts({"1", "item_2"}) public void childNotNot() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -1291,7 +1415,7 @@ public void childNotNot() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1301,20 +1425,21 @@ public void childNotNot() throws Exception { @Alerts(DEFAULT = {"0", "undefined", "1", "[object HTMLInputElement]", "id2"}, IE = {"1", "[object HTMLBodyElement]", "1", "[object HTMLInputElement]", "id2"}) public void focus() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -1322,7 +1447,7 @@ public void focus() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1331,13 +1456,14 @@ public void focus() throws Exception { @Test @Alerts({"5", "cb1", "rd1", "sl1", "ml1", "ml3"}) public void checked() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -1359,7 +1485,7 @@ public void checked() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1368,21 +1494,22 @@ public void checked() throws Exception { @Test @Alerts({"2", "cb1", "rd1", "2", "cb2", "rd2"}) public void checkedChanged() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -1392,7 +1519,7 @@ public void checkedChanged() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1401,21 +1528,22 @@ public void checkedChanged() throws Exception { @Test @Alerts({"2", "cb1", "rd1", "2", "cb1", "rd1"}) public void checkedAttribute() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -1425,7 +1553,7 @@ public void checkedAttribute() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1434,22 +1562,23 @@ public void checkedAttribute() throws Exception { @Test @Alerts({"1", "1-iy", "1-iy", "2", "1-iy", "1-iz"}) public void selectedChecked() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -1460,7 +1589,7 @@ public void selectedChecked() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1469,13 +1598,14 @@ public void selectedChecked() throws Exception { @Test @Alerts({"2", "id1", "id3"}) public void enabled() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -1484,7 +1614,7 @@ public void enabled() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1493,13 +1623,14 @@ public void enabled() throws Exception { @Test @Alerts({"1", "id2"}) public void disabled() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" @@ -1508,7 +1639,7 @@ public void disabled() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1519,7 +1650,7 @@ public void disabled() throws Exception { public void target() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "First\n" + + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1614,15 +1746,16 @@ public void escapedAttributeValue() throws Exception { + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1647,13 +1780,14 @@ public void differentWhitespaceClassName() throws Exception { + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1669,14 +1803,15 @@ public void escapedClassName() throws Exception { + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1691,16 +1826,17 @@ public void escapedId() throws Exception { + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1946,35 +2082,36 @@ public void visitedEmptyDetached() throws Exception { private void emptyAndDetached(final String selector) throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "First\n" + + "\n" + "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1982,15 +2119,15 @@ private void emptyAndDetached(final String selector) throws Exception { */ @Test @Alerts(DEFAULT = {"2", "Three", "Four", - "1", "Two", "0", "0"}, + "1", "Two", "0", "0"}, IE = {"2", "undefined", "undefined", - "1", "undefined", "0", "0"}) + "1", "undefined", "0", "0"}) public void xmlTagName() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2036,21 +2173,21 @@ public void xmlTagName() throws Exception { */ @Test @Alerts(DEFAULT = {"2", "ONE", "Two", - "0", - "2", "ONE", "Two", - "1", "ONE", - "1", "Two"}, + "0", + "2", "ONE", "Two", + "1", "ONE", + "1", "Two"}, IE = {"2", "undefined", "undefined", - "0", - "2", "undefined", "undefined", - "1", "undefined", - "1", "undefined"}) + "0", + "2", "undefined", "undefined", + "1", "undefined", + "1", "undefined"}) public void xmlAttribute() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration2Test.java index ab1d2638f..0ae9364a4 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -153,23 +153,23 @@ public void width_like_properties_heightWidth() throws Exception { */ @Test @Alerts(DEFAULT = {"success", "letterSpacing 42% - 42em", - "outlineWidth 42.0 - ; 42.7 - ; 42 - ; 42% - 42em", - "success", - "success", - "wordSpacing 42% - 42em"}, + "outlineWidth 42.0 - ; 42.7 - ; 42 - ; 42% - 42em", + "success", + "success", + "wordSpacing 42% - 42em"}, FF = {"success", "letterSpacing 42% - 42em", - "outlineWidth 42.0 - ; 42.7 - ; 42 - ; 42% - 42em", - "success", - "success", - "success"}, + "outlineWidth 42.0 - ; 42.7 - ; 42 - ; 42% - 42em", + "success", + "success", + "success"}, FF78 = {"success", "letterSpacing 42% - 42em", - "outlineWidth 42.0 - ; 42.7 - ; 42 - ; 42% - 42em", - "success", - "success", - "success"}, + "outlineWidth 42.0 - ; 42.7 - ; 42 - ; 42% - 42em", + "success", + "success", + "success"}, IE = {"success", "letterSpacing 42% - 42em", - "outlineWidth 42% - 42em", "success", "success", - "wordSpacing 42% - 42em"}) + "outlineWidth 42% - 42em", "success", "success", + "wordSpacing 42% - 42em"}) public void width_like_properties_font() throws Exception { width_like_properties("fontSize", "letterSpacing", "outlineWidth", "textIndent", "verticalAlign", "wordSpacing"); diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration3Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration3Test.java index 106609158..1ee9025a4 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration3Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration3Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -185,18 +185,19 @@ private void background(final String backgroundStyle) throws Exception { + "\n" + "
                          hello
                          \n" + " \n" + ""; getMockWebConnection().setDefaultResponse("Error: not found", 404, "Not Found", MimeType.TEXT_HTML); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -333,19 +334,21 @@ private void backgroundCss(final String backgroundStyle) throws Exception { + "\n" + "
                          hello
                          \n" + " \n" + ""; getMockWebConnection().setDefaultResponse("Error: not found", 404, "Not Found", MimeType.TEXT_HTML); - loadPageWithAlerts2(html); + expandExpectedAlertsVariables(URL_FIRST); + loadPageVerifyTitle2(html); } /** diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration4Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration4Test.java index 38fa53b38..0aba66444 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration4Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclaration4Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclarationTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclarationTest.java index 64d0c6299..2326f2e9e 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclarationTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleDeclarationTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -61,21 +61,22 @@ public class CSSStyleDeclarationTest extends WebDriverTestCase { @Alerts({"black", "pink", "color: pink;", "color: pink;"}) public void style_OneCssAttribute() throws Exception { final String html - = "First\n" + "
                          foo
                          "; final String style = getExpectedAlerts()[getExpectedAlerts().length - 1]; setExpectedAlerts(Arrays.copyOf(getExpectedAlerts(), getExpectedAlerts().length - 1)); - final WebDriver driver = loadPageWithAlerts2(html); + final WebDriver driver = loadPageVerifyTitle2(html); assertEquals(style, driver.findElement(By.id("div1")).getAttribute("style")); } @@ -95,12 +96,13 @@ public void style_OneCssAttribute() throws Exception { IE = {"black", "pink", "color: pink; background: blue; foo: bar;"}) public void style_MultipleCssAttributes() throws Exception { final String html - = "First\n" + "\n" + "
                          foo
                          "; @@ -108,7 +110,7 @@ public void style_MultipleCssAttributes() throws Exception { final String style = getExpectedAlerts()[getExpectedAlerts().length - 1]; setExpectedAlerts(Arrays.copyOf(getExpectedAlerts(), getExpectedAlerts().length - 1)); - final WebDriver driver = loadPageWithAlerts2(html); + final WebDriver driver = loadPageVerifyTitle2(html); assertEquals(style, driver.findElement(By.id("div1")).getAttribute("style")); } @@ -120,20 +122,21 @@ public void style_MultipleCssAttributes() throws Exception { @Alerts({"null", "", "pink", "color: pink;"}) public void style_OneUndefinedCssAttribute() throws Exception { final String html - = "First\n" + "
                          foo
                          "; final String style = getExpectedAlerts()[getExpectedAlerts().length - 1]; setExpectedAlerts(Arrays.copyOf(getExpectedAlerts(), getExpectedAlerts().length - 1)); - final WebDriver driver = loadPageWithAlerts2(html); + final WebDriver driver = loadPageVerifyTitle2(html); assertEquals(style, driver.findElement(By.id("div1")).getAttribute("style")); } @@ -147,17 +150,18 @@ public void style_OneUndefinedCssAttribute() throws Exception { @Alerts({"", "hidden", "undefined"}) public void mozillaStyle() throws Exception { final String content - = "First\n" + "\n" + "
                          foo
                          "; - loadPageWithAlerts2(content); + loadPageVerifyTitle2(content); } /** @@ -167,16 +171,17 @@ public void mozillaStyle() throws Exception { @Alerts("undefined") public void behavior() throws Exception { final String html - = "First\n" + "\n" + "
                          foo
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -206,17 +211,18 @@ public void onclickAccessStyle() throws Exception { @Test @Alerts({"string", "string", "string", "undefined"}) public void accessProperties() throws Exception { - final String html = "First\n" + "\n" + "
                          foo
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -226,15 +232,16 @@ public void accessProperties() throws Exception { @Test @Alerts("123") public void setStylePropertyNonString() throws Exception { - final String html = "First\n" + "\n" + "
                          foo
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -247,17 +254,18 @@ public void setStylePropertyNonString() throws Exception { @HtmlUnitNYI(FF = "blue", FF78 = "blue") public void getPropertyValue() throws Exception { - final String html = "First\n" + "\n" + "
                          foo
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -266,19 +274,20 @@ public void getPropertyValue() throws Exception { @Test @Alerts({"*blue* string", ""}) public void removeProperty() throws Exception { - final String html = "First\n" + "\n" + "
                          foo
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -287,19 +296,20 @@ public void removeProperty() throws Exception { @Test @Alerts({"** string", "blue"}) public void removePropertyUnknown() throws Exception { - final String html = "First\n" + "\n" + "
                          foo
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -309,22 +319,23 @@ public void removePropertyUnknown() throws Exception { @Alerts({"** string", "blue"}) public void removePropertyUndefined() throws Exception { final String html = "\n" - + "First\n" + + "\n" + "\n" + "\n" + "
                          foo
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -335,28 +346,29 @@ public void removePropertyUndefined() throws Exception { public void getPropertyValue_WithDash() throws Exception { final String html = "\n" + "x\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -371,17 +383,18 @@ public void getPropertyValue_WithDash() throws Exception { IE = {"", "alpha(opacity=50)"}) public void styleFilter() throws Exception { final String html = "\n" + "
                          foo
                          \n" + "
                          bar
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -404,13 +417,14 @@ public void initOpacity() throws Exception { + "
                          d
                          \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -419,13 +433,14 @@ public void initOpacity() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts(" 0.5 0.4 0.33333 -3 3 8 7 7 7 7 7 ") + @Alerts("- 0.5 0.4 0.33333 -3 3 8 7 7 7 7 7 ") public void setOpacity() throws Exception { final String html = "\n" + "
                          d
                          \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -463,18 +478,19 @@ public void setOpacity() throws Exception { @Test @Alerts({"undefined", "exception"}) public void setExpression() throws Exception { - final String html = "foo\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -483,19 +499,20 @@ public void setExpression() throws Exception { @Test @Alerts({"undefined", "exception"}) public void removeExpression() throws Exception { - final String html = "foo\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -505,30 +522,31 @@ public void removeExpression() throws Exception { @Alerts({"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}) public void borderStyles_noStyle() throws Exception { final String html - = "First\n" + "\n" + "
                          foo
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -538,18 +556,19 @@ public void borderStyles_noStyle() throws Exception { @Alerts({"3px", "4px", "2px", "1px"}) public void borderXxxWidth() throws Exception { final String html - = "First\n" + "\n" + "
                          foo
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -559,15 +578,16 @@ public void borderXxxWidth() throws Exception { @Alerts({"thin", "medium", "thick", "thick"}) public void borderXxxWidthConstants() throws Exception { final String html - = "First\n" + "\n" @@ -575,7 +595,7 @@ public void borderXxxWidthConstants() throws Exception { + "
                          foo
                          \n" + "
                          foo
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -589,11 +609,12 @@ public void initUnsupportdProperty() throws Exception { + "
                          d
                          \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -606,13 +627,14 @@ public void setUnsupportdProperty() throws Exception { + "
                          d
                          \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -622,36 +644,37 @@ public void setUnsupportdProperty() throws Exception { @Alerts({"string", "", "1", "2", "2", "2", "2", "5", "5", "5", "5"}) public void zIndex() throws Exception { final String html - = "First\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -662,31 +685,32 @@ public void zIndex() throws Exception { IE = {"string", "", "string", "", "number", "4", "string", "", "string", "", "string", ""}) public void zIndexDefault() throws Exception { final String html - = "First\n" @@ -699,7 +723,7 @@ public void zIndexDefault() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -709,24 +733,25 @@ public void zIndexDefault() throws Exception { @Alerts({"", "", "1", "1"}) public void zIndexSetUndefined() throws Exception { final String html - = "First\n" @@ -734,7 +759,7 @@ public void zIndexSetUndefined() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -744,23 +769,24 @@ public void zIndexSetUndefined() throws Exception { @Alerts({"", "", "1", ""}) public void zIndexSetNull() throws Exception { final String html - = "First\n" @@ -768,7 +794,7 @@ public void zIndexSetNull() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -778,32 +804,33 @@ public void zIndexSetNull() throws Exception { @Alerts({"", "7", "7", "", "4", "1"}) public void zIndexSetString() throws Exception { final String html - = "First\n" @@ -811,7 +838,7 @@ public void zIndexSetString() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -821,21 +848,22 @@ public void zIndexSetString() throws Exception { @Alerts({"", "", "1", "1"}) public void zIndexSetInvalid() throws Exception { final String html - = "First\n" @@ -843,7 +871,7 @@ public void zIndexSetInvalid() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -852,22 +880,23 @@ public void zIndexSetInvalid() throws Exception { @Test @Alerts({"", "", "15px", "italic", "", "italic"}) public void cssText() throws Exception { - final String html = "foo\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -876,19 +905,20 @@ public void cssText() throws Exception { @Test @Alerts({"1px", "solid", "red"}) public void border() throws Exception { - final String html = "foo\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -897,18 +927,19 @@ public void border() throws Exception { @Test @Alerts({"true", "false"}) public void display() throws Exception { - final String html = "foo\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -925,20 +956,21 @@ public void displayDefaultOverwritesNone() throws Exception { + " tt { display: none; color: green; }\n" + " \n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -951,20 +983,21 @@ public void displayDefault() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -973,19 +1006,20 @@ public void displayDefault() throws Exception { @Test @Alerts({"1px", "2px"}) public void resettingValue() throws Exception { - final String html = "foo\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -994,20 +1028,21 @@ public void resettingValue() throws Exception { @Test @Alerts({"2px", "30px"}) public void resettingValue2() throws Exception { - final String html = "foo\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1016,20 +1051,19 @@ public void resettingValue2() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts({ - "L:3px,R:3px,T:3px,B:3px", "L:5px,R:5px,T:5px,B:5px", "L:7px,R:2px,T:2px,B:2px", - "L:3px,R:3px,T:3px,B:3px", "L:5px,R:5px,T:5px,B:5px", "L:7px,R:2px,T:2px,B:2px"}) + @Alerts({"L:3px,R:3px,T:3px,B:3px", "L:5px,R:5px,T:5px,B:5px", "L:7px,R:2px,T:2px,B:2px", + "L:3px,R:3px,T:3px,B:3px", "L:5px,R:5px,T:5px,B:5px", "L:7px,R:2px,T:2px,B:2px"}) public void marginAllvsMarginSingle() throws Exception { final String html = "\n" + " \n" - + " Test\n" + " \n" + " \n" @@ -1061,7 +1095,7 @@ public void marginAllvsMarginSingle() throws Exception { + "
                          m6
                          \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1070,20 +1104,19 @@ public void marginAllvsMarginSingle() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts({ - "L:3px,R:3px,T:3px,B:3px", "L:5px,R:5px,T:5px,B:5px", "L:7px,R:2px,T:2px,B:2px", - "L:3px,R:3px,T:3px,B:3px", "L:5px,R:5px,T:5px,B:5px", "L:7px,R:2px,T:2px,B:2px"}) + @Alerts({"L:3px,R:3px,T:3px,B:3px", "L:5px,R:5px,T:5px,B:5px", "L:7px,R:2px,T:2px,B:2px", + "L:3px,R:3px,T:3px,B:3px", "L:5px,R:5px,T:5px,B:5px", "L:7px,R:2px,T:2px,B:2px"}) public void paddingAllvsPaddingSingle() throws Exception { final String html = "\n" + " \n" - + " Test\n" + " \n" + " \n" @@ -1115,7 +1148,90 @@ public void paddingAllvsPaddingSingle() throws Exception { + "
                          m6
                          \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); + } + + /** + * Verifies that setting paddings all at once and setting paddings individually all work, both in static + * styles and in calculated styles. + * @throws Exception if an error occurs + */ + @Test + @Alerts({"L:3px,R:3px,T:3px,B:3px", "L:5px,R:5px,T:5px,B:5px", "L:7px,R:2px,T:2px,B:2px", + "L:3px,R:3px,T:3px,B:3px", "L:5px,R:5px,T:5px,B:5px", "L:7px,R:2px,T:2px,B:2px"}) + @HtmlUnitNYI(CHROME = {"L:undefined,R:undefined,T:undefined,B:undefined", + "L:undefined,R:undefined,T:undefined,B:undefined", + "L:undefined,R:undefined,T:undefined,B:undefined", + "L:undefined,R:undefined,T:undefined,B:undefined", + "L:undefined,R:undefined,T:undefined,B:undefined", + "L:undefined,R:undefined,T:undefined,B:undefined"}, + EDGE = {"L:undefined,R:undefined,T:undefined,B:undefined", + "L:undefined,R:undefined,T:undefined,B:undefined", + "L:undefined,R:undefined,T:undefined,B:undefined", + "L:undefined,R:undefined,T:undefined,B:undefined", + "L:undefined,R:undefined,T:undefined,B:undefined", + "L:undefined,R:undefined,T:undefined,B:undefined"}, + FF = {"L:0px,R:0px,T:0px,B:0px", + "L:3px,R:0px,T:0px,B:0px", + "L:7px,R:0px,T:0px,B:0px", + "L:,R:,T:,B:", + "L:3px,R:,T:,B:", + "L:7px,R:,T:,B:"}, + FF78 = {"L:0px,R:0px,T:0px,B:0px", + "L:3px,R:0px,T:0px,B:0px", + "L:7px,R:0px,T:0px,B:0px", + "L:,R:,T:,B:", + "L:3px,R:,T:,B:", + "L:7px,R:,T:,B:"}, + IE = {"L:undefined,R:undefined,T:undefined,B:undefined", + "L:3px,R:undefined,T:undefined,B:undefined", + "L:7px,R:undefined,T:undefined,B:undefined", + "L:undefined,R:undefined,T:undefined,B:undefined", + "L:3px,R:undefined,T:undefined,B:undefined", + "L:7px,R:undefined,T:undefined,B:undefined"}) + public void paddingAllvsPaddingSingle2() throws Exception { + final String html = + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "
                          m1
                          \n" + + "
                          m2
                          \n" + + "
                          m3
                          \n" + + "
                          m4
                          \n" + + "
                          m5
                          \n" + + "
                          m6
                          \n" + + " \n" + + ""; + loadPageVerifyTitle2(html); } /** @@ -1291,16 +1407,17 @@ public void getAttributeColorCase1() throws Exception { private void getAttribute(final String params) throws Exception { final String html = "\n" + "\n" + "go"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1398,21 +1515,22 @@ private void setAttribute(final String params) throws Exception { "\n" + "go\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1510,21 +1628,22 @@ private void removeAttribute(final String params) throws Exception { "\n" + "go\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1558,18 +1677,19 @@ private void setPropertyBackgroundColor(final String params, final String... exp "\n" + "go\n" + "\n" + ""; setExpectedAlerts(expected); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1577,9 +1697,9 @@ private void setPropertyBackgroundColor(final String params, final String... exp */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setWidthProperty() throws Exception { setLengthProperty("width", "width"); } @@ -1589,9 +1709,9 @@ public void setWidthProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setWidth() throws Exception { setLength("width", "width"); } @@ -1601,9 +1721,9 @@ public void setWidth() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setHeightProperty() throws Exception { setLengthProperty("height", "height"); } @@ -1613,9 +1733,9 @@ public void setHeightProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setHeight() throws Exception { setLength("height", "height"); } @@ -1625,9 +1745,9 @@ public void setHeight() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setTopProperty() throws Exception { setLengthProperty("top", "top"); } @@ -1637,9 +1757,9 @@ public void setTopProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setTop() throws Exception { setLength("top", "top"); } @@ -1649,9 +1769,9 @@ public void setTop() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setLeftProperty() throws Exception { setLengthProperty("left", "left"); } @@ -1661,9 +1781,9 @@ public void setLeftProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setLeft() throws Exception { setLength("left", "left"); } @@ -1673,9 +1793,9 @@ public void setLeft() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setBottomProperty() throws Exception { setLengthProperty("bottom", "bottom"); } @@ -1685,9 +1805,9 @@ public void setBottomProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setBottom() throws Exception { setLength("bottom", "bottom"); } @@ -1697,9 +1817,9 @@ public void setBottom() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setRightProperty() throws Exception { setLengthProperty("right", "right"); } @@ -1709,9 +1829,9 @@ public void setRightProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setRight() throws Exception { setLength("right", "right"); } @@ -1721,9 +1841,9 @@ public void setRight() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMarginTopProperty() throws Exception { setLengthProperty("margin-top", "marginTop"); } @@ -1733,9 +1853,9 @@ public void setMarginTopProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMarginTop() throws Exception { setLength("margin-top", "marginTop"); } @@ -1745,9 +1865,9 @@ public void setMarginTop() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMarginLeftProperty() throws Exception { setLengthProperty("margin-left", "marginLeft"); } @@ -1757,9 +1877,9 @@ public void setMarginLeftProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMarginLeft() throws Exception { setLength("margin-left", "marginLeft"); } @@ -1769,9 +1889,9 @@ public void setMarginLeft() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMarginBottomProperty() throws Exception { setLengthProperty("margin-bottom", "marginBottom"); } @@ -1781,9 +1901,9 @@ public void setMarginBottomProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMarginBottom() throws Exception { setLength("margin-bottom", "marginBottom"); } @@ -1793,9 +1913,9 @@ public void setMarginBottom() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMarginRightProperty() throws Exception { setLengthProperty("margin-right", "marginRight"); } @@ -1805,9 +1925,9 @@ public void setMarginRightProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMarginRight() throws Exception { setLength("margin-right", "marginRight"); } @@ -1817,9 +1937,9 @@ public void setMarginRight() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setPaddingTopProperty() throws Exception { setLengthProperty("padding-top", "paddingTop"); } @@ -1829,9 +1949,9 @@ public void setPaddingTopProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setPaddingTop() throws Exception { setLength("padding-top", "paddingTop"); } @@ -1841,9 +1961,9 @@ public void setPaddingTop() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setPaddingLeftProperty() throws Exception { setLengthProperty("padding-left", "paddingLeft"); } @@ -1853,9 +1973,9 @@ public void setPaddingLeftProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setPaddingLeft() throws Exception { setLength("padding-left", "paddingLeft"); } @@ -1865,9 +1985,9 @@ public void setPaddingLeft() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setPaddingBottomProperty() throws Exception { setLengthProperty("padding-bottom", "paddingBottom"); } @@ -1877,9 +1997,9 @@ public void setPaddingBottomProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setPaddingBottom() throws Exception { setLength("padding-bottom", "paddingBottom"); } @@ -1889,9 +2009,9 @@ public void setPaddingBottom() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setPaddingRightProperty() throws Exception { setLengthProperty("padding-right", "paddingRight"); } @@ -1901,9 +2021,9 @@ public void setPaddingRightProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setPaddingRight() throws Exception { setLength("padding-right", "paddingRight"); } @@ -1913,9 +2033,9 @@ public void setPaddingRight() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "17px", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "17px", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setBorderTopWidthProperty() throws Exception { setLengthProperty("border-top-width", "borderTopWidth"); } @@ -1925,9 +2045,9 @@ public void setBorderTopWidthProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "17px", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "17px", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setBorderTopWidth() throws Exception { setLength("border-top-width", "borderTopWidth"); } @@ -1937,9 +2057,9 @@ public void setBorderTopWidth() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "17px", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "17px", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setBorderLeftWidthProperty() throws Exception { setLengthProperty("border-left-width", "borderLeftWidth"); } @@ -1949,9 +2069,9 @@ public void setBorderLeftWidthProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "17px", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "17px", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setBorderLeftWidth() throws Exception { setLength("border-left-width", "borderLeftWidth"); } @@ -1961,9 +2081,9 @@ public void setBorderLeftWidth() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "17px", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "17px", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setBorderBottomWidthProperty() throws Exception { setLengthProperty("border-bottom-width", "borderBottomWidth"); } @@ -1973,9 +2093,9 @@ public void setBorderBottomWidthProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "17px", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "17px", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setBorderBottomWidth() throws Exception { setLength("border-bottom-width", "borderBottomWidth"); } @@ -1985,9 +2105,9 @@ public void setBorderBottomWidth() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "17px", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "17px", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setBorderRightWidthProperty() throws Exception { setLengthProperty("border-right-width", "borderRightWidth"); } @@ -1997,9 +2117,9 @@ public void setBorderRightWidthProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "17px", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "17px", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setBorderRightWidth() throws Exception { setLength("border-right-width", "borderRightWidth"); } @@ -2009,9 +2129,9 @@ public void setBorderRightWidth() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMaxWidthProperty() throws Exception { setLengthProperty("max-width", "maxWidth"); } @@ -2021,9 +2141,9 @@ public void setMaxWidthProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMaxWidth() throws Exception { setLength("max-width", "maxWidth"); } @@ -2033,9 +2153,9 @@ public void setMaxWidth() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMinWidthProperty() throws Exception { setLengthProperty("min-width", "minWidth"); } @@ -2045,9 +2165,9 @@ public void setMinWidthProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMinWidth() throws Exception { setLength("min-width", "minWidth"); } @@ -2057,9 +2177,9 @@ public void setMinWidth() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMaxHeightProperty() throws Exception { setLengthProperty("max-height", "maxHeight"); } @@ -2069,9 +2189,9 @@ public void setMaxHeightProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMaxHeight() throws Exception { setLength("max-height", "maxHeight"); } @@ -2081,9 +2201,9 @@ public void setMaxHeight() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMinHeightProperty() throws Exception { setLengthProperty("min-height", "minHeight"); } @@ -2093,9 +2213,9 @@ public void setMinHeightProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "auto", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setMinHeight() throws Exception { setLength("min-height", "minHeight"); } @@ -2105,9 +2225,9 @@ public void setMinHeight() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setTextIndentProperty() throws Exception { setLengthProperty("text-indent", "textIndent"); } @@ -2117,9 +2237,9 @@ public void setTextIndentProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setTextIndent() throws Exception { setLength("text-indent", "textIndent"); } @@ -2129,9 +2249,9 @@ public void setTextIndent() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setFontSizeProperty() throws Exception { setLengthProperty("font-size", "fontSize"); } @@ -2141,9 +2261,9 @@ public void setFontSizeProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setFontSize() throws Exception { setLength("font-size", "fontSize"); } @@ -2153,13 +2273,13 @@ public void setFontSize() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "17px", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, FF = {"4px", "5px", "6em", "17px", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, FF78 = {"4px", "5px", "6em", "17px", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "17px", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setWordSpacingProperty() throws Exception { setLengthProperty("word-spacing", "wordSpacing"); } @@ -2169,13 +2289,13 @@ public void setWordSpacingProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "17px", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px", "17px"}, FF = {"4px", "5px", "6em", "17px", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px", "17px"}, FF78 = {"4px", "5px", "6em", "17px", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "17px", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px", "17px"}) public void setWordSpacing() throws Exception { setLength("word-spacing", "wordSpacing"); } @@ -2185,9 +2305,9 @@ public void setWordSpacing() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "17px", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "17px", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setLetterSpacingProperty() throws Exception { setLengthProperty("letter-spacing", "letterSpacing"); } @@ -2197,9 +2317,9 @@ public void setLetterSpacingProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "17px", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "17px", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setLetterSpacing() throws Exception { setLength("letter-spacing", "letterSpacing"); } @@ -2209,9 +2329,9 @@ public void setLetterSpacing() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "7%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "7%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setVerticalAlignProperty() throws Exception { setLengthProperty("vertical-align", "verticalAlign"); } @@ -2221,9 +2341,9 @@ public void setVerticalAlignProperty() throws Exception { */ @Test @Alerts(DEFAULT = {"4px", "5px", "6em", "17px", "70%", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "auto", "70%", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setVerticalAlign() throws Exception { setLength("vertical-align", "verticalAlign"); } @@ -2233,9 +2353,9 @@ public void setVerticalAlign() throws Exception { */ @Test @Alerts(DEFAULT = {"17px", "5px", "6em", "17px", "17px", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "17px", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setOutlineWidthProperty() throws Exception { setLengthProperty("outline-width", "outlineWidth"); } @@ -2257,9 +2377,9 @@ public void setOutlineWidthProperty2() throws Exception { */ @Test @Alerts(DEFAULT = {"17px", "5px", "6em", "17px", "17px", "initial", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}, IE = {"4px", "5px", "6em", "17px", "17px", "17px", "inherit", - "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) + "17px", "17px", "17px", "", "17px", "", "17px", "17px", "17px"}) public void setOutlineWidth() throws Exception { setLength("outline-width", "outlineWidth"); } @@ -2322,10 +2442,7 @@ private void setLengthProperty(final String cssProp, final String prop, "\n" + "go\n" + "\n" - + "\n" + ""; - final WebDriver driver = loadPage2(html); - - final WebElement textArea = driver.findElement(By.id("myTextArea")); - assertEquals(String.join("; ", expected) + "; ", textArea.getAttribute("value")); + loadPageVerifyTitle2(html, expected); } private void setLength(final String cssProp, final String prop, @@ -2349,10 +2462,7 @@ private void setLength(final String cssProp, final String prop, "\n" + "go\n" + "\n" - + "\n" + ""; - final WebDriver driver = loadPage2(html); - - final WebElement textArea = driver.findElement(By.id("myTextArea")); - assertEquals(String.join("; ", expected) + "; ", textArea.getAttribute("value")); + loadPageVerifyTitle2(html, expected); } /** @@ -2385,27 +2491,28 @@ public void getPropertyPriority() throws Exception { + "go\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2415,14 +2522,15 @@ public void getPropertyPriority() throws Exception { @Alerts({"black", "pink", "color: pink;", "color: pink;"}) public void caseInsensitive() throws Exception { final String html - = "First\n" + "
                          foo
                          "; @@ -2430,7 +2538,7 @@ public void caseInsensitive() throws Exception { final String style = getExpectedAlerts()[getExpectedAlerts().length - 1]; setExpectedAlerts(Arrays.copyOf(getExpectedAlerts(), getExpectedAlerts().length - 1)); - final WebDriver driver = loadPageWithAlerts2(html); + final WebDriver driver = loadPageVerifyTitle2(html); assertEquals(style, driver.findElement(By.id("div1")).getAttribute("style")); } @@ -2445,20 +2553,21 @@ public void pixelLeft() throws Exception { + "
                          a
                          \n" + "
                          b
                          \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2472,20 +2581,21 @@ public void pixelRight() throws Exception { + "
                          a
                          \n" + "
                          b
                          \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2499,20 +2609,21 @@ public void pixelTop() throws Exception { + "
                          a
                          \n" + "
                          b
                          \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2526,20 +2637,21 @@ public void pixelBottom() throws Exception { + "
                          a
                          \n" + "
                          b
                          \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2561,26 +2673,27 @@ public void interceptSetter() throws Exception { + "\n" + "
                          foo
                          \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2591,28 +2704,29 @@ public void interceptSetter() throws Exception { public void setToNull() throws Exception { final String html = "\n" + "\n" + "
                          foo
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2624,18 +2738,19 @@ public void setToNull() throws Exception { public void length() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2646,14 +2761,15 @@ public void length() throws Exception { public void boxSizing() throws Exception { final String html = "\n" + "\n" + "\n" @@ -2661,7 +2777,7 @@ public void boxSizing() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2674,14 +2790,15 @@ public void boxSizing() throws Exception { public void jQueryPixelPosition() throws Exception { final String html = "\n" + "\n" + "\n" @@ -2689,7 +2806,7 @@ public void jQueryPixelPosition() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2835,6 +2952,7 @@ private static boolean isDefaultGetterComputed(final List lines, final P public void widows() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2868,6 +2986,7 @@ public void widows() throws Exception { public void orphans() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2898,6 +3017,7 @@ public void orphans() throws Exception { public void position() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2936,20 +3056,21 @@ public void position() throws Exception { public void setStyle() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2961,20 +3082,21 @@ public void setStyle() throws Exception { public void in() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + "
                          foo
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleRuleTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleRuleTest.java index 01aa8bf35..30c12bafa 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleRuleTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleRuleTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheet2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheet2Test.java index 377ead96c..9ad9d8a74 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheet2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheet2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheet3Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheet3Test.java index 4c27f944c..3b2747160 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheet3Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheet3Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -153,26 +153,27 @@ private void charset( = "\n" + " \n" + "\n" + "\n" @@ -235,19 +236,7 @@ else if (BOM_UTF_16LE.equals(bom)) { } final WebDriver driver = loadPage2(html, URL_FIRST, htmlContentType, htmlResponseCharset, null); - if (expectedAlerts.length == 1) { - final List actualAlerts = getCollectedAlerts(DEFAULT_WAIT_TIME, driver, expectedAlerts.length); - assertEquals(1, actualAlerts.size()); - - final String msg = actualAlerts.get(0); - assertEquals(expectedAlerts[0], "Invalid token"); - assertTrue(msg, msg.contains("Invalid or unexpected token") - || msg.contains("illegal character") - || msg.contains("Ungültiges Zeichen")); - } - else { - verifyAlerts(DEFAULT_WAIT_TIME, driver, expectedAlerts); - } + assertEquals(String.join("§", getExpectedAlerts()) + '§', driver.getTitle()); } catch (final WebDriverException e) { if (!e.getCause().getMessage().contains("illegal character") diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheetTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheetTest.java index 7c8631d32..6988c8469 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheetTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSStyleSheetTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -55,24 +55,25 @@ public class CSSStyleSheetTest extends WebDriverTestCase { @Test @Alerts(DEFAULT = {"[object CSSStyleSheet]", "[object HTMLStyleElement]", "true", "undefined", "false"}, IE = {"[object CSSStyleSheet]", "[object HTMLStyleElement]", - "true", "[object HTMLStyleElement]", "true"}) + "true", "[object HTMLStyleElement]", "true"}) public void owningNodeOwningElement() throws Exception { - final String html = "test_hasChildNodes\n" + final String html = "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -83,7 +84,7 @@ public void owningNodeOwningElement() throws Exception { FF = {"4", "0", "1", "2", "3", "item", "length"}, FF78 = {"4", "0", "1", "2", "3", "item", "length"}) public void rules() throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -139,6 +141,7 @@ public void href() throws Exception { conn.setResponse(new URL(URL_FIRST, "style3.css"), "", MimeType.TEXT_CSS); conn.setResponse(new URL(URL_FIRST, "style4.css"), "", MimeType.TEXT_CSS); + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html, new URL(URL_FIRST, "test.html")); } @@ -147,9 +150,9 @@ public void href() throws Exception { */ @Test @Alerts(DEFAULT = {"8", "§§URL§§style1.css 1", "§§URL§§style2.css 0", - "§§URL§§style3.css 0", "§§URL§§style4.css 1", - "§§URL§§style5.css 1", "§§URL§§style6.css 0", - "§§URL§§style7.css 0", "§§URL§§style8.css 1"}, + "§§URL§§style3.css 0", "§§URL§§style4.css 1", + "§§URL§§style5.css 1", "§§URL§§style6.css 0", + "§§URL§§style7.css 0", "§§URL§§style8.css 1"}, IE = {"2", "§§URL§§style1.css 1", "§§URL§§style5.css 1"}) @NotYetImplemented(IE) public void hrefWrongContentType() throws Exception { @@ -185,6 +188,7 @@ public void hrefWrongContentType() throws Exception { conn.setResponse(new URL(URL_FIRST, "style7.css"), "div { color: red; }", MimeType.TEXT_PLAIN); conn.setResponse(new URL(URL_FIRST, "style8.css"), "div { color: red; }", ""); + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html, new URL(URL_FIRST, "test.html")); } @@ -199,18 +203,19 @@ public void addRule() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -218,7 +223,7 @@ public void addRule() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -231,17 +236,18 @@ public void addRuleInvalidRule() throws Exception { final String html = "\n" + "\n" + "\n" + " \n" @@ -249,7 +255,7 @@ public void addRuleInvalidRule() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -259,7 +265,7 @@ public void addRuleInvalidRule() throws Exception { @Test @Alerts("exception") public void addInvalidRule() throws Exception { - final String html = "foo\n" + "\n" @@ -306,7 +313,7 @@ public void insertRule() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -318,18 +325,19 @@ public void insertRuleInvalidRule() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -337,7 +345,7 @@ public void insertRuleInvalidRule() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -372,27 +380,28 @@ public void insertInvalidRule() throws Exception { @Test @Alerts({"2", "false", "false", "undefined", "1", "div", "color: red;"}) public void removeRule_deleteRule() throws Exception { - final String html = "foo\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -497,7 +506,8 @@ public void deleteRuleIgnoredLast() throws Exception { public void insertRuleLeadingWhitespace() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -642,11 +652,12 @@ public void css3_optional() throws Exception { } private void doTest(final String cssSelector, final String htmlSnippet) throws Exception { - final String html = "First\n" + final String html = "\n" + "\n" + "\n" @@ -663,7 +674,7 @@ private void doTest(final String cssSelector, final String htmlSnippet) throws E + "
                          \n" + htmlSnippet + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -881,13 +892,14 @@ private void mediaOnStyleTag(final String media) throws Exception { + "\n" + "
                          hello
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -932,7 +944,8 @@ public void mediaOnLinkTag_screen() throws Exception { @Test @Alerts(DEFAULT = {"block", "1"}, CHROME = {"block", "0"}, - EDGE = {"block", "0"}) + EDGE = {"block", "0"}, + FF = {"block", "0"}) public void mediaOnLinkTag_notScreen() throws Exception { mediaOnLinkTag("print"); } @@ -952,7 +965,8 @@ public void mediaOnLinkTag_multipleWithScreen() throws Exception { @Test @Alerts(DEFAULT = {"block", "1"}, CHROME = {"block", "0"}, - EDGE = {"block", "0"}) + EDGE = {"block", "0"}, + FF = {"block", "0"}) public void mediaOnLinkTag_multipleWithoutScreen() throws Exception { mediaOnLinkTag("print, projection, tv"); } @@ -964,15 +978,16 @@ private void mediaOnLinkTag(final String media) throws Exception { + "\n" + "
                          hello
                          \n" + ""; getMockWebConnection().setResponse(URL_SECOND, "div { display: none }", MimeType.TEXT_CSS); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1622,14 +1637,15 @@ private void mediaRule(final String media) throws Exception { + "\n" + "
                          hello
                          \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSTest.java index f0dc7fb33..45653d319 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,7 +19,6 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; -import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.WebDriverTestCase; /** @@ -34,7 +33,7 @@ public class CSSTest extends WebDriverTestCase { * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = {"function CSS() { [native code] }", "[object CSS]"}, + @Alerts(DEFAULT = {"[object CSS]", "undefined"}, FF = {"[object Object]", "undefined"}, FF78 = {"[object Object]", "undefined"}, IE = "Exception") @@ -57,12 +56,7 @@ public void global() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = "[object CSS]", - FF = "ctor Exception", - FF78 = "ctor Exception", - IE = "ctor Exception") - @HtmlUnitNYI(CHROME = "[object Object]", - EDGE = "[object Object]") + @Alerts("ctor Exception") public void constructor() throws Exception { final String html = "\n" diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclarationTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclarationTest.java index bb907d0a5..2c9685f33 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclarationTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclarationTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,6 +27,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; import com.gargoylesoftware.htmlunit.WebDriverTestCase; @@ -37,6 +38,7 @@ * @author Marc Guillemot * @author Ronald Brill * @author Frank Danek + * @author Dennis Duysak */ @RunWith(BrowserRunner.class) public class ComputedCSSStyleDeclarationTest extends WebDriverTestCase { @@ -50,10 +52,11 @@ public void cssFloat() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -61,7 +64,7 @@ public void cssFloat() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -143,27 +146,28 @@ public void stringPropertiesNotAttached() throws Exception { @Test @Alerts({"", "", "auto", "pointer"}) public void styleElement() throws Exception { - final String html = "foo\n" + final String html = "\n" + "\n" + "\n" + "
                          \n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -177,27 +181,28 @@ public void styleElement() throws Exception { @Test @Alerts({"", "", "pointer", "pointer"}) public void styleElement2() throws Exception { - final String html = "foo\n" + final String html = "\n" + "\n" + "\n" + "
                          \n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -209,11 +214,12 @@ public void zIndex() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -221,7 +227,7 @@ public void zIndex() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -235,13 +241,14 @@ public void styleAttributePreferredOverStylesheet() throws Exception { + "\n" + "
                          foo
                          \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -249,30 +256,31 @@ public void styleAttributePreferredOverStylesheet() throws Exception { */ @Test @Alerts({"1em 16px", "1em 16px", "1em 16px", "1em 16px", "1em 16px", "1em 16px", "1em 16px", "1em 16px", - "1em 16px", "1em 16px", "1em 16px", "1em 16px", "1em 16px", "1em 16px"}) + "1em 16px", "1em 16px", "1em 16px", "1em 16px", "1em 16px", "1em 16px"}) public void lengthsConvertedToPixels() throws Exception { final String html = "\n" + "
                          d
                          \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -303,11 +311,12 @@ public void defaultDisplayValues_A() throws Exception { + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -343,11 +352,12 @@ public void defaultDisplayValues_B() throws Exception { + "

                          \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -391,11 +401,12 @@ public void defaultDisplayValues_C() throws Exception { + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -438,11 +449,12 @@ public void defaultDisplayValues_D() throws Exception { + "
                          \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -476,11 +488,12 @@ public void defaultDisplayValues_E() throws Exception { + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -514,11 +527,12 @@ public void defaultDisplayValues_F() throws Exception { + "
                          \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -552,11 +566,12 @@ public void defaultDisplayValues_H() throws Exception { + "
                          \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -579,7 +594,7 @@ public void defaultDisplayValues_H() throws Exception { */ @Test @Alerts({"inline", "inline", "inline", "inline-block", "inline-block", - "inline-block", "inline-block", "inline-block", "inline-block", "inline"}) + "inline-block", "inline-block", "inline-block", "inline-block", "inline"}) public void defaultDisplayValues_I() throws Exception { final String html = "\n\n" + "

                          \n" @@ -600,11 +615,12 @@ public void defaultDisplayValues_I() throws Exception { + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -651,11 +667,12 @@ public void defaultDisplayValues_KL() throws Exception { + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -696,11 +713,12 @@ public void defaultDisplayValues_M() throws Exception { + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -746,11 +764,12 @@ public void defaultDisplayValues_NO() throws Exception { + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -785,11 +804,12 @@ public void defaultDisplayValues_PQ() throws Exception { + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -821,11 +841,12 @@ public void defaultDisplayValues_R() throws Exception { + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -842,9 +863,9 @@ public void defaultDisplayValues_R() throws Exception { */ @Test @Alerts(DEFAULT = {"inline", "inline", "none", "block", "inline-block", "inline", - "inline", "inline", "inline", "inline", "inline", "block", "inline"}, + "inline", "inline", "inline", "inline", "inline", "block", "inline"}, IE = {"inline", "inline", "none", "block", "inline-block", "inline", - "inline", "inline", "inline", "inline", "inline", "inline", "inline"}) + "inline", "inline", "inline", "inline", "inline", "inline", "inline"}) public void defaultDisplayValues_S() throws Exception { final String html = "\n\n" + "

                          \n" @@ -872,11 +893,12 @@ public void defaultDisplayValues_S() throws Exception { + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -903,9 +925,9 @@ public void defaultDisplayValues_S() throws Exception { */ @Test @Alerts(DEFAULT = {"table", "table-row-group", "table-cell", "inline-block", "table-footer-group", - "table-cell", "table-header-group", "inline", "table-row", "inline", "inline"}, + "table-cell", "table-header-group", "inline", "table-row", "inline", "inline"}, FF = {"table", "table-row-group", "table-cell", "inline", "table-footer-group", - "table-cell", "table-header-group", "inline", "table-row", "inline", "inline"}, + "table-cell", "table-header-group", "inline", "table-row", "inline", "inline"}, FF78 = {"table", "table-row-group", "table-cell", "inline", "table-footer-group", "table-cell", "table-header-group", "inline", "table-row", "inline", "inline"}) public void defaultDisplayValues_T() throws Exception { @@ -930,11 +952,12 @@ public void defaultDisplayValues_T() throws Exception { + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -974,11 +997,12 @@ public void defaultDisplayValues_UVW() throws Exception { + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1005,20 +1029,21 @@ public void backgroundColor() throws Exception { + "

                          \n" + "second div
                          \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1032,16 +1057,110 @@ public void fontSize() throws Exception { + "
                          inside
                          \n" + "
                          \n" + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts("9.6px") + @HtmlUnitNYI(CHROME = "10px", + EDGE = "10px", + FF = "10px", + FF78 = "10px", + IE = "10px") + public void fontSize2() throws Exception { + final String html = "\n" + + "
                          \n" + + "
                          inside
                          \n" + + "
                          \n" + + "\n" + + ""; + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts(DEFAULT = "4.11667px", + CHROME = "3.816px", + EDGE = "3.828px", + IE = "0px") + @HtmlUnitNYI(CHROME = "1px", + EDGE = "1px", + FF = "1px", + FF78 = "1px", + IE = "1px") + public void fontSizeVH() throws Exception { + final String html = "\n" + + "
                          \n" + + "
                          inside
                          \n" + + "
                          \n" + + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts(DEFAULT = "7.55px", + CHROME = "7.536px", + EDGE = "7.536px", + IE = "0px") + @HtmlUnitNYI(CHROME = "1px", + EDGE = "1px", + FF = "1px", + FF78 = "1px", + IE = "1px") + public void fontSizeVW() throws Exception { + final String html = "\n" + + "
                          \n" + + "
                          inside
                          \n" + + "
                          \n" + + "\n" + + ""; + loadPageVerifyTitle2(html); } /** @@ -1051,14 +1170,15 @@ public void fontSize() throws Exception { @Alerts({"111px", "auto"}) @NotYetImplemented public void computedWidthOfHiddenElements() throws Exception { - final String content = "foo\n" + "
                          \n" @@ -1066,7 +1186,7 @@ public void computedWidthOfHiddenElements() throws Exception { + " \n" + ""; - loadPageWithAlerts2(content); + loadPageVerifyTitle2(content); } /** @@ -1079,19 +1199,20 @@ public void computedWidthOfHiddenElements() throws Exception { public void inheritedImplicitly() throws Exception { final String html = "
                          a
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1109,10 +1230,11 @@ public void inheritedImplicitly() throws Exception { public void changeInParentClassNodeReferencedByRule() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1168,21 +1291,22 @@ public void widthAndHeightPercentagesAndEm() throws Exception { final String html = "\n" + "
                          \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1195,12 +1319,13 @@ public void widthAndHeightPercentagesHTML() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1226,10 +1351,11 @@ public void widthAndHeightInputElements() throws Exception { + " \n" + " \n" @@ -1245,7 +1371,7 @@ public void widthAndHeightInputElements() throws Exception { + " x('myTextarea');\n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1258,17 +1384,18 @@ public void widthAndHeightDisconnected() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1280,25 +1407,26 @@ public void widthAuto() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1309,20 +1437,21 @@ public void widthAuto() throws Exception { @NotYetImplemented public void getPropertyValue() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + "
                          foo
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1332,6 +1461,7 @@ public void getPropertyValue() throws Exception { @Alerts({"roman", "swiss", "roman"}) public void handleImportant() throws Exception { final String html = "\n" + " \n" @@ -1351,7 +1481,7 @@ public void handleImportant() throws Exception { + "
                          foo
                          \n" + "
                          foo
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1361,15 +1491,16 @@ public void handleImportant() throws Exception { @Alerts("0") public void offsetHeight_empty_tag() throws Exception { final String html = "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1379,15 +1510,16 @@ public void offsetHeight_empty_tag() throws Exception { @Alerts("0") public void offsetHeight_empty() throws Exception { final String html = "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPage2(html); } /** @@ -1397,15 +1529,16 @@ public void offsetHeight_empty() throws Exception { @Alerts("0") public void offsetHeight_displayNone() throws Exception { final String html = "\n" + "\n" + "\n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1415,15 +1548,16 @@ public void offsetHeight_displayNone() throws Exception { @Alerts("18") public void offsetHeight_with_content() throws Exception { final String html = "\n" + "\n" + "\n" + "
                          foo
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1433,15 +1567,16 @@ public void offsetHeight_with_content() throws Exception { @Alerts("18") public void offsetHeight_with_child() throws Exception { final String html = "\n" + "\n" + "\n" + "
                          foo
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1452,15 +1587,16 @@ public void offsetHeight_with_child() throws Exception { @NotYetImplemented public void offsetHeight_with_childHeight() throws Exception { final String html = "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1476,18 +1612,19 @@ public void offsetHeight_setting_height() throws Exception { + " }\n" + "\n" + "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1497,21 +1634,22 @@ public void offsetHeight_setting_height() throws Exception { @Alerts({"true", "false"}) public void scrollbarWidth() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1521,21 +1659,22 @@ public void scrollbarWidth() throws Exception { @Alerts({"true", "false"}) public void scrollbarHeight() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1549,21 +1688,22 @@ public void zIndexComputed() throws Exception { + " .abc { z-index: 10; color:green }\n" + "\n" + "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1571,12 +1711,14 @@ public void zIndexComputed() throws Exception { */ @Test @Alerts(DEFAULT = {"0", "0", "0", "0", "", "", "", "", "", "", "", "", - "104", "104", "104", "104", "auto", "100px", "100px", "3px", "block", "content-box", "0px", "0px"}, + "104", "104", "104", "104", "auto", "100px", "100px", + "3px", "block", "content-box", "0px", "0px"}, IE = {"0", "0", "0", "0", "auto", "100px", "100px", "3px", "block", "content-box", "0px", "0px", - "104", "104", "104", "104", "auto", "100px", "100px", "3px", "block", "content-box", "0px", "0px"}) + "104", "104", "104", "104", "auto", "100px", "100px", "3px", "block", "content-box", "0px", "0px"}) public void offsetWidth() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html, 2 * DEFAULT_WAIT_TIME); + loadPageVerifyTitle2(html); } /** @@ -1630,26 +1772,27 @@ public void cssFloat2() throws Exception { + " .abc { float: right }\n" + "\n" + "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1666,14 +1809,15 @@ public void offsetTopTableRows() throws Exception { + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1690,14 +1834,15 @@ public void offsetTopListItems() throws Exception { + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1714,13 +1859,14 @@ public void offsetLeftAfterTable() throws Exception { + "
                          Heho
                          \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1735,17 +1881,18 @@ public void custom() throws Exception { + " .abc { xyz: 1 }\n" + "\n" + "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1756,8 +1903,9 @@ public void custom() throws Exception { public void selector() throws Exception { final String html = "\n" + "\n" + "\n" @@ -1766,7 +1914,7 @@ public void selector() throws Exception { + "

                          p

                          \n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1779,34 +1927,35 @@ public void selector() throws Exception { @NotYetImplemented({FF, FF78}) public void marginLeftRight() throws Exception { final String html = "\n" + "\n" + "
                          \n" + "\n"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1818,6 +1967,7 @@ public void marginLeftRight() throws Exception { @NotYetImplemented({CHROME, EDGE, FF, FF78}) public void topLeft() throws Exception { final String html = "\n" + "\n" + "
                          \n" + "\n"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1855,14 +2005,15 @@ public void borderBoxAffectsOffsetWidth() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + "\n" + "\n"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1948,6 +2101,7 @@ public void offsetWidthWithDisplayInline() throws Exception { IE = "true") public void borderBoxAffectsOffsetWidth2() throws Exception { final String html = "\n" + "\n" + "\n" + "\n"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1975,6 +2129,7 @@ public void borderBoxAffectsOffsetWidth2() throws Exception { IE = "0") public void borderBoxAffectsOffsetHeight2() throws Exception { final String html = "\n" + "\n" + "\n" + "\n"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2004,19 +2159,20 @@ public void borderBoxAffectsOffsetHeight2() throws Exception { @NotYetImplemented({CHROME, EDGE, IE}) public void bodyOffsetWidth() throws Exception { final String html = "\n" + "\n" + "\n" + "\n"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2028,24 +2184,25 @@ public void bodyOffsetWidth() throws Exception { public void offsetHeightTable() throws Exception { final String html = "\n" + "\n" + "\n" + "
                          \n" + "\n"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2062,18 +2219,19 @@ public void height() throws Exception { + " }\n" + " \n" + "\n" + "\n" + "
                          A
                          \n" + "\n"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2086,16 +2244,17 @@ public void height() throws Exception { public void heightManyLines() throws Exception { final String html = "\n" + "\n" + "\n" @@ -2103,7 +2262,7 @@ public void heightManyLines() throws Exception { + "
                          This is a long string of text.
                          Some more text
                          \n" + "
                          This is a long string of text.
                          Some more text
                          and some more...
                          \n" + "\n"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2111,7 +2270,11 @@ public void heightManyLines() throws Exception { */ @Test @Alerts("0 17") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "0 0", + EDGE = "0 0", + FF = "0 0", + FF78 = "0 0", + IE = "0 0") public void iFrameInnerWidth() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -2167,7 +2331,7 @@ public void getHeightInvisible() throws Exception { + "
                          line 2
                          \n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2187,22 +2351,23 @@ public void pseudoBefore() throws Exception { + " /* ]]> */\n" + "\n" + "\n" + "\n" @@ -2210,7 +2375,7 @@ public void pseudoBefore() throws Exception { + "
                          Test
                          \n" + "
                          Test
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2225,10 +2390,11 @@ public void calculateContentHeightAfterSVG() throws Exception { + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2243,10 +2409,11 @@ public void combineStyles() throws Exception { + " div { margin: 10px 20px 30px 40px; }\n" + "\n" + "\n" + "\n" @@ -2254,7 +2421,7 @@ public void combineStyles() throws Exception { + "
                          \n" + "\n"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2269,10 +2436,11 @@ public void combineStylesImportant() throws Exception { + " div { margin: 10px 20px 30px 40px !important; }\n" + "\n" + "\n" + "\n" @@ -2280,7 +2448,7 @@ public void combineStylesImportant() throws Exception { + "
                          \n" + "\n"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2296,10 +2464,11 @@ public void combineStylesBrowserDefaults() throws Exception { + " div { margin: 20px; }\n" + "\n" + "\n" + "\n" @@ -2307,7 +2476,7 @@ public void combineStylesBrowserDefaults() throws Exception { + "
                          \n" + "\n"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2323,11 +2492,12 @@ public void boundingClientRectIgnoreSiblingWhitespace() throws Exception { + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2342,11 +2512,12 @@ public void boundingClientRectTopOnlyHasToTakeCareOfPreviousBlockSibling() throw + "tester\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2362,12 +2533,13 @@ public void offsetLeft() throws Exception { + "
                          Heho
                          \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedFontTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedFontTest.java index bb1f29233..ffdf23f4c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedFontTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedFontTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -44,24 +44,25 @@ public class ComputedFontTest extends WebDriverTestCase { public void fontSizeEm() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -69,17 +70,18 @@ public void fontSizeEm() throws Exception { */ @Test @Alerts(DEFAULT = {"", "", "", "", "", "", "", "", "", "", "", "", "", "", - "", "16px \"Times New Roman\"", - "", "normal", "", "normal", "", "400", "", "16px", "", "normal", "", "\"Times New Roman\""}, + "", "16px \"Times New Roman\"", + "", "normal", "", "normal", "", "400", "", "16px", "", "normal", "", "\"Times New Roman\""}, FF = {"", "", "", "", "", "", "", "", "", "", "", "", "", "", - "", "", "", "normal", "", "normal", "", "400", "", "16px", "", "normal", "", "serif"}, + "", "", "", "normal", "", "normal", "", "400", "", "16px", "", "normal", "", "serif"}, FF78 = {"", "", "", "", "", "", "", "", "", "", "", "", "", "", - "", "", "", "normal", "", "normal", "", "400", "", "16px", "", "normal", "", "serif"}, + "", "", "", "normal", "", "normal", "", "400", "", "16px", "", "normal", "", "serif"}, IE = {"", "", "", "normal", "", "normal", "", "400", "", "16px", "", "normal", "", "Times New Roman", - "", "", "", "normal", "", "normal", "", "400", "", "16px", "", "normal", "", "Times New Roman"}) + "", "", "", "normal", "", "normal", "", "400", "", "16px", "", "normal", "", "Times New Roman"}) public void fontInitial() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html, 2 * DEFAULT_WAIT_TIME); + loadPageVerifyTitle2(html); } /** @@ -115,15 +117,15 @@ public void fontInitial() throws Exception { */ @Test @Alerts(DEFAULT = {"15px arial, sans-serif", "15px arial, sans-serif", - "normal", "normal", - "oblique 15px arial, sans-serif", "italic 15px arial, sans-serif", - "oblique", "italic"}, + "normal", "normal", + "oblique 15px arial, sans-serif", "italic 15px arial, sans-serif", + "oblique", "italic"}, FF = {"15px arial, sans-serif", "", "normal", "normal", - "oblique 15px arial, sans-serif", "", "oblique", "oblique"}, + "oblique 15px arial, sans-serif", "", "oblique", "oblique"}, FF78 = {"15px arial, sans-serif", "", "normal", "normal", "oblique 15px arial, sans-serif", "", "oblique", "oblique"}, IE = {"15px/normal arial, sans-serif", "", "normal", "normal", - "oblique 15px/normal arial, sans-serif", "", "oblique", "oblique"}) + "oblique 15px/normal arial, sans-serif", "", "oblique", "oblique"}) @NotYetImplemented public void fontStyle() throws Exception { font("15px arial, sans-serif", "fontStyle", "oblique"); @@ -132,6 +134,7 @@ public void fontStyle() throws Exception { private void font(final String fontToSet, final String property, final String value) throws Exception { String html = "\n" + "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -175,7 +178,7 @@ public void wrongFontFamily() throws Exception { */ @Test @Alerts(DEFAULT = {"1px xyz", "1px xyz", - "xyz", "xyz", "1px abc", "1px abc", "abc", "abc"}, + "xyz", "xyz", "1px abc", "1px abc", "abc", "abc"}, FF = {"1px xyz", "", "xyz", "xyz", "1px abc", "", "abc", "abc"}, FF78 = {"1px xyz", "", "xyz", "xyz", "1px abc", "", "abc", "abc"}, IE = {"1px/normal xyz", "", "xyz", "xyz", "1px/normal abc", "", "abc", "abc"}) @@ -188,7 +191,7 @@ public void minimalFontFamily() throws Exception { */ @Test @Alerts(DEFAULT = {"", "16px \"Times New Roman\"", - "", "\"Times New Roman\"", "", "16px abc", "abc", "abc"}, + "", "\"Times New Roman\"", "", "16px abc", "abc", "abc"}, FF = {"", "", "", "serif", "", "", "abc", "abc"}, FF78 = {"", "", "", "serif", "", "", "abc", "abc"}, IE = {"", "", "", "Times New Roman", "", "", "abc", "abc"}) @@ -202,7 +205,7 @@ public void minimalFontFamilyReversed() throws Exception { */ @Test @Alerts(DEFAULT = {"1px / 2px xyz", "1px / 2px xyz", - "2px", "2px", "1px xyz", "1px xyz", "normal", "normal"}, + "2px", "2px", "1px xyz", "1px xyz", "normal", "normal"}, FF = {"1px / 2px xyz", "", "2px", "2px", "1px xyz", "", "normal", "normal"}, FF78 = {"1px / 2px xyz", "", "2px", "2px", "1px xyz", "", "normal", "normal"}, IE = {"1px/2px xyz", "", "2px", "2px", "1px/normal xyz", "", "normal", "normal"}) @@ -216,7 +219,7 @@ public void minimalLineHeight() throws Exception { */ @Test @Alerts(DEFAULT = {"1px / 2px xyz", "1px / 2px xyz", - "2px", "2px", "1px xyz", "1px xyz", "normal", "normal"}, + "2px", "2px", "1px xyz", "1px xyz", "normal", "normal"}, FF = {"1px / 2px xyz", "", "2px", "2px", "1px xyz", "", "normal", "normal"}, FF78 = {"1px / 2px xyz", "", "2px", "2px", "1px xyz", "", "normal", "normal"}, IE = {"", "", "", "normal", "", "", "normal", "normal"}) @@ -230,7 +233,7 @@ public void minimalLineHeightSpace() throws Exception { */ @Test @Alerts(DEFAULT = {"1px / 2px xyz", "1px / 2px xyz", - "2px", "2px", "1px xyz", "1px xyz", "normal", "normal"}, + "2px", "2px", "1px xyz", "1px xyz", "normal", "normal"}, FF = {"1px / 2px xyz", "", "2px", "2px", "1px xyz", "", "normal", "normal"}, FF78 = {"1px / 2px xyz", "", "2px", "2px", "1px xyz", "", "normal", "normal"}, IE = {"", "", "", "normal", "", "", "normal", "normal"}) @@ -244,7 +247,7 @@ public void minimalLineHeightSpace2() throws Exception { */ @Test @Alerts(DEFAULT = {"1px / 2px xyz", "1px / 2px xyz", - "2px", "2px", "1px xyz", "1px xyz", "normal", "normal"}, + "2px", "2px", "1px xyz", "1px xyz", "normal", "normal"}, FF = {"1px / 2px xyz", "", "2px", "2px", "1px xyz", "", "normal", "normal"}, FF78 = {"1px / 2px xyz", "", "2px", "2px", "1px xyz", "", "normal", "normal"}, IE = {"1px/2px xyz", "", "2px", "2px", "1px/normal xyz", "", "normal", "normal"}) @@ -258,7 +261,7 @@ public void minimalLineHeightSpace3() throws Exception { */ @Test @Alerts(DEFAULT = {"1px / 2px xyz", "1px / 2px xyz", - "2px", "2px", "1px xyz", "1px xyz", "normal", "normal"}, + "2px", "2px", "1px xyz", "1px xyz", "normal", "normal"}, FF = {"1px / 2px xyz", "", "2px", "2px", "1px xyz", "", "normal", "normal"}, FF78 = {"1px / 2px xyz", "", "2px", "2px", "1px xyz", "", "normal", "normal"}, IE = {"1px/2px xyz", "", "2px", "2px", "1px/normal xyz", "", "normal", "normal"}) @@ -266,5 +269,4 @@ public void minimalLineHeightSpace3() throws Exception { public void minimalLineHeightSpace4() throws Exception { font("1px /2px xyz", "lineHeight", "normal"); } - } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/MediaQueryListTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/MediaQueryListTest.java index 4c696cc6f..e69b6ba25 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/MediaQueryListTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/MediaQueryListTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributesIterable2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributesIterable2Test.java index 8138ff8d8..577110d11 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributesIterable2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributesIterable2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributesIterableTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributesIterableTest.java index 66a4a2c66..246266498 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributesIterableTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributesIterableTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -93,20 +93,22 @@ private void test(final String propertyName) throws Exception { final String html = "\n" + + "\n" + + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributesTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributesTest.java index 4f8a72c59..35195b65b 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributesTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleAttributesTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleMediaTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleMediaTest.java index f127ec83b..988925d30 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleMediaTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleMediaTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleSheetListTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleSheetListTest.java index b540988dc..734aa2c56 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleSheetListTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/StyleSheetListTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/property/ElementClientWidthTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/property/ElementClientWidthTest.java index ffc5ed090..daaa762f5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/property/ElementClientWidthTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/property/ElementClientWidthTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,18 +14,12 @@ */ package com.gargoylesoftware.htmlunit.javascript.host.css.property; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.CHROME; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.EDGE; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF78; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE; - import org.junit.Test; import org.junit.runner.RunWith; import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; -import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.WebDriverTestCase; /** @@ -45,27 +39,13 @@ private static String test(final String tagName) { return headElementClosesItself(tagName); } - if ("title".equals(tagName)) { - // title is a bit special, we have to provide at least - // one closing tab otherwise title spans to the end of the file - return "\n" - + "\n" - + "<title>\n" - + "\n" - + ""; - } - if ("frame".equals(tagName)) { return "\n" + "\n" + "\n" @@ -76,9 +56,10 @@ private static String test(final String tagName) { if ("script".equals(tagName)) { return "\n" + "\n" + "\n" @@ -89,9 +70,10 @@ private static String test(final String tagName) { if ("frameset".equals(tagName)) { return "\n" + "\n" + "\n" @@ -102,9 +84,10 @@ private static String test(final String tagName) { return "\n" + "\n" + "\n" @@ -115,9 +98,10 @@ private static String test(final String tagName) { private static String testInput(final String type) { return "\n" + "\n" + "\n" @@ -129,9 +113,10 @@ private static String headElementClosesItself(final String tagName) { return "\n" + "<" + tagName + " id='outer'><" + tagName + ">\n" + "\n" + "\n" @@ -146,7 +131,7 @@ private static String headElementClosesItself(final String tagName) { @Test @Alerts("0") public void abbr() throws Exception { - loadPageWithAlerts2(test("abbr")); + loadPageVerifyTitle2(test("abbr")); } /** @@ -157,7 +142,7 @@ public void abbr() throws Exception { @Test @Alerts("0") public void acronym() throws Exception { - loadPageWithAlerts2(test("acronym")); + loadPageVerifyTitle2(test("acronym")); } /** @@ -168,7 +153,7 @@ public void acronym() throws Exception { @Test @Alerts("0") public void a() throws Exception { - loadPageWithAlerts2(test("a")); + loadPageVerifyTitle2(test("a")); } /** @@ -179,7 +164,7 @@ public void a() throws Exception { @Test @Alerts("-16") public void address() throws Exception { - loadPageWithAlerts2(test("address")); + loadPageVerifyTitle2(test("address")); } /** @@ -190,7 +175,7 @@ public void address() throws Exception { @Test @Alerts("0") public void applet() throws Exception { - loadPageWithAlerts2(test("applet")); + loadPageVerifyTitle2(test("applet")); } /** @@ -201,7 +186,7 @@ public void applet() throws Exception { @Test @Alerts("0") public void area() throws Exception { - loadPageWithAlerts2(test("area")); + loadPageVerifyTitle2(test("area")); } /** @@ -212,7 +197,7 @@ public void area() throws Exception { @Test @Alerts("-16") public void article() throws Exception { - loadPageWithAlerts2(test("article")); + loadPageVerifyTitle2(test("article")); } /** @@ -223,7 +208,7 @@ public void article() throws Exception { @Test @Alerts("-16") public void aside() throws Exception { - loadPageWithAlerts2(test("aside")); + loadPageVerifyTitle2(test("aside")); } /** @@ -234,7 +219,7 @@ public void aside() throws Exception { @Test @Alerts("0") public void audio() throws Exception { - loadPageWithAlerts2(test("audio")); + loadPageVerifyTitle2(test("audio")); } /** @@ -245,7 +230,7 @@ public void audio() throws Exception { @Test @Alerts("0") public void bgsound() throws Exception { - loadPageWithAlerts2(test("bgsound")); + loadPageVerifyTitle2(test("bgsound")); } /** @@ -256,7 +241,7 @@ public void bgsound() throws Exception { @Test @Alerts("0") public void base() throws Exception { - loadPageWithAlerts2(test("base")); + loadPageVerifyTitle2(test("base")); } /** @@ -267,7 +252,7 @@ public void base() throws Exception { @Test @Alerts("0") public void basefont() throws Exception { - loadPageWithAlerts2(test("basefont")); + loadPageVerifyTitle2(test("basefont")); } /** @@ -278,7 +263,7 @@ public void basefont() throws Exception { @Test @Alerts("0") public void bdi() throws Exception { - loadPageWithAlerts2(test("bdi")); + loadPageVerifyTitle2(test("bdi")); } /** @@ -289,7 +274,7 @@ public void bdi() throws Exception { @Test @Alerts("0") public void bdo() throws Exception { - loadPageWithAlerts2(test("bdo")); + loadPageVerifyTitle2(test("bdo")); } /** @@ -300,7 +285,7 @@ public void bdo() throws Exception { @Test @Alerts("0") public void big() throws Exception { - loadPageWithAlerts2(test("big")); + loadPageVerifyTitle2(test("big")); } /** @@ -311,7 +296,7 @@ public void big() throws Exception { @Test @Alerts("0") public void blink() throws Exception { - loadPageWithAlerts2(test("blink")); + loadPageVerifyTitle2(test("blink")); } /** @@ -321,9 +306,13 @@ public void blink() throws Exception { */ @Test @Alerts("-96") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "-16", + EDGE = "-16", + FF = "-16", + FF78 = "-16", + IE = "-16") public void blockquote() throws Exception { - loadPageWithAlerts2(test("blockquote")); + loadPageVerifyTitle2(test("blockquote")); } /** @@ -334,7 +323,7 @@ public void blockquote() throws Exception { @Test @Alerts("0") public void body() throws Exception { - loadPageWithAlerts2(test("body")); + loadPageVerifyTitle2(test("body")); } /** @@ -345,7 +334,7 @@ public void body() throws Exception { @Test @Alerts("0") public void b() throws Exception { - loadPageWithAlerts2(test("b")); + loadPageVerifyTitle2(test("b")); } /** @@ -356,7 +345,7 @@ public void b() throws Exception { @Test @Alerts("0") public void br() throws Exception { - loadPageWithAlerts2(test("br")); + loadPageVerifyTitle2(test("br")); } /** @@ -369,9 +358,13 @@ public void br() throws Exception { FF = "16", FF78 = "16", IE = "20") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "10", + EDGE = "10", + FF = "10", + FF78 = "10", + IE = "10") public void button() throws Exception { - loadPageWithAlerts2(test("button")); + loadPageVerifyTitle2(test("button")); } /** @@ -382,7 +375,7 @@ public void button() throws Exception { @Test @Alerts("300") public void canvas() throws Exception { - loadPageWithAlerts2(test("canvas")); + loadPageVerifyTitle2(test("canvas")); } /** @@ -393,7 +386,7 @@ public void canvas() throws Exception { @Test @Alerts("null") public void caption() throws Exception { - loadPageWithAlerts2(test("caption")); + loadPageVerifyTitle2(test("caption")); } /** @@ -404,7 +397,7 @@ public void caption() throws Exception { @Test @Alerts("-16") public void center() throws Exception { - loadPageWithAlerts2(test("center")); + loadPageVerifyTitle2(test("center")); } /** @@ -415,7 +408,7 @@ public void center() throws Exception { @Test @Alerts("0") public void cite() throws Exception { - loadPageWithAlerts2(test("cite")); + loadPageVerifyTitle2(test("cite")); } /** @@ -426,7 +419,7 @@ public void cite() throws Exception { @Test @Alerts("0") public void code() throws Exception { - loadPageWithAlerts2(test("code")); + loadPageVerifyTitle2(test("code")); } /** @@ -437,7 +430,7 @@ public void code() throws Exception { @Test @Alerts("0") public void command() throws Exception { - loadPageWithAlerts2(test("command")); + loadPageVerifyTitle2(test("command")); } /** @@ -448,7 +441,7 @@ public void command() throws Exception { @Test @Alerts("0") public void datalist() throws Exception { - loadPageWithAlerts2(test("datalist")); + loadPageVerifyTitle2(test("datalist")); } /** @@ -460,7 +453,7 @@ public void datalist() throws Exception { @Alerts(DEFAULT = "-16", IE = "0") public void details() throws Exception { - loadPageWithAlerts2(test("details")); + loadPageVerifyTitle2(test("details")); } /** @@ -471,7 +464,7 @@ public void details() throws Exception { @Test @Alerts("0") public void dfn() throws Exception { - loadPageWithAlerts2(test("dfn")); + loadPageVerifyTitle2(test("dfn")); } /** @@ -481,9 +474,13 @@ public void dfn() throws Exception { */ @Test @Alerts("-56") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "-16", + EDGE = "-16", + FF = "-16", + FF78 = "-16", + IE = "-16") public void dd() throws Exception { - loadPageWithAlerts2(test("dd")); + loadPageVerifyTitle2(test("dd")); } /** @@ -494,7 +491,7 @@ public void dd() throws Exception { @Test @Alerts("0") public void del() throws Exception { - loadPageWithAlerts2(test("del")); + loadPageVerifyTitle2(test("del")); } /** @@ -505,7 +502,7 @@ public void del() throws Exception { @Test @Alerts("0") public void dialog() throws Exception { - loadPageWithAlerts2(test("dialog")); + loadPageVerifyTitle2(test("dialog")); } /** @@ -516,7 +513,7 @@ public void dialog() throws Exception { @Test @Alerts("-16") public void dir() throws Exception { - loadPageWithAlerts2(test("dir")); + loadPageVerifyTitle2(test("dir")); } /** @@ -527,7 +524,7 @@ public void dir() throws Exception { @Test @Alerts("-16") public void div() throws Exception { - loadPageWithAlerts2(test("div")); + loadPageVerifyTitle2(test("div")); } /** @@ -538,7 +535,7 @@ public void div() throws Exception { @Test @Alerts("-16") public void dl() throws Exception { - loadPageWithAlerts2(test("dl")); + loadPageVerifyTitle2(test("dl")); } /** @@ -549,7 +546,7 @@ public void dl() throws Exception { @Test @Alerts("-16") public void dt() throws Exception { - loadPageWithAlerts2(test("dt")); + loadPageVerifyTitle2(test("dt")); } /** @@ -560,9 +557,9 @@ public void dt() throws Exception { @Test @Alerts(DEFAULT = "0", IE = "16") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "0") public void embed() throws Exception { - loadPageWithAlerts2(test("embed")); + loadPageVerifyTitle2(test("embed")); } /** @@ -573,7 +570,7 @@ public void embed() throws Exception { @Test @Alerts("0") public void em() throws Exception { - loadPageWithAlerts2(test("em")); + loadPageVerifyTitle2(test("em")); } /** @@ -584,9 +581,13 @@ public void em() throws Exception { @Test @Alerts(DEFAULT = "-24", IE = "-22") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "-16", + EDGE = "-16", + FF = "-16", + FF78 = "-16", + IE = "-16") public void fieldset() throws Exception { - loadPageWithAlerts2(test("fieldset")); + loadPageVerifyTitle2(test("fieldset")); } /** @@ -597,7 +598,7 @@ public void fieldset() throws Exception { @Test @Alerts("-16") public void figcaption() throws Exception { - loadPageWithAlerts2(test("figcaption")); + loadPageVerifyTitle2(test("figcaption")); } /** @@ -607,9 +608,13 @@ public void figcaption() throws Exception { */ @Test @Alerts("-96") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "-16", + EDGE = "-16", + FF = "-16", + FF78 = "-16", + IE = "-16") public void figure() throws Exception { - loadPageWithAlerts2(test("figure")); + loadPageVerifyTitle2(test("figure")); } /** @@ -620,7 +625,7 @@ public void figure() throws Exception { @Test @Alerts("0") public void font() throws Exception { - loadPageWithAlerts2(test("font")); + loadPageVerifyTitle2(test("font")); } /** @@ -631,7 +636,7 @@ public void font() throws Exception { @Test @Alerts("-16") public void footer() throws Exception { - loadPageWithAlerts2(test("footer")); + loadPageVerifyTitle2(test("footer")); } /** @@ -642,7 +647,7 @@ public void footer() throws Exception { @Test @Alerts("-16") public void form() throws Exception { - loadPageWithAlerts2(test("form")); + loadPageVerifyTitle2(test("form")); } /** @@ -653,7 +658,7 @@ public void form() throws Exception { @Test @Alerts("0") public void frame() throws Exception { - loadPageWithAlerts2(test("frame")); + loadPageVerifyTitle2(test("frame")); } /** @@ -664,7 +669,7 @@ public void frame() throws Exception { @Test @Alerts("0") public void frameset() throws Exception { - loadPageWithAlerts2(test("frameset")); + loadPageVerifyTitle2(test("frameset")); } /** @@ -675,7 +680,7 @@ public void frameset() throws Exception { @Test @Alerts("-16") public void h1() throws Exception { - loadPageWithAlerts2(test("h1")); + loadPageVerifyTitle2(test("h1")); } /** @@ -686,7 +691,7 @@ public void h1() throws Exception { @Test @Alerts("-16") public void h2() throws Exception { - loadPageWithAlerts2(test("h2")); + loadPageVerifyTitle2(test("h2")); } /** @@ -697,7 +702,7 @@ public void h2() throws Exception { @Test @Alerts("-16") public void h3() throws Exception { - loadPageWithAlerts2(test("h3")); + loadPageVerifyTitle2(test("h3")); } /** @@ -708,7 +713,7 @@ public void h3() throws Exception { @Test @Alerts("-16") public void h4() throws Exception { - loadPageWithAlerts2(test("h4")); + loadPageVerifyTitle2(test("h4")); } /** @@ -719,7 +724,7 @@ public void h4() throws Exception { @Test @Alerts("-16") public void h5() throws Exception { - loadPageWithAlerts2(test("h5")); + loadPageVerifyTitle2(test("h5")); } /** @@ -730,7 +735,7 @@ public void h5() throws Exception { @Test @Alerts("-16") public void h6() throws Exception { - loadPageWithAlerts2(test("h6")); + loadPageVerifyTitle2(test("h6")); } /** @@ -741,7 +746,7 @@ public void h6() throws Exception { @Test @Alerts("null") public void head() throws Exception { - loadPageWithAlerts2(test("head")); + loadPageVerifyTitle2(test("head")); } /** @@ -752,7 +757,7 @@ public void head() throws Exception { @Test @Alerts("-16") public void header() throws Exception { - loadPageWithAlerts2(test("header")); + loadPageVerifyTitle2(test("header")); } /** @@ -763,9 +768,13 @@ public void header() throws Exception { @Test @Alerts(DEFAULT = "-18", IE = "0") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "-16", + EDGE = "-16", + FF = "-16", + FF78 = "-16", + IE = "-16") public void hr() throws Exception { - loadPageWithAlerts2(test("hr")); + loadPageVerifyTitle2(test("hr")); } /** @@ -776,7 +785,7 @@ public void hr() throws Exception { @Test @Alerts("0") public void html() throws Exception { - loadPageWithAlerts2(test("html")); + loadPageVerifyTitle2(test("html")); } /** @@ -786,9 +795,13 @@ public void html() throws Exception { */ @Test @Alerts("300") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "0", + EDGE = "0", + FF = "0", + FF78 = "0", + IE = "0") public void iframe() throws Exception { - loadPageWithAlerts2(test("iframe")); + loadPageVerifyTitle2(test("iframe")); } /** @@ -799,7 +812,7 @@ public void iframe() throws Exception { @Test @Alerts("0") public void q() throws Exception { - loadPageWithAlerts2(test("q")); + loadPageVerifyTitle2(test("q")); } /** @@ -810,9 +823,9 @@ public void q() throws Exception { @Test @Alerts(DEFAULT = "0", IE = "28") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "0") public void image() throws Exception { - loadPageWithAlerts2(test("image")); + loadPageVerifyTitle2(test("image")); } /** @@ -823,9 +836,9 @@ public void image() throws Exception { @Test @Alerts(DEFAULT = "0", IE = "28") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "0") public void img() throws Exception { - loadPageWithAlerts2(test("img")); + loadPageVerifyTitle2(test("img")); } /** @@ -836,7 +849,7 @@ public void img() throws Exception { @Test @Alerts("0") public void ins() throws Exception { - loadPageWithAlerts2(test("ins")); + loadPageVerifyTitle2(test("ins")); } /** @@ -847,9 +860,13 @@ public void ins() throws Exception { @Test @Alerts(DEFAULT = "0", IE = "143") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "30", + EDGE = "30", + FF = "30", + FF78 = "30", + IE = "0") public void isindex() throws Exception { - loadPageWithAlerts2(test("isindex")); + loadPageVerifyTitle2(test("isindex")); } /** @@ -860,7 +877,7 @@ public void isindex() throws Exception { @Test @Alerts("0") public void i() throws Exception { - loadPageWithAlerts2(test("i")); + loadPageVerifyTitle2(test("i")); } /** @@ -871,7 +888,7 @@ public void i() throws Exception { @Test @Alerts("0") public void kbd() throws Exception { - loadPageWithAlerts2(test("kbd")); + loadPageVerifyTitle2(test("kbd")); } /** @@ -880,7 +897,7 @@ public void kbd() throws Exception { @Test @Alerts("0") public void keygen() throws Exception { - loadPageWithAlerts2(test("keygen")); + loadPageVerifyTitle2(test("keygen")); } /** @@ -891,7 +908,7 @@ public void keygen() throws Exception { @Test @Alerts("0") public void label() throws Exception { - loadPageWithAlerts2(test("label")); + loadPageVerifyTitle2(test("label")); } /** @@ -904,7 +921,7 @@ public void label() throws Exception { CHROME = "-16", EDGE = "-16") public void layer() throws Exception { - loadPageWithAlerts2(test("layer")); + loadPageVerifyTitle2(test("layer")); } /** @@ -915,9 +932,9 @@ public void layer() throws Exception { @Test @Alerts(DEFAULT = "-16", IE = "8") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "0") public void legend() throws Exception { - loadPageWithAlerts2(test("legend")); + loadPageVerifyTitle2(test("legend")); } /** @@ -928,9 +945,9 @@ public void legend() throws Exception { @Test @Alerts(DEFAULT = "-16", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "-16") public void listing() throws Exception { - loadPageWithAlerts2(test("listing")); + loadPageVerifyTitle2(test("listing")); } /** @@ -940,9 +957,13 @@ public void listing() throws Exception { */ @Test @Alerts("-16") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "0", + EDGE = "0", + FF = "0", + FF78 = "0", + IE = "0") public void li() throws Exception { - loadPageWithAlerts2(test("li")); + loadPageVerifyTitle2(test("li")); } /** @@ -953,7 +974,7 @@ public void li() throws Exception { @Test @Alerts("0") public void link() throws Exception { - loadPageWithAlerts2(test("link")); + loadPageVerifyTitle2(test("link")); } /** @@ -965,7 +986,7 @@ public void link() throws Exception { @Alerts(DEFAULT = "-16", IE = "0") public void main() throws Exception { - loadPageWithAlerts2(test("main")); + loadPageVerifyTitle2(test("main")); } /** @@ -976,7 +997,7 @@ public void main() throws Exception { @Test @Alerts("0") public void map() throws Exception { - loadPageWithAlerts2(test("map")); + loadPageVerifyTitle2(test("map")); } /** @@ -987,9 +1008,13 @@ public void map() throws Exception { @Test @Alerts(DEFAULT = "-16", IE = "0") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "0", + EDGE = "0", + FF = "0", + FF78 = "0", + IE = "-16") public void marquee() throws Exception { - loadPageWithAlerts2(test("marquee")); + loadPageVerifyTitle2(test("marquee")); } /** @@ -1000,7 +1025,7 @@ public void marquee() throws Exception { @Test @Alerts("0") public void mark() throws Exception { - loadPageWithAlerts2(test("mark")); + loadPageVerifyTitle2(test("mark")); } /** @@ -1011,7 +1036,7 @@ public void mark() throws Exception { @Test @Alerts("-16") public void menu() throws Exception { - loadPageWithAlerts2(test("menu")); + loadPageVerifyTitle2(test("menu")); } /** @@ -1022,7 +1047,7 @@ public void menu() throws Exception { @Test @Alerts("0") public void menuitem() throws Exception { - loadPageWithAlerts2(test("menuitem")); + loadPageVerifyTitle2(test("menuitem")); } /** @@ -1033,7 +1058,7 @@ public void menuitem() throws Exception { @Test @Alerts("0") public void meta() throws Exception { - loadPageWithAlerts2(test("meta")); + loadPageVerifyTitle2(test("meta")); } /** @@ -1044,9 +1069,12 @@ public void meta() throws Exception { @Test @Alerts(DEFAULT = "80", IE = "0") - @NotYetImplemented({CHROME, EDGE, FF, FF78}) + @HtmlUnitNYI(CHROME = "0", + EDGE = "0", + FF = "0", + FF78 = "0") public void meter() throws Exception { - loadPageWithAlerts2(test("meter")); + loadPageVerifyTitle2(test("meter")); } /** @@ -1059,7 +1087,7 @@ public void meter() throws Exception { FF = "-16", FF78 = "-16") public void multicol() throws Exception { - loadPageWithAlerts2(test("multicol")); + loadPageVerifyTitle2(test("multicol")); } /** @@ -1070,7 +1098,7 @@ public void multicol() throws Exception { @Test @Alerts("0") public void nobr() throws Exception { - loadPageWithAlerts2(test("nobr")); + loadPageVerifyTitle2(test("nobr")); } /** @@ -1081,7 +1109,7 @@ public void nobr() throws Exception { @Test @Alerts("-16") public void nav() throws Exception { - loadPageWithAlerts2(test("nav")); + loadPageVerifyTitle2(test("nav")); } /** @@ -1092,7 +1120,7 @@ public void nav() throws Exception { @Test @Alerts("0") public void nextid() throws Exception { - loadPageWithAlerts2(test("nextid")); + loadPageVerifyTitle2(test("nextid")); } /** @@ -1103,7 +1131,7 @@ public void nextid() throws Exception { @Test @Alerts("0") public void noembed() throws Exception { - loadPageWithAlerts2(test("noembed")); + loadPageVerifyTitle2(test("noembed")); } /** @@ -1114,7 +1142,7 @@ public void noembed() throws Exception { @Test @Alerts("0") public void noframes() throws Exception { - loadPageWithAlerts2(test("noframes")); + loadPageVerifyTitle2(test("noframes")); } /** @@ -1125,7 +1153,7 @@ public void noframes() throws Exception { @Test @Alerts("0") public void nolayer() throws Exception { - loadPageWithAlerts2(test("nolayer")); + loadPageVerifyTitle2(test("nolayer")); } /** @@ -1135,9 +1163,10 @@ public void nolayer() throws Exception { */ @Test @Alerts("0") - @NotYetImplemented({CHROME, EDGE}) + @HtmlUnitNYI(CHROME = "100", + EDGE = "100") public void noscript() throws Exception { - loadPageWithAlerts2(test("noscript")); + loadPageVerifyTitle2(test("noscript")); } /** @@ -1148,7 +1177,7 @@ public void noscript() throws Exception { @Test @Alerts("0") public void object() throws Exception { - loadPageWithAlerts2(test("object")); + loadPageVerifyTitle2(test("object")); } /** @@ -1159,7 +1188,7 @@ public void object() throws Exception { @Test @Alerts("-16") public void ol() throws Exception { - loadPageWithAlerts2(test("ol")); + loadPageVerifyTitle2(test("ol")); } /** @@ -1171,7 +1200,7 @@ public void ol() throws Exception { @Alerts(DEFAULT = "-16", IE = "0") public void optgroup() throws Exception { - loadPageWithAlerts2(test("optgroup")); + loadPageVerifyTitle2(test("optgroup")); } /** @@ -1183,7 +1212,7 @@ public void optgroup() throws Exception { @Alerts(DEFAULT = "-16", IE = "0") public void option() throws Exception { - loadPageWithAlerts2(test("option")); + loadPageVerifyTitle2(test("option")); } /** @@ -1194,7 +1223,7 @@ public void option() throws Exception { @Test @Alerts("0") public void output() throws Exception { - loadPageWithAlerts2(test("output")); + loadPageVerifyTitle2(test("output")); } /** @@ -1205,7 +1234,7 @@ public void output() throws Exception { @Test @Alerts("-16") public void p() throws Exception { - loadPageWithAlerts2(test("p")); + loadPageVerifyTitle2(test("p")); } /** @@ -1216,7 +1245,7 @@ public void p() throws Exception { @Test @Alerts("0") public void param() throws Exception { - loadPageWithAlerts2(test("param")); + loadPageVerifyTitle2(test("param")); } /** @@ -1227,7 +1256,7 @@ public void param() throws Exception { @Test @Alerts("-16") public void plaintext() throws Exception { - loadPageWithAlerts2(test("plaintext")); + loadPageVerifyTitle2(test("plaintext")); } /** @@ -1238,7 +1267,7 @@ public void plaintext() throws Exception { @Test @Alerts("-16") public void pre() throws Exception { - loadPageWithAlerts2(test("pre")); + loadPageVerifyTitle2(test("pre")); } /** @@ -1249,9 +1278,13 @@ public void pre() throws Exception { @Test @Alerts(DEFAULT = "160", IE = "280") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "0", + EDGE = "0", + FF = "0", + FF78 = "0", + IE = "0") public void progress() throws Exception { - loadPageWithAlerts2(test("progress")); + loadPageVerifyTitle2(test("progress")); } /** @@ -1262,7 +1295,7 @@ public void progress() throws Exception { @Test @Alerts("0") public void ruby() throws Exception { - loadPageWithAlerts2(test("ruby")); + loadPageVerifyTitle2(test("ruby")); } /** @@ -1273,7 +1306,7 @@ public void ruby() throws Exception { @Test @Alerts("0") public void rp() throws Exception { - loadPageWithAlerts2(test("rp")); + loadPageVerifyTitle2(test("rp")); } /** @@ -1283,9 +1316,10 @@ public void rp() throws Exception { */ @Test @Alerts("0") - @NotYetImplemented({CHROME, EDGE}) + @HtmlUnitNYI(CHROME = "-16", + EDGE = "-16") public void rt() throws Exception { - loadPageWithAlerts2(test("rt")); + loadPageVerifyTitle2(test("rt")); } /** @@ -1296,7 +1330,7 @@ public void rt() throws Exception { @Test @Alerts("0") public void s() throws Exception { - loadPageWithAlerts2(test("s")); + loadPageVerifyTitle2(test("s")); } /** @@ -1307,7 +1341,7 @@ public void s() throws Exception { @Test @Alerts("0") public void samp() throws Exception { - loadPageWithAlerts2(test("samp")); + loadPageVerifyTitle2(test("samp")); } /** @@ -1318,7 +1352,7 @@ public void samp() throws Exception { @Test @Alerts("0") public void script() throws Exception { - loadPageWithAlerts2(test("script")); + loadPageVerifyTitle2(test("script")); } /** @@ -1329,7 +1363,7 @@ public void script() throws Exception { @Test @Alerts("-16") public void section() throws Exception { - loadPageWithAlerts2(test("section")); + loadPageVerifyTitle2(test("section")); } /** @@ -1342,9 +1376,13 @@ public void section() throws Exception { FF = "27", FF78 = "27", IE = "23") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "0", + EDGE = "0", + FF = "0", + FF78 = "0", + IE = "0") public void select() throws Exception { - loadPageWithAlerts2(test("select")); + loadPageVerifyTitle2(test("select")); } /** @@ -1355,7 +1393,7 @@ public void select() throws Exception { @Test @Alerts("0") public void small() throws Exception { - loadPageWithAlerts2(test("small")); + loadPageVerifyTitle2(test("small")); } /** @@ -1366,7 +1404,7 @@ public void small() throws Exception { @Test @Alerts("0") public void source() throws Exception { - loadPageWithAlerts2(test("source")); + loadPageVerifyTitle2(test("source")); } /** @@ -1375,7 +1413,7 @@ public void source() throws Exception { @Test @Alerts("0") public void spacer() throws Exception { - loadPageWithAlerts2(test("spacer")); + loadPageVerifyTitle2(test("spacer")); } /** @@ -1386,7 +1424,7 @@ public void spacer() throws Exception { @Test @Alerts("0") public void span() throws Exception { - loadPageWithAlerts2(test("span")); + loadPageVerifyTitle2(test("span")); } /** @@ -1397,7 +1435,7 @@ public void span() throws Exception { @Test @Alerts("0") public void strike() throws Exception { - loadPageWithAlerts2(test("strike")); + loadPageVerifyTitle2(test("strike")); } /** @@ -1408,7 +1446,7 @@ public void strike() throws Exception { @Test @Alerts("0") public void strong() throws Exception { - loadPageWithAlerts2(test("strong")); + loadPageVerifyTitle2(test("strong")); } /** @@ -1419,7 +1457,7 @@ public void strong() throws Exception { @Test @Alerts("0") public void style() throws Exception { - loadPageWithAlerts2(test("style")); + loadPageVerifyTitle2(test("style")); } /** @@ -1430,7 +1468,7 @@ public void style() throws Exception { @Test @Alerts("0") public void sub() throws Exception { - loadPageWithAlerts2(test("sub")); + loadPageVerifyTitle2(test("sub")); } /** @@ -1442,7 +1480,7 @@ public void sub() throws Exception { @Alerts(DEFAULT = "-16", IE = "0") public void summary() throws Exception { - loadPageWithAlerts2(test("summary")); + loadPageVerifyTitle2(test("summary")); } /** @@ -1453,7 +1491,7 @@ public void summary() throws Exception { @Test @Alerts("0") public void sup() throws Exception { - loadPageWithAlerts2(test("sup")); + loadPageVerifyTitle2(test("sup")); } /** @@ -1464,9 +1502,12 @@ public void sup() throws Exception { @Test @Alerts(DEFAULT = "300", IE = "-16") - @NotYetImplemented({CHROME, EDGE, FF, FF78}) + @HtmlUnitNYI(CHROME = "-16", + EDGE = "-16", + FF = "-16", + FF78 = "-16") public void svg() throws Exception { - loadPageWithAlerts2(test("svg")); + loadPageVerifyTitle2(test("svg")); } /** @@ -1477,9 +1518,9 @@ public void svg() throws Exception { @Test @Alerts(DEFAULT = "0", IE = "2") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "0") public void table() throws Exception { - loadPageWithAlerts2(test("table")); + loadPageVerifyTitle2(test("table")); } /** @@ -1490,7 +1531,7 @@ public void table() throws Exception { @Test @Alerts("null") public void col() throws Exception { - loadPageWithAlerts2(test("col")); + loadPageVerifyTitle2(test("col")); } /** @@ -1501,7 +1542,7 @@ public void col() throws Exception { @Test @Alerts("null") public void colgroup() throws Exception { - loadPageWithAlerts2(test("colgroup")); + loadPageVerifyTitle2(test("colgroup")); } /** @@ -1512,7 +1553,7 @@ public void colgroup() throws Exception { @Test @Alerts("null") public void tbody() throws Exception { - loadPageWithAlerts2(test("tbody")); + loadPageVerifyTitle2(test("tbody")); } /** @@ -1523,7 +1564,7 @@ public void tbody() throws Exception { @Test @Alerts("null") public void td() throws Exception { - loadPageWithAlerts2(test("td")); + loadPageVerifyTitle2(test("td")); } /** @@ -1534,7 +1575,7 @@ public void td() throws Exception { @Test @Alerts("null") public void th() throws Exception { - loadPageWithAlerts2(test("th")); + loadPageVerifyTitle2(test("th")); } /** @@ -1545,7 +1586,7 @@ public void th() throws Exception { @Test @Alerts("null") public void tr() throws Exception { - loadPageWithAlerts2(test("tr")); + loadPageVerifyTitle2(test("tr")); } /** @@ -1556,7 +1597,7 @@ public void tr() throws Exception { @Test @Alerts("0") public void track() throws Exception { - loadPageWithAlerts2(test("track")); + loadPageVerifyTitle2(test("track")); } /** @@ -1569,9 +1610,13 @@ public void track() throws Exception { FF = "181", FF78 = "181", IE = "164") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "100", + EDGE = "100", + FF = "100", + FF78 = "100", + IE = "100") public void textarea() throws Exception { - loadPageWithAlerts2(test("textarea")); + loadPageVerifyTitle2(test("textarea")); } /** @@ -1582,7 +1627,7 @@ public void textarea() throws Exception { @Test @Alerts("null") public void tfoot() throws Exception { - loadPageWithAlerts2(test("tfoot")); + loadPageVerifyTitle2(test("tfoot")); } /** @@ -1593,7 +1638,7 @@ public void tfoot() throws Exception { @Test @Alerts("null") public void thead() throws Exception { - loadPageWithAlerts2(test("thead")); + loadPageVerifyTitle2(test("thead")); } /** @@ -1604,7 +1649,7 @@ public void thead() throws Exception { @Test @Alerts("0") public void tt() throws Exception { - loadPageWithAlerts2(test("tt")); + loadPageVerifyTitle2(test("tt")); } /** @@ -1615,7 +1660,7 @@ public void tt() throws Exception { @Test @Alerts("0") public void time() throws Exception { - loadPageWithAlerts2(test("time")); + loadPageVerifyTitle2(test("time")); } /** @@ -1626,7 +1671,20 @@ public void time() throws Exception { @Test @Alerts("0") public void title() throws Exception { - loadPageWithAlerts2(test("title")); + // title is a bit special, we have to provide at least + // one closing tab otherwise title spans to the end of the file + final String html = "\n" + + "\n" + + "<title>\n" + + "\n" + + ""; + + loadPageWithAlerts2(html); } /** @@ -1637,7 +1695,7 @@ public void title() throws Exception { @Test @Alerts("0") public void u() throws Exception { - loadPageWithAlerts2(test("u")); + loadPageVerifyTitle2(test("u")); } /** @@ -1648,7 +1706,7 @@ public void u() throws Exception { @Test @Alerts("-16") public void ul() throws Exception { - loadPageWithAlerts2(test("ul")); + loadPageVerifyTitle2(test("ul")); } /** @@ -1659,7 +1717,7 @@ public void ul() throws Exception { @Test @Alerts("0") public void var() throws Exception { - loadPageWithAlerts2(test("var")); + loadPageVerifyTitle2(test("var")); } /** @@ -1669,9 +1727,13 @@ public void var() throws Exception { */ @Test @Alerts("300") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "0", + EDGE = "0", + FF = "0", + FF78 = "0", + IE = "0") public void video() throws Exception { - loadPageWithAlerts2(test("video")); + loadPageVerifyTitle2(test("video")); } /** @@ -1682,7 +1744,7 @@ public void video() throws Exception { @Test @Alerts("0") public void wbr() throws Exception { - loadPageWithAlerts2(test("wbr")); + loadPageVerifyTitle2(test("wbr")); } /** @@ -1693,9 +1755,9 @@ public void wbr() throws Exception { @Test @Alerts(DEFAULT = "-16", IE = "0") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "-16") public void xmp() throws Exception { - loadPageWithAlerts2(test("xmp")); + loadPageVerifyTitle2(test("xmp")); } /** @@ -1709,7 +1771,7 @@ public void xmp() throws Exception { FF78 = "145", IE = "143") public void input() throws Exception { - loadPageWithAlerts2(test("input")); + loadPageVerifyTitle2(test("input")); } /** @@ -1722,9 +1784,13 @@ public void input() throws Exception { FF = "16", FF78 = "16", IE = "20") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "10", + EDGE = "10", + FF = "10", + FF78 = "10", + IE = "10") public void inputButton() throws Exception { - loadPageWithAlerts2(testInput("button")); + loadPageVerifyTitle2(testInput("button")); } /** @@ -1735,7 +1801,7 @@ public void inputButton() throws Exception { @Test @Alerts("13") public void inputCheckbox() throws Exception { - loadPageWithAlerts2(testInput("checkbox")); + loadPageVerifyTitle2(testInput("checkbox")); } /** @@ -1748,9 +1814,13 @@ public void inputCheckbox() throws Exception { FF = "271", FF78 = "240", IE = "228") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "10", + EDGE = "10", + FF = "10", + FF78 = "10", + IE = "10") public void inputFile() throws Exception { - loadPageWithAlerts2(testInput("file")); + loadPageVerifyTitle2(testInput("file")); } /** @@ -1761,7 +1831,7 @@ public void inputFile() throws Exception { @Test @Alerts("0") public void inputHidden() throws Exception { - loadPageWithAlerts2(testInput("hidden")); + loadPageVerifyTitle2(testInput("hidden")); } /** @@ -1774,9 +1844,9 @@ public void inputHidden() throws Exception { FF = "145", FF78 = "145", IE = "145") - @NotYetImplemented(IE) + @HtmlUnitNYI(IE = "143") public void inputPassword() throws Exception { - loadPageWithAlerts2(testInput("password")); + loadPageVerifyTitle2(testInput("password")); } /** @@ -1787,7 +1857,7 @@ public void inputPassword() throws Exception { @Test @Alerts("13") public void inputRadio() throws Exception { - loadPageWithAlerts2(testInput("radio")); + loadPageVerifyTitle2(testInput("radio")); } /** @@ -1800,9 +1870,12 @@ public void inputRadio() throws Exception { FF = "91", FF78 = "48", IE = "55") - @NotYetImplemented({CHROME, EDGE, FF, FF78}) + @HtmlUnitNYI(CHROME = "55", + EDGE = "55", + FF = "55", + FF78 = "55") public void inputReset() throws Exception { - loadPageWithAlerts2(testInput("reset")); + loadPageVerifyTitle2(testInput("reset")); } /** @@ -1817,7 +1890,7 @@ public void inputReset() throws Exception { FF78 = "145", IE = "143") public void inputSelect() throws Exception { - loadPageWithAlerts2(testInput("select")); + loadPageVerifyTitle2(testInput("select")); } /** @@ -1830,9 +1903,13 @@ public void inputSelect() throws Exception { FF = "108", FF78 = "94", IE = "101") - @NotYetImplemented + @HtmlUnitNYI(CHROME = "118", + EDGE = "118", + FF = "118", + FF78 = "118", + IE = "118") public void inputSubmit() throws Exception { - loadPageWithAlerts2(testInput("submit")); + loadPageVerifyTitle2(testInput("submit")); } /** @@ -1846,7 +1923,7 @@ public void inputSubmit() throws Exception { FF78 = "145", IE = "143") public void inputText() throws Exception { - loadPageWithAlerts2(testInput("text")); + loadPageVerifyTitle2(testInput("text")); } /** @@ -1857,18 +1934,18 @@ public void inputText() throws Exception { @Test @Alerts("0") public void data() throws Exception { - loadPageWithAlerts2(test("data")); + loadPageVerifyTitle2(test("data")); } /** - * Test {@link com.gargoylesoftware.htmlunit.html.HtmlContent}. + * Test HtmlContent. * * @throws Exception if the test fails */ @Test @Alerts("0") public void content() throws Exception { - loadPageWithAlerts2(test("content")); + loadPageVerifyTitle2(test("content")); } /** @@ -1879,7 +1956,7 @@ public void content() throws Exception { @Test @Alerts("0") public void picture() throws Exception { - loadPageWithAlerts2(test("picture")); + loadPageVerifyTitle2(test("picture")); } /** @@ -1890,7 +1967,7 @@ public void picture() throws Exception { @Test @Alerts("0") public void template() throws Exception { - loadPageWithAlerts2(test("template")); + loadPageVerifyTitle2(test("template")); } /** @@ -1901,7 +1978,7 @@ public void template() throws Exception { @Test @Alerts("0") public void slot() throws Exception { - loadPageWithAlerts2(test("slot")); + loadPageVerifyTitle2(test("slot")); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/property/ElementOffsetHeightTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/property/ElementOffsetHeightTest.java index 77d02c44a..d82cca1b8 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/property/ElementOffsetHeightTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/property/ElementOffsetHeightTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/property/ElementOffsetWidthTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/property/ElementOffsetWidthTest.java index 171789272..076930ff4 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/property/ElementOffsetWidthTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/css/property/ElementOffsetWidthTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -1862,7 +1862,7 @@ public void data() throws Exception { } /** - * Test {@link com.gargoylesoftware.htmlunit.html.HtmlContent}. + * Test HtmlContent. * * @throws Exception if the test fails */ diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/AttrTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/AttrTest.java index 96960f7b1..5f8b23074 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/AttrTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/AttrTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -328,6 +328,7 @@ private void html(final String methodName) throws Exception { + "
                          \n" + ""; + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html); } @@ -347,6 +348,7 @@ public void xml_baseName() throws Exception { @Alerts(DEFAULT = {"[object Attr]", "§§URL§§foo.xml"}, IE = {"[object Attr]", "undefined"}) public void xml_baseURI() throws Exception { + expandExpectedAlertsVariables(URL_FIRST); xml("baseURI"); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CDATASectionTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CDATASectionTest.java index e6c6f9a34..11d80786b 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CDATASectionTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CDATASectionTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CharacterDataTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CharacterDataTest.java index 47a740174..e61d463e5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CharacterDataTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CharacterDataTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CommentTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CommentTest.java index 0f3d09035..5daf42123 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CommentTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/CommentTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMExceptionTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMExceptionTest.java index 5b0c20027..78a79681d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMExceptionTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMExceptionTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -105,6 +105,7 @@ public void appendChild_illegal_node() throws Exception { + "}\n" + "hi"; + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMImplementationTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMImplementationTest.java index dda3a3aef..28d711c4f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMImplementationTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMImplementationTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -274,11 +274,11 @@ public void hasFeature_XPath() throws Exception { */ @Test @Alerts(DEFAULT = {"http://www.w3.org/TR/SVG11/feature#BasicStructure 1.0: true", - "http://www.w3.org/TR/SVG11/feature#BasicStructure 1.1: true", - "http://www.w3.org/TR/SVG11/feature#BasicStructure 1.2: true"}, + "http://www.w3.org/TR/SVG11/feature#BasicStructure 1.1: true", + "http://www.w3.org/TR/SVG11/feature#BasicStructure 1.2: true"}, IE = {"http://www.w3.org/TR/SVG11/feature#BasicStructure 1.0: true", - "http://www.w3.org/TR/SVG11/feature#BasicStructure 1.1: true", - "http://www.w3.org/TR/SVG11/feature#BasicStructure 1.2: false"}) + "http://www.w3.org/TR/SVG11/feature#BasicStructure 1.1: true", + "http://www.w3.org/TR/SVG11/feature#BasicStructure 1.2: false"}) public void hasFeature_SVG_BasicStructure() throws Exception { hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "['1.0', '1.1', '1.2']"); } @@ -288,11 +288,11 @@ public void hasFeature_SVG_BasicStructure() throws Exception { */ @Test @Alerts(DEFAULT = {"http://www.w3.org/TR/SVG11/feature#Shape 1.0: true", - "http://www.w3.org/TR/SVG11/feature#Shape 1.1: true", - "http://www.w3.org/TR/SVG11/feature#Shape 1.2: true"}, + "http://www.w3.org/TR/SVG11/feature#Shape 1.1: true", + "http://www.w3.org/TR/SVG11/feature#Shape 1.2: true"}, IE = {"http://www.w3.org/TR/SVG11/feature#Shape 1.0: true", - "http://www.w3.org/TR/SVG11/feature#Shape 1.1: true", - "http://www.w3.org/TR/SVG11/feature#Shape 1.2: false"}) + "http://www.w3.org/TR/SVG11/feature#Shape 1.1: true", + "http://www.w3.org/TR/SVG11/feature#Shape 1.2: false"}) public void hasFeature_SVG_Shape() throws Exception { hasFeature("http://www.w3.org/TR/SVG11/feature#Shape", "['1.0', '1.1', '1.2']"); } @@ -301,19 +301,20 @@ private void hasFeature(final String feature, final String versions) throws Exce final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -323,14 +324,15 @@ private void hasFeature(final String feature, final String versions) throws Exce @Alerts("[object XMLDocument]") public void createDocument() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -340,18 +342,19 @@ public void createDocument() throws Exception { @Alerts({"mydoc", "null", "mydoc", "null"}) public void createDocument_qualifiedName() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -361,18 +364,19 @@ public void createDocument_qualifiedName() throws Exception { @Alerts({"mydoc", "null", "mydoc", "http://mynamespace"}) public void createDocument_namespaceAndQualifiedName() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -382,18 +386,19 @@ public void createDocument_namespaceAndQualifiedName() throws Exception { @Alerts({"m:mydoc", "m", "mydoc", "http://mynamespace"}) public void createDocument_namespaceAndQualifiedNameWithPrefix() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -406,21 +411,21 @@ public void createHTMLDocument() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" - + " foo\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -432,21 +437,21 @@ public void createHTMLDocument_title() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" - + " foo\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -458,21 +463,21 @@ public void createHTMLDocument_titleEmpty() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" - + " foo\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -484,21 +489,21 @@ public void createHTMLDocument_jQuery() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" - + " foo\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -510,22 +515,22 @@ public void createHTMLDocument_createElement() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" - + " foo\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -533,39 +538,39 @@ public void createHTMLDocument_createElement() throws Exception { */ @Test @Alerts(DEFAULT = {"", - "", - "abc"}, + "", + "abc"}, IE = {"exception", - "", - "abc"}) + "", + "abc"}) public void createHTMLDocument_htmlCode() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" - + " foo\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -579,21 +584,22 @@ public void createHTMLDocumentAddParagraph() throws Exception { + "\n" + "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -606,46 +612,48 @@ public void createHTMLDocumentInnerAddParagraph() throws Exception { + "\n" + "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "test", - IE = "test") + @Alerts(DEFAULT = "test", + IE = "test") @NotYetImplemented(IE) public void createHTMLDocumentInnerAddImg() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMParserTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMParserTest.java index d955b88c3..32dff1168 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMParserTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMParserTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -74,6 +74,7 @@ public void parseFromString_text_html() throws Exception { + "\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(content); } @@ -98,6 +99,7 @@ public void parseFromString_text_html_div() throws Exception { + "\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(content); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMStringMapTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMStringMapTest.java index 624dae5a9..5061dba49 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMStringMapTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMStringMapTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMTokenListTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMTokenListTest.java index 9f870a0ae..d999b8d9f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMTokenListTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DOMTokenListTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,6 +16,9 @@ import org.junit.Test; import org.junit.runner.RunWith; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; @@ -39,22 +42,23 @@ public class DOMTokenListTest extends WebDriverTestCase { @Alerts({"3", "b", "b", "true", "false", "c d"}) public void various() throws Exception { final String html - = "First\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -64,19 +68,20 @@ public void various() throws Exception { @Alerts({"0", "null", "false", "# removed", ""}) public void noAttribute() throws Exception { final String html - = "First\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -86,18 +91,19 @@ public void noAttribute() throws Exception { @Alerts({"0", "undefined", "1", "#"}) public void noAttributeAdd() throws Exception { final String html - = "First\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -107,18 +113,19 @@ public void noAttributeAdd() throws Exception { @Alerts({"0", "true", "1", "#"}) public void noAttributeToggle() throws Exception { final String html - = "First\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -129,16 +136,17 @@ public void noAttributeToggle() throws Exception { IE = {"3", "0", "3", "7"}) public void length() throws Exception { final String html - = "First\n" + "
                          \n" @@ -147,7 +155,7 @@ public void length() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -158,21 +166,22 @@ public void length() throws Exception { IE = {"a", "b", "c", "d", "e", "f", "g", "null", "null", "null"}) public void item() throws Exception { final String html - = "First\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -225,25 +234,26 @@ public void itemOutside() throws Exception { private void item(final String in, final int pos) throws Exception { final String html - = "Test\n" + = "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -398,24 +408,32 @@ public void containsWhitespaceExisting() throws Exception { private void contains(final String in, final String toAdd) throws Exception { final String html - = "Test\n" + = "\n" + "\n" + "
                          \n" + + " \n" + ""; - loadPageWithAlerts2(html); + final WebDriver driver = loadPage2(html); + + final WebElement textArea = driver.findElement(By.id("myTextArea")); + assertEquals(String.join("; ", getExpectedAlerts()) + "; ", textArea.getAttribute("value")); } /** @@ -559,26 +577,34 @@ public void addToWhitespaceExisting() throws Exception { private void add(final String in, final String toAdd) throws Exception { final String html - = "Test\n" + = "\n" + "\n" + "
                          \n" + + " \n" + ""; - loadPageWithAlerts2(html); + final WebDriver driver = loadPage2(html); + + final WebElement textArea = driver.findElement(By.id("myTextArea")); + assertEquals(String.join("; ", getExpectedAlerts()) + "; ", textArea.getAttribute("value")); } /** @@ -589,18 +615,19 @@ private void add(final String in, final String toAdd) throws Exception { IE = "no list") public void addSvg() throws Exception { final String html - = "Test\n" + = "\n" + "\n" + " \n" @@ -608,7 +635,7 @@ public void addSvg() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -618,18 +645,19 @@ public void addSvg() throws Exception { @Alerts({"block", "none"}) public void addStyleCheck() throws Exception { final String html - = "First\n" + = "\n" + "\n" + "" + "\n" @@ -637,7 +665,7 @@ public void addStyleCheck() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -773,26 +801,34 @@ public void removeWhitespace() throws Exception { private void remove(final String in, final String toRemove) throws Exception { final String html - = "Test\n" + = "\n" + "\n" + "
                          \n" + + " \n" + ""; - loadPageWithAlerts2(html); + final WebDriver driver = loadPage2(html); + + final WebElement textArea = driver.findElement(By.id("myTextArea")); + assertEquals(String.join("; ", getExpectedAlerts()) + "; ", textArea.getAttribute("value")); } /** @@ -802,18 +838,19 @@ private void remove(final String in, final String toRemove) throws Exception { @Alerts({ "none", "block"}) public void removeStyleCheck() throws Exception { final String html - = "First\n" + = "\n" + "\n" + "" + "\n" @@ -821,7 +858,7 @@ public void removeStyleCheck() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -831,29 +868,30 @@ public void removeStyleCheck() throws Exception { @Alerts({"exception", "exception", "2", "true", "false", "1", "false", "true", "2", "true"}) public void toggle() throws Exception { final String html - = "First\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -864,20 +902,21 @@ public void toggle() throws Exception { IE = {"2", "true", "true", "true", "true"}) public void in() throws Exception { final String html - = "First\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -887,21 +926,22 @@ public void in() throws Exception { @Alerts({"none", "block", "none"}) public void toggleStyleCheck() throws Exception { final String html - = "First\n" + = "\n" + "\n" + "" + "\n" @@ -909,6 +949,6 @@ public void toggleStyleCheck() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document2Test.java index db1e97c9d..7d2865f74 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -391,10 +391,10 @@ public void activeElement_iframe() throws Exception { */ @Test @Alerts({"

                          a & b

                          & \u0162 \" '", - "

                          a & b

                          & \u0162 \" '", - "
                          <p>a & b</p> &amp; \u0162 \" '
                          ", - "<p>a & b</p> &amp; \u0162 \" '", - "

                          a & b

                          & \u0162 \" '"}) + "

                          a & b

                          & \u0162 \" '", + "
                          <p>a & b</p> &amp; \u0162 \" '
                          ", + "<p>a & b</p> &amp; \u0162 \" '", + "

                          a & b

                          & \u0162 \" '"}) public void createTextNodeWithHtml() throws Exception { final String html = "\n" @@ -75,7 +76,7 @@ public void formsAccessor_TwoForms() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -86,9 +87,10 @@ public void formsAccessor_TwoForms() throws Exception { @Alerts("1") public void formsAccessor_FormWithNoName() throws Exception { final String html - = "foo\n" + "

                          hello world

                          \n" @@ -97,7 +99,7 @@ public void formsAccessor_FormWithNoName() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -107,18 +109,19 @@ public void formsAccessor_FormWithNoName() throws Exception { @Alerts("0") public void formsAccessor_NoForms() throws Exception { final String html - = "foo\n" + "

                          hello world

                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -166,12 +169,13 @@ public void formsLive() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -181,7 +185,7 @@ public void formsLive() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -196,16 +200,17 @@ public void anchors() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -218,7 +223,7 @@ public void anchors() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -232,12 +237,13 @@ public void anchorsEmpty() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -245,7 +251,7 @@ public void anchorsEmpty() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -260,12 +266,13 @@ public void applets() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -276,7 +283,7 @@ public void applets() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -290,12 +297,13 @@ public void appletsEmpty() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -303,7 +311,7 @@ public void appletsEmpty() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -317,13 +325,14 @@ public void embeds() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -334,7 +343,7 @@ public void embeds() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -348,12 +357,13 @@ public void embedsEmpty() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -361,7 +371,7 @@ public void embedsEmpty() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -375,13 +385,14 @@ public void plugins() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -392,7 +403,7 @@ public void plugins() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -406,12 +417,13 @@ public void pluginsEmpty() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -419,7 +431,7 @@ public void pluginsEmpty() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -433,13 +445,14 @@ public void links() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -451,7 +464,7 @@ public void links() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -465,13 +478,13 @@ public void linksEmpty() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -479,7 +492,7 @@ public void linksEmpty() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -492,18 +505,18 @@ public void createElement() throws Exception { final String html = "\n" + " \n" - + " First\n" + " \n" + " \n" @@ -526,7 +539,7 @@ public void createElement() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -540,12 +553,13 @@ public void documentCreateElement2() throws Exception { = "\n" + " \n" + " \n" @@ -554,7 +568,7 @@ public void documentCreateElement2() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -565,28 +579,29 @@ public void documentCreateElement2() throws Exception { @Alerts({"Some:Div", "Some:Div", "myNS", "Some", "Div", "svg", "svg", "http://www.w3.org/2000/svg", "null", "svg"}) public void createElementNS() throws Exception { final String html - = "\"" + = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -597,21 +612,23 @@ public void createElementNS() throws Exception { @Alerts({"Some Text", "9", "3", "Some Text", "#text"}) public void createTextNode() throws Exception { final String html - = "First\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -622,13 +639,14 @@ public void createTextNode() throws Exception { @Alerts("1") public void appendChild() throws Exception { final String html - = "foo\n" + "

                          hello world

                          \n" @@ -636,7 +654,7 @@ public void appendChild() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -649,20 +667,20 @@ public void appendChildAtDocumentLevel() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" @@ -670,7 +688,7 @@ public void appendChildAtDocumentLevel() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -681,12 +699,14 @@ public void appendChildAtDocumentLevel() throws Exception { @Alerts("Some Text") public void appendChild_textNode() throws Exception { final String html - = "foo\n" + "

                          hello world

                          \n" @@ -694,7 +714,7 @@ public void appendChild_textNode() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -705,15 +725,17 @@ public void appendChild_textNode() throws Exception { @Alerts({"true", "true", "true", "true"}) public void cloneNode() throws Exception { final String html - = "foo\n" + "
                          \n" @@ -721,7 +743,7 @@ public void cloneNode() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -732,19 +754,21 @@ public void cloneNode() throws Exception { @Alerts("true") public void insertBefore() throws Exception { final String html - = "foo\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -755,15 +779,16 @@ public void insertBefore() throws Exception { @Alerts("text/javascript") public void getElementById_scriptType() throws Exception { final String html - = "First\n" + = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -774,18 +799,23 @@ public void getElementById_scriptType() throws Exception { @Alerts("§§URL§§script/") public void getElementById_scriptSrc() throws Exception { final String html - = "First\n" + = "\n" + + "\n" + "\n" + + "\n" + + "\n" + ""; final String script = "doTest = function() {\n" - + " alert(top.document.getElementById('script1').src);\n" + + " log(top.document.getElementById('script1').src);\n" + "}"; getMockWebConnection().setResponse(new URL(URL_FIRST, "script/"), script, "text/javascript"); - loadPageWithAlerts2(html); + expandExpectedAlertsVariables(URL_FIRST); + loadPageVerifyTitle2(html); } /** @@ -796,16 +826,18 @@ public void getElementById_scriptSrc() throws Exception { @Alerts("parentDiv") public void parentNode_Nested() throws Exception { final String html - = "First\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -816,14 +848,16 @@ public void parentNode_Nested() throws Exception { @Alerts("true") public void parentNode_Document() throws Exception { final String html - = "First\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -834,15 +868,17 @@ public void parentNode_Document() throws Exception { @Alerts("true") public void parentNode_CreateElement() throws Exception { final String html - = "First\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -853,18 +889,20 @@ public void parentNode_CreateElement() throws Exception { @Alerts("parentDiv") public void parentNode_AppendChild() throws Exception { final String html - = "First\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -875,16 +913,19 @@ public void parentNode_AppendChild() throws Exception { @Alerts({"true", "HTML", "true"}) public void documentElement() throws Exception { final String html - = "First\n" + + "\n" + + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -895,16 +936,18 @@ public void documentElement() throws Exception { @Alerts("childDiv") public void firstChild_Nested() throws Exception { final String html - = "First\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -915,20 +958,22 @@ public void firstChild_Nested() throws Exception { @Alerts("childDiv") public void firstChild_AppendChild() throws Exception { final String html - = "First\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -939,16 +984,18 @@ public void firstChild_AppendChild() throws Exception { @Alerts("childDiv") public void lastChild_Nested() throws Exception { final String html - = "Last\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -959,20 +1006,21 @@ public void lastChild_Nested() throws Exception { @Alerts("childDiv") public void lastChild_AppendChild() throws Exception { final String html - = "Last\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -983,16 +1031,18 @@ public void lastChild_AppendChild() throws Exception { @Alerts("nextDiv") public void nextSibling_Nested() throws Exception { final String html - = "Last\n" + + "\n" + + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1003,20 +1053,22 @@ public void nextSibling_Nested() throws Exception { @Alerts("nextDiv") public void nextSibling_AppendChild() throws Exception { final String html - = "Last\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1027,16 +1079,18 @@ public void nextSibling_AppendChild() throws Exception { @Alerts("previousDiv") public void previousSibling_Nested() throws Exception { final String html - = "Last\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1047,20 +1101,22 @@ public void previousSibling_Nested() throws Exception { @Alerts("previousDiv") public void previousSibling_AppendChild() throws Exception { final String html - = "Last\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1072,11 +1128,11 @@ public void allProperty_KeyByName() throws Exception { final String html = "\n" + "\n" - + " First\n" - + " \n" + "\n" @@ -1087,7 +1143,7 @@ public void allProperty_KeyByName() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1101,11 +1157,12 @@ public void allProperty_CalledDuringPageLoad() throws Exception { = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1136,10 +1193,15 @@ public void referrer() throws Exception { @Alerts("") public void referrer_NoneSpecified() throws Exception { final String html - = "First\n" + = "\n" + + "\n" + + "\n" + + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1149,10 +1211,16 @@ public void referrer_NoneSpecified() throws Exception { @Alerts("§§URL§§") public void url() throws Exception { final String html - = "First\n" + = "\n" + + "\n" + + "\n" + + "\n" + ""; - loadPageWithAlerts2(html); + expandExpectedAlertsVariables(URL_FIRST); + loadPageVerifyTitle2(html); } /** @@ -1162,20 +1230,22 @@ public void url() throws Exception { @Alerts({"button", "button", "true"}) public void getElementsByTagName() throws Exception { final String html - = "First\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1186,18 +1256,20 @@ public void getElementsByTagName() throws Exception { @Alerts("button") public void getElementsByTagName_CaseInsensitive() throws Exception { final String html - = "First\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1208,11 +1280,13 @@ public void getElementsByTagName_CaseInsensitive() throws Exception { @Alerts("1") public void getElementsByTagName_Inline() throws Exception { final String html - = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1235,14 +1309,15 @@ public void getElementsByTagName_LoadScript() throws Exception { */ @Test @Alerts(DEFAULT = {"2", "Three", "Four", - "1", "Two", "0", "0"}, + "1", "Two", "0", "0"}, IE = {"2", "undefined", "undefined", - "1", "undefined", "0", "0"}) + "1", "undefined", "0", "0"}) public void getElementsByTagNameXml() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1290,24 +1365,26 @@ public void getElementsByTagNameXml() throws Exception { @Alerts({"HTML", "HEAD", "TITLE", "SCRIPT", "BODY"}) public void all_WithParentheses() throws Exception { final String html - = "First\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1317,17 +1394,19 @@ public void all_WithParentheses() throws Exception { @Alerts({"HTML", "HEAD", "TITLE", "SCRIPT", "BODY"}) public void all_IndexByInt() throws Exception { final String html - = "First\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1337,14 +1416,16 @@ public void all_IndexByInt() throws Exception { @Alerts("HTML") public void all_Item() throws Exception { final String html - = "First\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1417,22 +1498,23 @@ public void all_NamedItem_DuplicateIdName() throws Exception { private void namedItem(final String name) throws Exception { final String html = "\n" - + "First\n" + "\n" @@ -1447,7 +1529,7 @@ private void namedItem(final String name) throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1458,27 +1540,29 @@ private void namedItem(final String name) throws Exception { IE = {"a", "b", "a", "b", "0"}) public void all_tags() throws Exception { final String html - = "First\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1488,16 +1572,18 @@ public void all_tags() throws Exception { @Test @Alerts({"false", "false", "undefined"}) public void all() throws Exception { - final String html = "First\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1509,14 +1595,18 @@ public void all() throws Exception { @Alerts({"1", "2"}) public void all_Caching() throws Exception { final String html - = "Test\n" - + "\n" + = "\n" + + "\n" + + "\n" + + "\n" + "\n" - + "\n" + + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1526,16 +1616,18 @@ public void all_Caching() throws Exception { @Alerts(DEFAULT = {"null", "null", "null"}, IE = {"undefined", "null", "undefined"}) public void all_NotExisting() throws Exception { - final String html = "First\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1545,12 +1637,14 @@ public void all_NotExisting() throws Exception { @Alerts({"value1", "value1", "value2", "value2"}) public void getElementsByName() throws Exception { final String html - = "First\n" @@ -1561,7 +1655,7 @@ public void getElementsByName() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1570,11 +1664,15 @@ public void getElementsByName() throws Exception { @Test @Alerts("IAmTheBody") public void body_read() throws Exception { - final String html = "First\n" - + "\n" + final String html = "\n" + + "\n" + + "\n" + + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1602,13 +1700,14 @@ public void images() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -1619,7 +1718,7 @@ public void images() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1633,12 +1732,13 @@ public void imagesEmpty() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -1646,7 +1746,7 @@ public void imagesEmpty() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1657,17 +1757,19 @@ public void imagesEmpty() throws Exception { @Alerts({"1", "2", "2", "true"}) public void allImages() throws Exception { final String html - = "First\n" + "\n" + "\n" + "
                          \n" + "\n" @@ -1676,7 +1778,7 @@ public void allImages() throws Exception { getMockWebConnection().setDefaultResponse("Error: not found", 404, "Not Found", MimeType.TEXT_HTML); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1764,15 +1866,16 @@ public void title() throws Exception { public void readyState() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1783,11 +1886,13 @@ public void readyState() throws Exception { @Alerts("null") public void documentWithNoBody() throws Exception { final String html - = "foo"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1798,17 +1903,18 @@ public void documentWithNoBody() throws Exception { @Alerts({"null", "byId"}) public void getElementById_findByName() throws Exception { final String html - = "foo\n" + = "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1820,15 +1926,17 @@ public void getElementById_findByName() throws Exception { @Test @Alerts({"myImageId", "2", "FORM", "undefined", "undefined", "undefined", "undefined"}) public void directAccessByName() throws Exception { - final String html = "foo\n" + "\n" @@ -1845,7 +1953,7 @@ public void directAccessByName() throws Exception { getMockWebConnection().setDefaultResponse("Error: not found", 404, "Not Found", MimeType.TEXT_HTML); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1854,19 +1962,21 @@ public void directAccessByName() throws Exception { @Test @Alerts({"[object HTMLCollection]", "2"}) public void scriptsArray() throws Exception { - final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" + " "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1877,14 +1987,18 @@ public void scriptsArray() throws Exception { @Alerts(DEFAULT = {"object", "FORM"}, IE = {"function", "undefined"}) public void precedence() throws Exception { - final String html = "\n" + final String html = "\n" + + "\n" + + "\n" + "\n" + " foo
                          \n" - + " \n" - + " \n" + + " \n" + + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1895,14 +2009,15 @@ public void precedence() throws Exception { IE = {"true", "true"}) public void defaultViewAndParentWindow() throws Exception { final String html = "\n" + " "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1913,13 +2028,14 @@ public void defaultViewAndParentWindow() throws Exception { public void put() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1933,24 +2049,25 @@ public void put() throws Exception { public void documentCloneNode() throws Exception { final String html = "\n" + " \n" + "
                          hello
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1960,18 +2077,20 @@ public void documentCloneNode() throws Exception { @Alerts("exception") public void createStyleSheet() throws Exception { final String html - = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2037,19 +2156,21 @@ public void createEvent_Bogus() throws Exception { private void createEvent(final String eventType) throws Exception { final String html = - "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2061,22 +2182,24 @@ public void createEvent_target() throws Exception { final String html = "\n" + " \n" - + "
                          abc
                          \n" + + "
                          abc
                          \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + + loadPageVerifyTitle2(html); } /** @@ -2088,21 +2211,23 @@ public void createEvent_overridden() throws Exception { final String html = "\n" + " \n" - + "
                          abc
                          \n" + + "
                          abc
                          \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + + loadPageVerifyTitle2(html); } /** @@ -2116,20 +2241,21 @@ public void createEvent_caller() throws Exception { final String html = "\n" + " \n" - + "
                          abc
                          \n" + + "
                          abc
                          \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2143,15 +2269,16 @@ public void caller() throws Exception { "\n" + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2166,14 +2293,16 @@ public void caller_event() throws Exception { "\n" + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + + loadPageVerifyTitle2(html); } /** @@ -2183,19 +2312,21 @@ public void caller_event() throws Exception { @Alerts("exception") public void createEventObject_IE() throws Exception { final String html = - "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2204,14 +2335,16 @@ public void createEventObject_IE() throws Exception { @Test @Alerts("null") public void elementFromPoint() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2220,16 +2353,18 @@ public void elementFromPoint() throws Exception { @Test @Alerts({"[object StyleSheetList]", "0", "true"}) public void styleSheets() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2256,27 +2391,28 @@ public void designMode_iframe() throws Exception { private void designMode(final String doc) throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2318,22 +2454,24 @@ public void designMode_createsSelectionRange() throws Exception { CHROME = {"false", "false"}, EDGE = {"false", "false"}) public void execCommand() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2343,19 +2481,21 @@ public void execCommand() throws Exception { @Alerts(DEFAULT = "[object HTMLHeadingElement]", IE = "not available") public void evaluate_caseInsensitiveAttribute() throws Exception { - final String html = "\n" + "

                          Some text

                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2365,22 +2505,23 @@ public void evaluate_caseInsensitiveAttribute() throws Exception { @Alerts(DEFAULT = "[object HTMLHtmlElement]", IE = "not available") public void evaluate_caseInsensitiveTagName() throws Exception { - final String html = "foo\n" + final String html = "\n" + "\n" + "\n" + "

                          Some text

                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2395,14 +2536,16 @@ public void noBodyTag() throws Exception { final String html = "\n" + " \n" - + " Test\n" - + " \n" - + " \n" - + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2417,20 +2560,22 @@ public void noBodyTag_IFrame() throws Exception { final String html = "\n" + " \n" - + " Test\n" + + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2444,7 +2589,7 @@ public void fireEvent() throws Exception { "\n" + " abc\n" @@ -2463,15 +2608,17 @@ public void fireEvent() throws Exception { @Test @Alerts("null") public void ownerDocument() throws Exception { - final String html = "\n" + final String html = "\n" + + "\n" + " \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2483,34 +2630,30 @@ public void ownerDocument() throws Exception { @NotYetImplemented(IE) // the execution order is not yet correct: the onfocus is called during onload not after it public void setActive() throws Exception { - final String html = "\n" + "\n" + " \n" - + " \n" + + " \n" + ""; - final String[] alerts = getExpectedAlerts(); final WebDriver driver = loadPage2(html); - verifyAlerts(driver, alerts[0]); + verifyTitle2(driver, getExpectedAlerts()[0]); Thread.sleep(100); driver.findElement(By.id("text1")).click(); - if (alerts.length > 3) { - verifyAlerts(driver, alerts[1], alerts[2], alerts[3], alerts[4]); - } - else { - verifyAlerts(driver, alerts[1], alerts[2]); - } + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -2520,37 +2663,71 @@ public void setActive() throws Exception { @Test @Alerts({"123", "captured"}) public void captureEvents() throws Exception { - final String content = "foo\n" + final String content = "\n" + "\n" - + "
                          foo
                          \n" + + "
                          foo
                          \n" + ""; final WebDriver driver = loadPage2(content); driver.findElement(By.id("theDiv")).click(); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"true", "false", "true", "true", "true", "false", "false"}, + IE = {"-", "-", "-", "-", "-", "-", "-"}) + public void contains() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + "\n" + + "
                          \n" + + ""; + loadPageVerifyTitle2(html); } /** * @throws Exception if the test fails */ @Test - @Alerts("[object Comment]") + @Alerts(DEFAULT = {"[object Comment]", "false"}, + IE = {"[object Comment]", "-"}) public void createComment() throws Exception { final String html = "\n" + "\n" - + "Test\n" + "\n" + "\n" @@ -2558,7 +2735,7 @@ public void createComment() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2569,16 +2746,18 @@ public void createComment() throws Exception { public void createAttribute() throws Exception { shutDownRealIE(); - final String html = "foo\n" @@ -2594,7 +2773,7 @@ public void createAttribute() throws Exception { getMockWebConnection().setResponse(URL_SECOND, xml, MimeType.TEXT_XML); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2605,12 +2784,14 @@ public void createAttribute() throws Exception { public void getElementsByTagNameNS() throws Exception { shutDownRealIE(); - final String html = "foo\n" + "\n" @@ -2651,7 +2832,7 @@ public void oninput() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2662,10 +2843,10 @@ public void oninput() throws Exception { public void documentDefineProperty() throws Exception { final String html = "\n" + "\n" - + " Test\n" + " \n" + "\n" @@ -2681,7 +2862,7 @@ public void documentDefineProperty() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2694,9 +2875,10 @@ public void urlUnencoded() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" @@ -2708,7 +2890,7 @@ public void urlUnencoded() throws Exception { expandExpectedAlertsVariables(url); final WebDriver driver = loadPage2(html, url); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -2721,13 +2903,14 @@ public void children() throws Exception { final String html = "\n" + "\n" + " \n" @@ -2739,7 +2922,7 @@ public void children() throws Exception { expandExpectedAlertsVariables(url); final WebDriver driver = loadPage2(html, url); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -2752,17 +2935,18 @@ public void contentType() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2777,17 +2961,18 @@ public void xmlEncoding() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2801,17 +2986,18 @@ public void xmlStandalone() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2826,17 +3012,18 @@ public void xmlVersion() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2848,17 +3035,18 @@ public void rootElement() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2871,17 +3059,18 @@ public void firstElementChild() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2896,16 +3085,17 @@ public void firstElementChildDoctype() throws Exception { + "\n" + "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DocumentTypeTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DocumentTypeTest.java index 243bd6b13..5df3faeb1 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DocumentTypeTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/DocumentTypeTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -38,10 +38,10 @@ public class DocumentTypeTest extends WebDriverTestCase { */ @Test @Alerts(DEFAULT = {"[object DocumentType]", "true", "html,10,null,undefined,undefined,undefined", - "html,-//W3C//DTD XHTML 1.0 Strict//EN,http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd," + "html,-//W3C//DTD XHTML 1.0 Strict//EN,http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd," + "undefined,undefined,undefined"}, IE = {"[object DocumentType]", "true", "html,10,null,null,null,null", - "html,-//W3C//DTD XHTML 1.0 Strict//EN,http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd," + "html,-//W3C//DTD XHTML 1.0 Strict//EN,http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd," + "null,null,null"}) public void doctype() throws Exception { final String html = "\n" diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/EventNodeTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/EventNodeTest.java index b07f8a85b..9a3df82a1 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/EventNodeTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/EventNodeTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationObserverTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationObserverTest.java index b882519d4..bf0e88d6f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationObserverTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationObserverTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Node2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Node2Test.java index 49b58f642..104dc7dc6 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Node2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Node2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeFilterTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeFilterTest.java index 9abc536b1..db1a80310 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeFilterTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeFilterTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeIteratorTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeIteratorTest.java index 7946f7409..3dc85ec2c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeIteratorTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeIteratorTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -34,7 +34,7 @@ public class NodeIteratorTest extends WebDriverTestCase { */ @Test @Alerts({"[object HTMLDivElement]", "[object HTMLSpanElement]", "[object HTMLSpanElement]", - "[object HTMLSpanElement]"}) + "[object HTMLSpanElement]"}) public void filterNull() throws Exception { final String html = "\n" diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeListTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeListTest.java index cb50c143a..47e97b4d5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeListTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeListTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -209,8 +209,8 @@ public void forInEmptyList() throws Exception { */ @Test @Alerts(DEFAULT = {"[object HTMLHtmlElement]", "[object HTMLHeadElement]", - "[object HTMLTitleElement]", "[object HTMLScriptElement]", - "[object HTMLBodyElement]", "[object HTMLDivElement]"}, + "[object HTMLTitleElement]", "[object HTMLScriptElement]", + "[object HTMLBodyElement]", "[object HTMLDivElement]"}, IE = "no for..of") public void iterator() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "test\n" @@ -239,11 +239,11 @@ public void iterator() throws Exception { */ @Test @Alerts(DEFAULT = {"[object HTMLHtmlElement] 0 [object NodeList] undefined", - "[object HTMLHeadElement] 1 [object NodeList] undefined", - "[object HTMLTitleElement] 2 [object NodeList] undefined", - "[object HTMLScriptElement] 3 [object NodeList] undefined", - "[object HTMLBodyElement] 4 [object NodeList] undefined", - "[object HTMLDivElement] 5 [object NodeList] undefined"}, + "[object HTMLHeadElement] 1 [object NodeList] undefined", + "[object HTMLTitleElement] 2 [object NodeList] undefined", + "[object HTMLScriptElement] 3 [object NodeList] undefined", + "[object HTMLBodyElement] 4 [object NodeList] undefined", + "[object HTMLDivElement] 5 [object NodeList] undefined"}, IE = "no forEach") public void forEach() throws Exception { final String html = "test\n" @@ -334,8 +334,8 @@ public void entriesPropertyDescriptor() throws Exception { */ @Test @Alerts(DEFAULT = {"0,[object HTMLHtmlElement]", "1,[object HTMLHeadElement]", - "2,[object HTMLTitleElement]", "3,[object HTMLScriptElement]", - "4,[object HTMLBodyElement]"}, + "2,[object HTMLTitleElement]", "3,[object HTMLScriptElement]", + "4,[object HTMLBodyElement]"}, IE = {}) @HtmlUnitNYI(IE = "not defined") public void entriesForOf() throws Exception { @@ -536,8 +536,8 @@ public void valuesPropertyDescriptor() throws Exception { */ @Test @Alerts(DEFAULT = {"[object HTMLHtmlElement]", "[object HTMLHeadElement]", - "[object HTMLTitleElement]", "[object HTMLScriptElement]", - "[object HTMLBodyElement]"}, + "[object HTMLTitleElement]", "[object HTMLScriptElement]", + "[object HTMLBodyElement]"}, IE = {}) @HtmlUnitNYI(IE = "not defined") public void valuesForOf() throws Exception { diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeTest.java index 305387a3b..528dfe915 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/NodeTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -53,10 +53,11 @@ public class NodeTest extends WebDriverTestCase { public void lastChild() throws Exception { final String html = "\n" + "\n" + "\n" @@ -66,7 +67,7 @@ public void lastChild() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -75,17 +76,18 @@ public void lastChild() throws Exception { @Test @Alerts("true") public void hasChildNodes_true() throws Exception { - final String html = "test_hasChildNodes\n" + final String html = "\n" + "\n" + "\n" + "

                          hello worldChild Node

                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -94,17 +96,18 @@ public void hasChildNodes_true() throws Exception { @Test @Alerts("false") public void hasChildNodes_false() throws Exception { - final String html = "test_hasChildNodes\n" + final String html = "\n" + "\n" + "\n" + "

                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -117,17 +120,18 @@ public void remove() throws Exception { final String html = "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -138,19 +142,20 @@ public void remove() throws Exception { @Alerts({"true", "true"}) public void removeChild() throws Exception { final String html - = "foo\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -160,13 +165,14 @@ public void removeChild() throws Exception { @Alerts("exception") public void removeChildSibling() throws Exception { final String html - = "foo\n" + "\n" @@ -174,7 +180,7 @@ public void removeChildSibling() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -185,23 +191,24 @@ public void removeChildSibling() throws Exception { @Alerts({"true", "true", "true"}) public void replaceChild_Normal() throws Exception { final String html - = "foo\n" + "
                          \n" + "
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -213,15 +220,16 @@ public void replaceChild_Normal() throws Exception { public void nodeNameIsUppercase() throws Exception { final String html = "\n" + "\n" + "\n" + "
                          hello worldChild Node
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -232,14 +240,15 @@ public void nodeNameIsUppercase() throws Exception { public void getChildNodes() throws Exception { final String html = "\n" + "\n" + "\n" @@ -248,7 +257,7 @@ public void getChildNodes() throws Exception { + "

                          Child Node 2-A

                          " + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -257,16 +266,17 @@ public void getChildNodes() throws Exception { @Test @Alerts({"nb nodes: 2", "8", "1"}) public void childNodes_Comments() throws Exception { - final String html = "test\n" + final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -277,16 +287,17 @@ public void childNodes_Comments() throws Exception { "tempNode.name: undefined", "tempNode.name: input1", "tempNode.name: undefined", "tempNode.name: input2", "tempNode.name: undefined"}) public void getChildNodesProperties() throws Exception { - final String html = "test_getChildNodes\n" + final String html = "\n" + "\n" @@ -297,7 +308,7 @@ public void getChildNodesProperties() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -307,20 +318,21 @@ public void getChildNodesProperties() throws Exception { @Test @Alerts({"document: 9", "document.body: 1", "body child 1: 3", "body child 2: 8"}) public void nodeType() throws Exception { - final String html = "test\n" + final String html = "\n" + "\n" + "\n" + "some text\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -331,24 +343,26 @@ public void nodeType() throws Exception { @Alerts("exception") public void attachEvent() throws Exception { final String html = "\n" - + "First\n" + "\n" + "
                          bla
                          \n" + ""; final WebDriver driver = loadPage2(html); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); + driver.findElement(By.id("div1")).click(); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -357,22 +371,23 @@ public void attachEvent() throws Exception { @Test @Alerts({"true", "false"}) public void isSameNode() throws Exception { - final String html = "foo\n" + "
                          \n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -384,21 +399,22 @@ public void isSameNode() throws Exception { @Test @Alerts({"null", "null"}) public void appendChild_parentNode() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -408,21 +424,22 @@ public void appendChild_parentNode() throws Exception { @Test @Alerts({"1", "exception", "1", "exception", "1", "exception", "1"}) public void append_insert_html_node() throws Exception { - final String html = "foohi"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -431,7 +448,8 @@ public void append_insert_html_node() throws Exception { @Test @Alerts("2") public void appendChild_of_DocumentFragment() throws Exception { - final String html = "foo\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -457,29 +475,30 @@ public void appendChild_of_DocumentFragment() throws Exception { @Test @Alerts({"3", "3", "3", "3", "3", "3", "3", "3"}) public void nodePrototype() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -487,9 +506,10 @@ public void nodePrototype() throws Exception { */ @Test @Alerts({"
                          ", "myDiv2", - "
                          one
                          two
                          "}) + "
                          one
                          two
                          "}) public void replaceChild() throws Exception { - final String html = "foo\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -516,9 +536,10 @@ public void replaceChild() throws Exception { */ @Test @Alerts({"
                          ", "myDiv2", - "
                          "}) + "
                          "}) public void replaceChild_EmptyDocumentFragment() throws Exception { - final String html = "foo\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -551,9 +572,10 @@ public void cloneNode_copiesListenerOnlyForIE() throws Exception { "\n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -614,23 +637,24 @@ public void compareDocumentPosition() throws Exception { final String html = "\n" + "\n" + "
                          \n" @@ -643,7 +667,7 @@ public void compareDocumentPosition() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -652,19 +676,21 @@ public void compareDocumentPosition() throws Exception { @Test @Alerts({"0", "16"}) public void compareDocumentPosition2() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + + loadPageVerifyTitle2(html); } /** @@ -673,17 +699,18 @@ public void compareDocumentPosition2() throws Exception { @Test @Alerts("bk") public void prefix() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -692,18 +719,20 @@ public void prefix() throws Exception { @Test @Alerts("") public void xml() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + + loadPageVerifyTitle2(html); } /** @@ -747,7 +776,7 @@ public void insertBefore_undefinedRef() throws Exception { + " var e = document.createElement('div');\n" + " e.innerHTML = 'new element';\n" + " document.body.insertBefore(e, undefined);\n" - + " } catch(e) {alert('exception');}\n" + + " } catch(e) {log('exception');}\n" + "}\n" + "\n" + "\n" @@ -785,18 +814,18 @@ public void insertBefore_noSecondArg() throws Exception { private void insertBefore(final String insertJSLine) throws Exception { final String html = "\n" + "\n" - + " test_insertBefore\n" + " \n" + "\n" @@ -805,7 +834,7 @@ private void insertBefore(final String insertJSLine) throws Exception { + "

                          Sibling

                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -855,18 +884,18 @@ public void insertBeforeFragment_noSecondArg() throws Exception { private void insertBeforeFragment(final String insertJSLine) throws Exception { final String html = "\n" + "\n" - + " test_insertBefore\n" + " \n" + "\n" @@ -875,7 +904,7 @@ private void insertBeforeFragment(final String insertJSLine) throws Exception { + "

                          Sibling

                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -887,21 +916,22 @@ private void insertBeforeFragment(final String insertJSLine) throws Exception { @Test @Alerts({"null", "null"}) public void insertBefore_parentNode() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -913,16 +943,17 @@ public void insertBefore_inTable() throws Exception { final String html = "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -932,20 +963,21 @@ public void insertBefore_inTable() throws Exception { @Alerts(DEFAULT = "exception", IE = {}) public void insertBefore_newElement() throws Exception { - final String html = "foo\n" + final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -955,7 +987,8 @@ public void insertBefore_newElement() throws Exception { @Alerts(DEFAULT = {"4", "3", "abc", "def", "123456", "true", "0", "2", "123", "456", "1", "true"}, IE = {"4", "3", "abc", "def", "123456", "false", "0", "2", "123", "456", "1", "false"}) public void normalize() throws Exception { - final String html = "foo"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -994,18 +1027,19 @@ public void normalize() throws Exception { IE = {"undefined", "[object HTMLHtmlElement]"}) public void parentElement() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1016,24 +1050,25 @@ public void parentElement() throws Exception { IE = {"hi", "null", "abcd", "null"}) public void attributes() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + "
                          abcd
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1046,10 +1081,11 @@ public void addEventListener() throws Exception { "\n" + " \n" + " \n" + " \n" @@ -1057,7 +1093,7 @@ public void addEventListener() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1121,12 +1157,13 @@ public void cloneAttributesAvailable() throws Exception { "\n" + " \n" + " \n" + " \n" @@ -1135,7 +1172,8 @@ public void cloneAttributesAvailable() throws Exception { + " \n" + ""; - final WebDriver driver = loadPageWithAlerts2(html); + final WebDriver driver = loadPageVerifyTitle2(html); + final WebElement element = driver.findElement(By.id("bar")); final String value = element.getAttribute("id"); assertEquals("bar", value); @@ -1151,11 +1189,12 @@ public void setTextContent() throws Exception { "\n" + " \n" + " \n" @@ -1165,7 +1204,7 @@ public void setTextContent() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1178,13 +1217,14 @@ public void cloneParent() throws Exception { "\n" + " \n" + " \n" @@ -1194,7 +1234,7 @@ public void cloneParent() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1207,6 +1247,7 @@ public void before() throws Exception { final String html = "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1235,6 +1276,7 @@ public void after() throws Exception { final String html = "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1263,6 +1305,7 @@ public void replaceWith() throws Exception { final String html = "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1311,7 +1354,7 @@ public void eventListener() throws Exception { final WebDriver driver = loadPage2(html); driver.findElement(By.id("myAnchor")).click(); verifyAlerts(driver, ArrayUtils.subarray(getExpectedAlerts(), 0, 2)); - Thread.sleep(200); // FF60 WebDriver + Thread.sleep(200); assertEquals(getExpectedAlerts()[2], driver.getCurrentUrl()); } @@ -1346,7 +1389,7 @@ public void eventListener_return_false() throws Exception { final WebDriver driver = loadPage2(html); driver.findElement(By.id("myAnchor")).click(); verifyAlerts(driver, ArrayUtils.subarray(getExpectedAlerts(), 0, 2)); - Thread.sleep(200); // FF60 WebDriver + Thread.sleep(200); assertEquals(getExpectedAlerts()[2], driver.getCurrentUrl()); } @@ -1383,7 +1426,7 @@ public void eventListener_returnValue_false() throws Exception { final WebDriver driver = loadPage2(html); driver.findElement(By.id("myAnchor")).click(); verifyAlerts(driver, ArrayUtils.subarray(getExpectedAlerts(), 0, 2)); - Thread.sleep(200); // FF60 WebDriver + Thread.sleep(200); assertEquals(getExpectedAlerts()[2], driver.getCurrentUrl()); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/RangeTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/RangeTest.java index 67bf7bf08..346e51b8f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/RangeTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/RangeTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -149,7 +149,7 @@ public void createContextualFragment2() throws Exception { */ @Test @Alerts({"qwerty", "tyxy", "[object DocumentFragment]", "[object HTMLSpanElement] [object Text]", "qwer", - "[object HTMLSpanElement]"}) + "[object HTMLSpanElement]"}) public void extractContents() throws Exception { final String html = "
                          abcqwertyxyz
                          "; + loadPageWithAlerts2(html); + } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Selection2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Selection2Test.java index cfcee04c8..8ebc8a779 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Selection2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Selection2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/SelectionTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/SelectionTest.java index a1d95f4b4..53f988f07 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/SelectionTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/SelectionTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,6 +19,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; import com.gargoylesoftware.htmlunit.WebDriverTestCase; @@ -38,8 +39,14 @@ public class SelectionTest extends WebDriverTestCase { @Test @Alerts("true") public void equality_selection() throws Exception { - final String html = ""; - loadPageWithAlerts2(html); + final String html = "\n" + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); } /** @@ -48,12 +55,15 @@ public void equality_selection() throws Exception { @Test @Alerts("true") public void equality_getSelection() throws Exception { - final String html = ""; - loadPageWithAlerts2(html); + + " log(window.getSelection()==window.getSelection());\n" + + "} catch (e) {log('exception')}\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); } /** @@ -65,19 +75,20 @@ public void inputSelectionsAreIndependent() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -85,9 +96,9 @@ public void inputSelectionsAreIndependent() throws Exception { */ @Test @Alerts(DEFAULT = {"1:null/0/null/0/true/None/0/", - "2:s2/0/s2/1/false/Range/1/xyz[xyz"}, + "2:s2/0/s2/1/false/Range/1/xyz[xyz"}, IE = {"1:null/0/null/0/true/undefined/0/", - "2:s2/0/s2/1/false/undefined/1/xyz[xyz"}) + "2:s2/0/s2/1/false/undefined/1/xyz[xyz"}) public void selectAllChildren() throws Exception { final String jsSnippet = "" + " alertSelection(selection);\n" @@ -101,13 +112,12 @@ public void selectAllChildren() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = { - "1:s2/0/s2/1/false/Range/1/xyz[xyz", - "2:s2/0/s3/1/false/Range/1/xyzfoo[xyzfoo", - "3:s2/0/s3/2/false/Range/1/xyzfoo---[xyzfoo---", - "4:s2/0/s3/3/false/Range/1/xyzfoo---foo[xyzfoo---foo"}, + @Alerts(DEFAULT = {"1:s2/0/s2/1/false/Range/1/xyz[xyz", + "2:s2/0/s3/1/false/Range/1/xyzfoo[xyzfoo", + "3:s2/0/s3/2/false/Range/1/xyzfoo---[xyzfoo---", + "4:s2/0/s3/3/false/Range/1/xyzfoo---foo[xyzfoo---foo"}, IE = {"1:s2/0/s2/1/false/undefined/1/xyz[xyz", - "selection.extend not available"}) + "selection.extend not available"}) public void extend() throws Exception { final String jsSnippet = "" + " selection.selectAllChildren(s2);\n" @@ -119,7 +129,7 @@ public void extend() throws Exception { + " alertSelection(selection);\n" + " selection.extend(s3, 3);\n" + " alertSelection(selection);\n" - + " } else { alert('selection.extend not available'); }\n"; + + " } else { log('selection.extend not available'); }\n"; tester(jsSnippet); } @@ -128,10 +138,10 @@ public void extend() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = { "1:s2/0/s2/1/false/Range/1/xyz[xyz", - "2:s2/0/s2/0/true/Caret/1/["}, - IE = { "1:s2/0/s2/1/false/undefined/1/xyz[xyz", - "2:s2/0/s2/0/true/undefined/1/["}) + @Alerts(DEFAULT = {"1:s2/0/s2/1/false/Range/1/xyz[xyz", + "2:s2/0/s2/0/true/Caret/1/["}, + IE = {"1:s2/0/s2/1/false/undefined/1/xyz[xyz", + "2:s2/0/s2/0/true/undefined/1/["}) public void collapseToStart() throws Exception { final String jsSnippet = "" + " selection.selectAllChildren(s2);\n" @@ -146,10 +156,10 @@ public void collapseToStart() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = { "1:s2/0/s2/1/false/Range/1/xyz[xyz", - "2:s2/1/s2/1/true/Caret/1/["}, - IE = { "1:s2/0/s2/1/false/undefined/1/xyz[xyz", - "2:s2/1/s2/1/true/undefined/1/["}) + @Alerts(DEFAULT = {"1:s2/0/s2/1/false/Range/1/xyz[xyz", + "2:s2/1/s2/1/true/Caret/1/["}, + IE = {"1:s2/0/s2/1/false/undefined/1/xyz[xyz", + "2:s2/1/s2/1/true/undefined/1/["}) public void collapseToEnd() throws Exception { final String jsSnippet = "" + " selection.selectAllChildren(s2);\n" @@ -165,7 +175,7 @@ public void collapseToEnd() throws Exception { */ @Test @Alerts(DEFAULT = {"1:s2/0/s2/1/false/Range/1/xyz[xyz", - "2:null/0/null/0/true/None/0/"}, + "2:null/0/null/0/true/None/0/"}, IE = {"1:s2/0/s2/1/false/undefined/1/xyz[xyz", "exception"}) public void empty() throws Exception { final String jsSnippet = "" @@ -182,11 +192,14 @@ public void empty() throws Exception { */ @Test @Alerts(DEFAULT = {"1:null/0/null/0/true/None/0/", - "2:null/0/null/0/true/None/0/", - "3:s2/1/s3/1/false/Range/1/foo[foo"}, + "2:null/0/null/0/true/None/0/", + "3:s2/1/s3/1/false/Range/1/foo[foo"}, IE = {"1:null/0/null/0/true/undefined/0/", - "2:null/0/null/0/true/undefined/0/", - "3:s2/1/s3/1/false/undefined/1/foo[foo"}) + "2:[object Text]/0/[object Text]/0/true/undefined/1/[", + "3:s2/1/s3/1/false/undefined/1/foo[foo"}) + @HtmlUnitNYI(IE = {"1:null/0/null/0/true/undefined/0/", + "2:null/0/null/0/true/undefined/0/", + "3:s2/1/s3/1/false/undefined/1/foo[foo"}) public void addRange() throws Exception { final String jsSnippet = "" + " alertSelection(selection);\n" @@ -207,11 +220,11 @@ public void addRange() throws Exception { */ @Test @Alerts(DEFAULT = {"1:null/0/null/0/true/None/0/", - "2:s1/1/s3/1/false/Range/1/xyzfoo[xyzfoo", - "3:null/0/null/0/true/None/0/"}, + "2:s1/1/s3/1/false/Range/1/xyzfoo[xyzfoo", + "3:null/0/null/0/true/None/0/"}, IE = {"1:null/0/null/0/true/undefined/0/", - "2:s1/1/s3/1/false/undefined/1/xyzfoo[xyzfoo", - "3:null/0/null/0/true/undefined/0/"}) + "2:s1/1/s3/1/false/undefined/1/xyzfoo[xyzfoo", + "3:null/0/null/0/true/undefined/0/"}) public void removeAllRanges() throws Exception { final String jsSnippet = "" + " alertSelection(selection);\n" @@ -233,9 +246,9 @@ public void removeAllRanges() throws Exception { */ @Test @Alerts(DEFAULT = {"1:s1/1/s3/1/false/Range/1/xyzfoo[xyzfoo", - "2:null/0/null/0/true/None/0/"}, + "2:null/0/null/0/true/None/0/"}, IE = {"1:s1/1/s3/1/false/undefined/1/xyzfoo[xyzfoo", - "2:null/0/null/0/true/undefined/0/"}) + "2:null/0/null/0/true/undefined/0/"}) public void removeAllRanges2() throws Exception { final String jsSnippet = "" + " var range = document.createRange();\n" @@ -255,17 +268,17 @@ public void removeAllRanges2() throws Exception { */ @Test @Alerts(DEFAULT = {"1:null/0/null/0/true/None/0/", - "2:s1/0/s1/1/false/Range/1/abc[abc", - "3:null/0/null/0/true/None/0/"}, + "2:s1/0/s1/1/false/Range/1/abc[abc", + "3:null/0/null/0/true/None/0/"}, FF = {"1:null/0/null/0/true/None/0/", - "2:s1/1/s3/1/false/Range/2/abcxyzfoo[abc[xyzfoo", - "3:null/0/null/0/true/None/0/"}, + "2:s1/1/s3/1/false/Range/2/abcxyzfoo[abc[xyzfoo", + "3:null/0/null/0/true/None/0/"}, FF78 = {"1:null/0/null/0/true/None/0/", - "2:s1/1/s3/1/false/Range/2/abcxyzfoo[abc[xyzfoo", - "3:null/0/null/0/true/None/0/"}, + "2:s1/1/s3/1/false/Range/2/abcxyzfoo[abc[xyzfoo", + "3:null/0/null/0/true/None/0/"}, IE = {"1:null/0/null/0/true/undefined/0/", - "2:s1/0/s1/1/false/undefined/1/abc[abc", - "3:null/0/null/0/true/undefined/0/"}) + "2:s1/0/s1/1/false/undefined/1/abc[abc", + "3:null/0/null/0/true/undefined/0/"}) @NotYetImplemented public void selectAllChildrenAddRange() throws Exception { final String jsSnippet = "" @@ -288,14 +301,12 @@ public void selectAllChildrenAddRange() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = { - "1:null/0/null/0/true/None/0/", - "2:s1/0/s1/1/false/Range/1/abc[abc", - "3:null/0/null/0/true/None/0/"}, - IE = { - "1:null/0/null/0/true/undefined/0/", - "2:s1/0/s1/1/false/undefined/1/abc[abc", - "3:null/0/null/0/true/undefined/0/"}) + @Alerts(DEFAULT = {"1:null/0/null/0/true/None/0/", + "2:s1/0/s1/1/false/Range/1/abc[abc", + "3:null/0/null/0/true/None/0/"}, + IE = {"1:null/0/null/0/true/undefined/0/", + "2:s1/0/s1/1/false/undefined/1/abc[abc", + "3:null/0/null/0/true/undefined/0/"}) public void addRangeSelectAllChildren() throws Exception { final String jsSnippet = "" + " alertSelection(selection);\n" @@ -318,21 +329,21 @@ public void addRangeSelectAllChildren() throws Exception { */ @Test @Alerts(DEFAULT = {"1:null/0/null/0/true/None/0/", - "2:s1/0/s1/1/false/Range/1/abc[abc", - "3:s1/0/s1/1/false/Range/1/abc[abc", - "4:null/0/null/0/true/None/0/"}, + "2:s1/0/s1/1/false/Range/1/abc[abc", + "3:s1/0/s1/1/false/Range/1/abc[abc", + "4:null/0/null/0/true/None/0/"}, FF = {"1:null/0/null/0/true/None/0/", - "2:s1/1/s2/1/false/Range/2/abcxyz[abc[xyz", - "3:s2/1/s3/3/false/Range/3/abcxyzfoo---foo[abc[xyz[foo---foo", - "4:null/0/null/0/true/None/0/"}, + "2:s1/1/s2/1/false/Range/2/abcxyz[abc[xyz", + "3:s2/1/s3/3/false/Range/3/abcxyzfoo---foo[abc[xyz[foo---foo", + "4:null/0/null/0/true/None/0/"}, FF78 = {"1:null/0/null/0/true/None/0/", "2:s1/1/s2/1/false/Range/2/abcxyz[abc[xyz", "3:s2/1/s3/3/false/Range/3/abcxyzfoo---foo[abc[xyz[foo---foo", "4:null/0/null/0/true/None/0/"}, IE = {"1:null/0/null/0/true/undefined/0/", - "2:s1/0/s1/1/false/undefined/1/abc[abc", - "3:s1/0/s1/1/false/undefined/1/abc[abc", - "4:null/0/null/0/true/undefined/0/"}) + "2:s1/0/s1/1/false/undefined/1/abc[abc", + "3:s1/0/s1/1/false/undefined/1/abc[abc", + "4:null/0/null/0/true/undefined/0/"}) @NotYetImplemented public void addRangeAddRange() throws Exception { final String jsSnippet = "" @@ -364,11 +375,11 @@ public void addRangeAddRange() throws Exception { */ @Test @Alerts(DEFAULT = {"1:[object Text]/1/[object Text]/2/false/Range/1/yzfo[yzfo", - "2:null/0/null/0/true/None/0/", - "false", "true"}, + "2:null/0/null/0/true/None/0/", + "false", "true"}, IE = {"1:[object Text]/1/[object Text]/2/false/undefined/1/yzfo[yzfo", - "2:null/0/null/0/true/undefined/0/", - "false", "true"}) + "2:null/0/null/0/true/undefined/0/", + "false", "true"}) public void aLittleBitOfEverything_removeRange() throws Exception { final String jsSnippet = "" + " var range = document.createRange();\n" @@ -378,9 +389,9 @@ public void aLittleBitOfEverything_removeRange() throws Exception { + " alertSelection(selection);\n" + " selection.removeRange(range);\n" + " alertSelection(selection);\n" - + " alert(range.collapsed);\n" + + " log(range.collapsed);\n" + " selection.addRange(range);\n" - + " alert(selection.getRangeAt(0) == selection.getRangeAt(0));\n"; + + " log(selection.getRangeAt(0) == selection.getRangeAt(0));\n"; tester(jsSnippet); } @@ -391,6 +402,7 @@ private void tester(final String jsSnippet) throws Exception { + " abcxyzfoo---foo\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -423,7 +435,9 @@ private void tester(final String jsSnippet) throws Exception { @Test @Alerts(DEFAULT = {"", "null-0", "", "null-0", "", "null-0", "", "null-0"}, FF = {"", "null-0", "", "null-0", "null", "null"}, - FF78 = {"", "null-0", "", "null-0", "null", "null"}) + FF78 = {"", "null-0", "", "null-0", "null", "null"}, + IE = {"", "[object Text]-1", "", "null-0", "", "null-0", "", "null-0"}) + @HtmlUnitNYI(IE = {"", "null-0", "", "null-0", "", "null-0", "", "null-0"}) public void getSelection_display() throws Exception { final String html = "\n" + "\n" @@ -434,12 +448,13 @@ public void getSelection_display() throws Exception { + "
                          \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts({"", "", ""}) + public void testToString() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "\n" + + ""; + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TextRangeTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TextRangeTest.java index 2d6fba663..5bdf298c4 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TextRangeTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TextRangeTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TextTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TextTest.java index f50aa8a04..9c7d8b69e 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TextTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TextTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TreeWalkerTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TreeWalkerTest.java index 4f2c06ada..ac345acda 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TreeWalkerTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/TreeWalkerTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathEvaluatorTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathEvaluatorTest.java index ffb653863..6d7d3456c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathEvaluatorTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathEvaluatorTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathResultTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathResultTest.java index 2efb82bd7..6522ebe4c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathResultTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/dom/XPathResultTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/AudioProcessingEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/AudioProcessingEventTest.java index 014599408..cd8076e1a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/AudioProcessingEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/AudioProcessingEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -36,11 +36,11 @@ public class AudioProcessingEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + " }\n"; /** @@ -50,16 +50,17 @@ public class AudioProcessingEventTest extends WebDriverTestCase { @Alerts("exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -75,7 +76,8 @@ public void create_ctor() throws Exception { EDGE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -103,18 +105,19 @@ public void create_ctorAllDetails() throws Exception { @Alerts("exception") public void create_ctorMissingDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -125,6 +128,7 @@ public void create_ctorMissingDetails() throws Exception { public void create_createEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" @@ -159,7 +164,7 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeInstallPromptEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeInstallPromptEventTest.java index 513c8479c..03541c0a8 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeInstallPromptEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeInstallPromptEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,11 +32,11 @@ public class BeforeInstallPromptEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + " }\n"; /** @@ -49,18 +49,19 @@ public class BeforeInstallPromptEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -72,18 +73,19 @@ public void create_ctor() throws Exception { EDGE = {"[object BeforeInstallPromptEvent]", "undefined", "false", "false", "false"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -96,18 +98,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -120,18 +123,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -141,18 +145,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -165,18 +170,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -189,19 +195,20 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -217,8 +224,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -226,6 +234,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeUnloadEvent2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeUnloadEvent2Test.java index f4abd4707..fd0fa60d9 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeUnloadEvent2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeUnloadEvent2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeUnloadEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeUnloadEventTest.java index 3068dc3f1..274c7ed04 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeUnloadEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BeforeUnloadEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BlobEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BlobEventTest.java index 75ded327b..a1940c38c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BlobEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/BlobEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,12 +32,12 @@ public class BlobEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" - + " alert(event.data);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + + " log(event.data);\n" + " }\n"; /** @@ -48,18 +48,19 @@ public class BlobEventTest extends WebDriverTestCase { FF78 = {"[object BlobEvent]", "blob", "false", "false", "false", "null"}) public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -70,18 +71,19 @@ public void create_ctor() throws Exception { @HtmlUnitNYI(FF78 = {"[object BlobEvent]", "undefined", "false", "false", "false", "null"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -92,18 +94,19 @@ public void create_ctorWithoutType() throws Exception { FF78 = {"[object BlobEvent]", "42", "false", "false", "false", "null"}) public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -114,18 +117,19 @@ public void create_ctorNumericType() throws Exception { FF78 = {"[object BlobEvent]", "null", "false", "false", "false", "null"}) public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -135,18 +139,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -157,18 +162,19 @@ public void create_ctorUnknownType() throws Exception { FF78 = {"[object BlobEvent]", "HtmlUnitEvent", "false", "false", "false", "null"}) public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -179,7 +185,8 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -205,19 +212,20 @@ public void create_ctorAllDetails() throws Exception { FF78 = {"[object BlobEvent]", "blob", "false", "false", "false", "null"}) public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -227,20 +235,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { @Alerts("exception") public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -254,8 +263,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -263,6 +273,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/CloseEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/CloseEventTest.java index 5a93f75fa..f36cfa9f6 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/CloseEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/CloseEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -34,16 +34,16 @@ public class CloseEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" + " if (event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" - + " alert(event.code);\n" - + " alert(event.reason);\n" - + " alert(event.wasClean);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + + " log(event.code);\n" + + " log(event.reason);\n" + + " log(event.wasClean);\n" + " } else {\n" - + " alert('no event');\n" + + " log('no event');\n" + " }\n" + " }\n"; @@ -55,18 +55,19 @@ public class CloseEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -77,7 +78,8 @@ public void create_ctor() throws Exception { IE = "exception") public void create_ctorWithDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -107,18 +109,19 @@ public void create_ctorWithDetails() throws Exception { @BuggyWebDriver(IE = {"[object CloseEvent]", "", "false", "false", "undefined", "0", "exception"}) public void create_createEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -131,20 +134,21 @@ public void create_createEvent() throws Exception { IE = {"[object CloseEvent]", "close", "true", "false", "undefined", "42", "time to close", "true"}) public void initCloseEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/CompositionEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/CompositionEventTest.java index 2e779f94a..e9356459f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/CompositionEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/CompositionEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,15 +32,15 @@ public class CompositionEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" - + " alert(event.view == window);\n" + + " log(event.view == window);\n" - + " alert(event.data);\n" + + " log(event.data);\n" + " }\n"; /** @@ -51,18 +51,19 @@ public class CompositionEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -76,18 +77,19 @@ public void create_ctor() throws Exception { FF78 = {"[object CompositionEvent]", "undefined", "false", "false", "false", "false", ""}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -98,18 +100,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -120,18 +123,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -141,18 +145,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -163,18 +168,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -185,20 +191,21 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -209,19 +216,20 @@ public void create_ctorAllDetails() throws Exception { IE = "exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -232,20 +240,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { IE = "exception") public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -258,8 +267,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -267,6 +277,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/CustomEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/CustomEventTest.java index 13b366019..daa77f321 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/CustomEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/CustomEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -33,12 +33,12 @@ public class CustomEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" - + " alert(event.detail);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + + " log(event.detail);\n" + " }\n"; /** @@ -49,18 +49,19 @@ public class CustomEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -74,18 +75,19 @@ public void create_ctor() throws Exception { FF78 = {"[object CustomEvent]", "undefined", "false", "false", "false", "null"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -96,18 +98,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -118,18 +121,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -139,18 +143,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -161,18 +166,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -183,20 +189,21 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -205,16 +212,17 @@ public void create_ctorAllDetails() throws Exception { @Test @Alerts("function") public void initCustomEvent() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -224,12 +232,13 @@ public void initCustomEvent() throws Exception { @Alerts({"true", "details", "I was here"}) public void dispatchEvent() throws Exception { final String html = - "First\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceMotionEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceMotionEventTest.java index c6d73b095..edc540802 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceMotionEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceMotionEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,16 +32,16 @@ public class DeviceMotionEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" - // + " alert(event.acceleration);\n" - // + " alert(event.accelerationIncludingGravity);\n" - // + " alert(event.rotationRate);\n" - // + " alert(event.interval);\n" + // + " log(event.acceleration);\n" + // + " log(event.accelerationIncludingGravity);\n" + // + " log(event.rotationRate);\n" + // + " log(event.interval);\n" + " }\n"; /** @@ -52,18 +52,19 @@ public class DeviceMotionEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -77,18 +78,19 @@ public void create_ctor() throws Exception { FF78 = {"[object DeviceMotionEvent]", "undefined", "false", "false", "false"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -99,18 +101,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -121,18 +124,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -142,18 +146,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -164,18 +169,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -186,20 +192,21 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -210,19 +217,20 @@ public void create_ctorAllDetails() throws Exception { IE = "exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -233,20 +241,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { IE = "exception") public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -259,8 +268,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -268,6 +278,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceOrientationEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceOrientationEventTest.java index 50a03e3ca..eb4880a67 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceOrientationEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/DeviceOrientationEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,18 +32,18 @@ public class DeviceOrientationEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" - // + " alert(event.absolute);\n" - // + " alert(event.alpha);\n" - // + " alert(event.beta);\n" - // + " alert(event.gamma);\n" - // + " alert(event.webkitCompassHeading);\n" - // + " alert(event.webkitCompassAccuracy);\n" + // + " log(event.absolute);\n" + // + " log(event.alpha);\n" + // + " log(event.beta);\n" + // + " log(event.gamma);\n" + // + " log(event.webkitCompassHeading);\n" + // + " log(event.webkitCompassAccuracy);\n" + " }\n"; /** @@ -54,18 +54,19 @@ public class DeviceOrientationEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -79,18 +80,19 @@ public void create_ctor() throws Exception { FF78 = {"[object DeviceOrientationEvent]", "undefined", "false", "false", "false"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -101,18 +103,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -123,18 +126,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -144,18 +148,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -166,18 +171,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -188,20 +194,21 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -212,19 +219,20 @@ public void create_ctorAllDetails() throws Exception { IE = "exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -235,20 +243,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { IE = "exception") public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -261,8 +270,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -270,6 +280,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/DragEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/DragEventTest.java index fa5cef63e..03e3004f6 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/DragEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/DragEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,11 +32,11 @@ public class DragEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" // TODO all properties + " }\n"; @@ -49,18 +49,19 @@ public class DragEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -74,18 +75,19 @@ public void create_ctor() throws Exception { FF78 = {"[object DragEvent]", "undefined", "false", "false", "false"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -96,18 +98,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -118,18 +121,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -139,18 +143,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -161,18 +166,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -183,20 +189,21 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -207,19 +214,20 @@ public void create_ctorAllDetails() throws Exception { IE = "exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -230,20 +238,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { IE = "exception") public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -256,8 +265,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -265,6 +275,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/ErrorEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/ErrorEventTest.java index 4b0aa4616..638fb8597 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/ErrorEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/ErrorEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,11 +32,11 @@ public class ErrorEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" // TODO all properties + " }\n"; @@ -49,18 +49,19 @@ public class ErrorEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -74,18 +75,19 @@ public void create_ctor() throws Exception { FF78 = {"[object ErrorEvent]", "undefined", "false", "false", "false"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -96,18 +98,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -118,18 +121,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -139,18 +143,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -161,18 +166,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -183,20 +189,21 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -207,19 +214,20 @@ public void create_ctorAllDetails() throws Exception { IE = "exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -230,20 +238,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { IE = "exception") public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -256,8 +265,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -265,6 +275,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event2Test.java index 5d22d63d0..274fc1ec4 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -431,16 +431,20 @@ private void testTypeEvents(final String firstSnippet, final String secondSnippe @Alerts({"pass", "fail:66", "fail:undefined"}) public void eventOnKeyDown() throws Exception { final String html - = "\n" + = "" + + "" + + "\n" + "\n" + " \n" + " \n" + "
                          abc
                          \n" @@ -486,11 +493,11 @@ public void testKeys() throws Exception { int i = 0; final WebDriver driver = loadPage2(html); - verifyAlerts(driver, alerts[i++], alerts[i++], alerts[i++], alerts[i++], alerts[i++]); + verifyTitle2(driver, alerts[i++], alerts[i++], alerts[i++], alerts[i++], alerts[i++]); final WebElement element = driver.findElement(By.id("div")); element.click(); - verifyAlerts(driver, alerts[i++], alerts[i++], alerts[i++], alerts[i++], alerts[i++]); + verifyTitle2(driver, alerts); } /** @@ -532,18 +539,18 @@ public void preventDefault() throws Exception { public void dOMContentLoaded() throws Exception { final String html = "\n" + "\n" - + "DOMContentLoaded\n" + "\n" + "\n" - + "\n" + + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -554,8 +561,8 @@ public void dOMContentLoaded() throws Exception { public void testPreventDefault() throws Exception { final String html = "\n" + "\n" - + "preventDefault - copied from mozilla.org\n" + "\n" + "\n" @@ -593,7 +600,7 @@ public void testPreventDefault() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -608,12 +615,13 @@ public void eventTransmission() throws Exception { + "\n" + " foo\n" + " \n" @@ -622,7 +630,7 @@ public void eventTransmission() throws Exception { final WebDriver driver = loadPage2(html); driver.findElement(By.id("clickMe")).click(); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -634,6 +642,7 @@ public void eventPhase() throws Exception { final String html = "\n" + "\n" @@ -658,7 +667,7 @@ public void eventPhase() throws Exception { final WebDriver driver = loadPage2(html); driver.findElement(By.id("b")).click(); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -670,10 +679,11 @@ public void eventPhase() throws Exception { "span bubbling", "div", "div bubbling", "window bubbling"}) public void eventCapturingAndBubbling() throws Exception { final String html = "\n" - + "foo\n" + + "\n" + "\n" + "\n" + "\n" - + "
                          \n" + + "
                          \n" + " blabla\n" + "
                          \n" + ""; @@ -697,7 +707,7 @@ public void eventCapturingAndBubbling() throws Exception { final WebDriver driver = loadPage2(html); driver.findElement(By.id("theSpan")).click(); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -717,11 +727,9 @@ public void stopPropagation() throws Exception { */ @Test @Alerts(DEFAULT = {"window capturing", "div capturing", "span capturing", "div", "window capturing", "false", - "true"}, - CHROME = {"window capturing", "div capturing", "span capturing", "div", "window capturing", "false", "true", - "div capturing", "true", "true", "span capturing", "true", "true"}, + "true"}, IE = {"window capturing", "div capturing", "span capturing", "div", "window capturing", "false", "false", - "div capturing", "false", "false", "span capturing", "false", "true"}) + "div capturing", "false", "false", "span capturing", "false", "true"}) @NotYetImplemented(IE) public void stopPropagationCancelBubble() throws Exception { stopPropagation("cancelBubble=true"); @@ -729,16 +737,17 @@ public void stopPropagationCancelBubble() throws Exception { private void stopPropagation(final String cancelMethod) throws Exception { final String html = "\n" - + "foo\n" + + "\n" + "\n" + "\n" + "\n" - + "
                          \n" + + "
                          \n" + " blabla\n" + "
                          \n" + ""; @@ -762,10 +771,10 @@ private void stopPropagation(final String cancelMethod) throws Exception { final WebDriver driver = loadPage2(html); driver.findElement(By.id("theSpan")).click(); - verifyAlerts(driver, alerts[i++], alerts[i++], alerts[i++], alerts[i++]); + verifyTitle2(driver, alerts[i++], alerts[i++], alerts[i++], alerts[i++]); driver.findElement(By.id("theSpan")).click(); - verifyAlerts(driver, alerts[i++], alerts[i++], alerts[i++]); + verifyTitle2(driver, alerts); } /** @@ -775,11 +784,12 @@ private void stopPropagation(final String cancelMethod) throws Exception { @Alerts({"w", "w 2", "d", "d 2", "s", "s 2", "w", "w 2"}) public void stopPropagation_WithMultipleEventHandlers() throws Exception { final String html = "\n" - + "foo\n" + + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -922,11 +934,11 @@ public void returnPriority() throws Exception { */ @Test @Alerts(DEFAULT = {"nullwindow at beforeunload rv=", - "window onbeforeunload rv=1", - "window at beforeunload rv=1"}, + "window onbeforeunload rv=1", + "window at beforeunload rv=1"}, IE = {"nullwindow at beforeunload rv=undefined", - "window onbeforeunload rv=1", - "window at beforeunload rv=2"}) + "window onbeforeunload rv=1", + "window at beforeunload rv=2"}) public void returnPriority2() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event3Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event3Test.java index 2f0edc9df..bdf431513 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event3Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event3Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event4Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event4Test.java index 02d23184f..41cc6b53d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event4Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event4Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventHandlerTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventHandlerTest.java index 2c7627059..e6cc72508 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventHandlerTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventHandlerTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,11 +20,14 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.WebDriverTestCase; +import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; /** * Tests for {@link EventHandler}. * * @author Ahmed Ashour + * @author Ronald Brill */ @RunWith(BrowserRunner.class) public class EventHandlerTest extends WebDriverTestCase { @@ -34,15 +37,56 @@ public class EventHandlerTest extends WebDriverTestCase { */ @Test public void caller() throws Exception { - final String html = "\n" + + "\n" + + "\n" + ""; final WebDriver driver = loadPage2(html); - final String alert = getCollectedAlerts(driver, 1).get(0); - assertTrue(alert.contains("function onload(event)")); + assertTrue(driver.getTitle().contains("function onload(event)")); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"function onload(event) { test() }", + "function onload(event) { test() }", + "function onload(event) { test() }"}) + @HtmlUnitNYI(CHROME = {"function onload(event) { test(); }", + "function onload(event) { test(); }", + "function onload(event) { test(); }"}, + EDGE = {"function onload(event) { test(); }", + "function onload(event) { test(); }", + "function onload(event) { test(); }"}, + FF = {"function onload(event) { test(); }", + "function onload(event) { test(); }", + "function onload(event) { test(); }"}, + FF78 = {"function onload(event) { test(); }", + "function onload(event) { test(); }", + "function onload(event) { test(); }"}, + IE = {"function onload(event) { test(); }", + "function onload(event) { test(); }", + "function onload(event) { test(); }"}) + public void testToString() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventListenersContainerTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventListenersContainerTest.java index 0870eabd6..29f4f6d76 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventListenersContainerTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventListenersContainerTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -40,15 +40,16 @@ public void addEventListener() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -78,15 +79,16 @@ public void addEventListener_node() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -116,6 +118,7 @@ public void addEventListener_no_handleEvent() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventTargetTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventTargetTest.java index 6010fefb4..d62d6acf8 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventTargetTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventTargetTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventTest.java index 83fd6f8a4..63dd90cab 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,6 +27,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; import com.gargoylesoftware.htmlunit.WebDriverTestCase; import com.gargoylesoftware.htmlunit.html.HtmlPageTest; @@ -46,11 +47,11 @@ public class EventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + " }\n"; /** @@ -61,18 +62,19 @@ public class EventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -83,20 +85,21 @@ public void create_ctor() throws Exception { IE = "exception") public void create_ctorWithDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -107,20 +110,21 @@ public void create_ctorWithDetails() throws Exception { IE = "exception") public void create_ctorWithDetailsBoolAsString() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -131,20 +135,21 @@ public void create_ctorWithDetailsBoolAsString() throws Exception { IE = "exception") public void create_ctorWithDetailsBoolAsNumber() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -155,20 +160,21 @@ public void create_ctorWithDetailsBoolAsNumber() throws Exception { IE = "exception") public void create_ctorWithDetailsBoolAsObject() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -179,20 +185,21 @@ public void create_ctorWithDetailsBoolAsObject() throws Exception { IE = "exception") public void create_ctorWithDetailsBoolAsUndefined() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -203,20 +210,21 @@ public void create_ctorWithDetailsBoolAsUndefined() throws Exception { IE = "exception") public void create_ctorWithDetailsBoolAsNull() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -227,18 +235,19 @@ public void create_ctorWithDetailsBoolAsNull() throws Exception { IE = {"[object Event]", "", "false", "false", "undefined"}) public void create_createEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -248,21 +257,23 @@ public void create_createEvent() throws Exception { @Alerts({"DOM2: [object Event]", "DOM3: [object Event]", "vendor: [object Event]"}) public void create_createEventForDifferentTypes() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + + loadPageVerifyTitle2(html); } /** @@ -273,19 +284,20 @@ public void create_createEventForDifferentTypes() throws Exception { IE = {"[object Event]", "event", "true", "false", "undefined"}) public void initEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -300,7 +312,8 @@ public void thisDefined() throws Exception { = "\n" + "\n" + "\n" + ""; onClickPageTest(content); @@ -318,7 +331,8 @@ public void setPropOnThisDefined() throws Exception { = "\n" + "\n" + "\n" @@ -334,8 +348,12 @@ public void setPropOnThisDefined() throws Exception { @Alerts("defined") public void eventArgDefinedByWrapper() throws Exception { final String content - = "\n" - + "\n" + = "\n" + + "\n" + + "\n" + + "\n" + ""; onClickPageTest(content); } @@ -352,7 +370,8 @@ public void eventArgDefined() throws Exception { + "\n" + "\n" + "\n" + ""; @@ -370,8 +389,9 @@ public void eventTargetSameAsThis() throws Exception { + "\n" + "\n" + "\n" @@ -389,10 +409,11 @@ public void eventSrcElementSameAsThis() throws Exception { = "\n" + "\n" + "\n" @@ -412,8 +433,9 @@ public void eventCurrentTargetSameAsThis() throws Exception { + "\n" + "\n" + "\n" @@ -432,8 +454,9 @@ public void currentTarget_sameListenerForEltAndWindow() throws Exception { = "\n" + "
                          click me
                          \n" + "\n" + ""; - loadPageWithAlerts2(content); + loadPageVerifyTitle2(content); } /** @@ -510,7 +534,12 @@ public void typing_input_search() throws Exception { * @throws Exception if an error occurs */ @Test - @Alerts({"123a4a", "1a2a3ab4ab1ab2ab3abc4abc"}) + @Alerts(DEFAULT = {"124", "124124"}, + FF = {"1234", "12341234"}, + FF78 = {"1234", "12341234"}, + IE = {"1234", "12341234"}) + @HtmlUnitNYI(CHROME = {"1234", "12341234"}, + EDGE = {"1234", "12341234"}) public void typing_input_number() throws Exception { testTyping("var x = '';\n" - + "function log(s) { x += s; }\n" + + "\n" + "
                          \n" - + opening + " id='t' onkeydown='log(1 + this.value)' " - + "onkeypress='log(2 + this.value)' " - + "oninput='log(3 + this.value)'" - + "onkeyup='log(4 + this.value)'>" + closing + + opening + " id='t' onkeydown='msg(1 + this.value)' " + + "onkeypress='msg(2 + this.value)' " + + "oninput='msg(3 + this.value)'" + + "onkeyup='msg(4 + this.value)'>" + closing + "
                          \n" - + "
                          abc
                          \n" + + "
                          abc
                          \n" + ""; final WebDriver driver = loadPage2(html); driver.findElement(By.id("t")).sendKeys("a"); driver.findElement(By.id("d")).click(); - verifyAlerts(driver, getExpectedAlerts()[0]); + verifyTitle2(driver, getExpectedAlerts()[0]); driver.findElement(By.id("t")).sendKeys("bc"); driver.findElement(By.id("d")).click(); - verifyAlerts(driver, getExpectedAlerts()[1]); + verifyTitle2(driver, getExpectedAlerts()[0], getExpectedAlerts()[1]); } private void onClickPageTest(final String html) throws Exception { final WebDriver driver = loadPage2(html); driver.findElement(By.id("clickId")).click(); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -563,8 +594,13 @@ private void onClickPageTest(final String html) throws Exception { public void thisInEventHandler() throws Exception { final String html = "\n" + + "\n" + + "\n" + + "\n" + "\n" - + " \n" + + " \n" + " \n" + " \n" + "\n" @@ -599,7 +636,7 @@ public void iframeOnload() throws Exception { + ""; getMockWebConnection().setDefaultResponse(""); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -613,13 +650,14 @@ public void iframeOnload2() throws Exception { + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -632,16 +670,17 @@ public void ieWindowEvent() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -656,13 +695,17 @@ public void ieWindowEvent() throws Exception { @Alerts({"1", "2"}) public void commentInEventHandlerDeclaration() throws Exception { final String html - = "\n" - + "\n" + + "log(2)'>\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -674,15 +717,16 @@ public void commentInEventHandlerDeclaration() throws Exception { public void nullEventHandler() throws Exception { final String html = "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -693,14 +737,16 @@ public void nullEventHandler() throws Exception { IE = {"[object Event]", "load", "false", "false", "undefined"}) public void onload() throws Exception { final String html = - ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -710,14 +756,16 @@ public void onload() throws Exception { @Alerts({"[object Event]", "number"}) public void timeStamp() throws Exception { final String html = - ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -759,27 +807,28 @@ public void initEventCaseSensitive() throws Exception { private void testInitEvent(final String eventType) throws Exception { final String html = "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -789,14 +838,15 @@ private void testInitEvent(final String eventType) throws Exception { @Alerts({"true", "I was here"}) public void firedEvent_equals_original_event() throws Exception { final String html = - "First\n" + "\n" + "\n" + "\n" + "
                          toti
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -819,17 +869,17 @@ public void firedEvent_equals_original_event() throws Exception { */ @Test @Alerts(DEFAULT = {"e-0", "e-1", "e-2", "e-3", "e-4", "e-5", - "e-6", "e-7", "e-8", "e-9", "e-10", "e-11", - "e-12", "e-13", "e-14", "e-15", "e-16", "e-17", "e-18", - "e-19", "e-20", "e-21", "e-22", "e-23", "e-24", - "e-25", "e-26", "e-27", "e-28", "e-29", "e-30", "e-31", "e-32", - "e-33"}, + "e-6", "e-7", "e-8", "e-9", "e-10", "e-11", + "e-12", "e-13", "e-14", "e-15", "e-16", "e-17", "e-18", + "e-19", "e-20", "e-21", "e-22", "e-23", "e-24", + "e-25", "e-26", "e-27", "e-28", "e-29", "e-30", "e-31", "e-32", + "e-33"}, FF = {"e-0", "1", "e-2", "e-3", "e-4", "e-5", - "2", "e-7", "e-8", "e-9", "e-10", "e-11", - "e-12", "e-13", "e-14", "e-15", "e-16", "e-17", "8", - "e-19", "e-20", "e-21", "e-22", "e-23", "e-24", - "e-25", "e-26", "e-27", "e-28", "e-29", "4", "e-31", "e-32", - "e-33"}, + "2", "e-7", "e-8", "e-9", "e-10", "e-11", + "e-12", "e-13", "e-14", "e-15", "e-16", "e-17", "8", + "e-19", "e-20", "e-21", "e-22", "e-23", "e-24", + "e-25", "e-26", "e-27", "e-28", "e-29", "4", "e-31", "e-32", + "e-33"}, FF78 = {"e-0", "1", "e-2", "e-3", "e-4", "e-5", "2", "e-7", "e-8", "e-9", "e-10", "e-11", "e-12", "e-13", "e-14", "e-15", "e-16", "e-17", "8", @@ -840,6 +890,7 @@ public void constants() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html, 2 * DEFAULT_WAIT_TIME); + loadPageVerifyTitle2(html); } /** @@ -865,15 +916,16 @@ public void constants() throws Exception { public void text() throws Exception { final String html = "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -884,30 +936,32 @@ public void text() throws Exception { */ @Test @Alerts({"form1 -> custom", "form2 -> [object HTMLFormElement]", - "form1: [object HTMLFormElement]", "form2: [object HTMLFormElement]", - "form1 -> custom", "form2 -> [object HTMLFormElement]"}) + "form1: [object HTMLFormElement]", "form2: [object HTMLFormElement]", + "form1 -> custom", "form2 -> [object HTMLFormElement]"}) public void nameResolution() throws Exception { final String html = "\n" + "\n" + "
                          \n" + "
                          \n" - + "\n" + + "\n" + ""; final String[] alerts = getExpectedAlerts(); int i = 0; final WebDriver driver = loadPage2(html); - verifyAlerts(driver, alerts[i++], alerts[i++]); + verifyTitle2(driver, alerts[i++], alerts[i++]); + i = 0; driver.findElement(By.tagName("button")).click(); - verifyAlerts(driver, alerts[i++], alerts[i++], alerts[i++], alerts[i++]); + verifyTitle2(driver, alerts[i++], alerts[i++], alerts[i++], alerts[i++], alerts[i++], alerts[i++]); } /** @@ -1017,10 +1071,16 @@ private void document_input(final String event) throws Exception { @Test @Alerts({"2from window", "1from document"}) public void eventHandlersParentScope() throws Exception { - final String html = "\n" - + "\n" + final String html = "\n" + + "\n" + "\n" + + "\n" + + "\n" + + "\n" + + "\n" @@ -1029,7 +1089,7 @@ public void eventHandlersParentScope() throws Exception { final WebDriver driver = loadPage2(html); driver.findElement(By.id("button1")).click(); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -1075,11 +1135,15 @@ public void eventHandlersParentScopeChain_span() throws Exception { private void eventHandlersParentScopeChain(final String startTag, final String endTag) throws Exception { final String html = "\n" - + "foo\n" + + "\n" + + "\n" + + "\n" + "\n" + "
                          \n" + "
                          \n" - + " " + startTag + " id='theField' onclick='alert(foo); return false;'>click me" + endTag + "\n" + + " " + startTag + " id='theField' onclick='log(foo); return false;'>click me" + endTag + "\n" + "
                          \n" + "
                          \n" + "\n" + ""; @@ -1142,7 +1207,7 @@ public void eventHandlers_functionOpen() throws Exception { final WebDriver driver = loadPage2(html); driver.findElement(By.id("button1")).click(); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -1152,18 +1217,19 @@ public void eventHandlers_functionOpen() throws Exception { @Alerts({"false", "boolean"}) public void defaultPrevented() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1174,18 +1240,19 @@ public void defaultPrevented() throws Exception { IE = {"undefined", "undefined"}) public void returnValue() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1193,47 +1260,48 @@ public void returnValue() throws Exception { */ @Test @Alerts(DEFAULT = {"true", "boolean", "false - false", - "true", "true - false", - "false", "boolean", - "true", "boolean", "false - false", - "true", "boolean"}, + "true", "true - false", + "false", "boolean", + "true", "boolean", "false - false", + "true", "boolean"}, IE = {"undefined", "undefined", "false - false", - "undefined", "true - false", - "undefined", "undefined", - "undefined", "undefined", "false - false", - "undefined", "undefined"}) + "undefined", "true - false", + "undefined", "undefined", + "undefined", "undefined", "false - false", + "undefined", "undefined"}) public void returnValueSetter() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1241,19 +1309,19 @@ public void returnValueSetter() throws Exception { */ @Test @Alerts(DEFAULT = {"true", "boolean", "false - false", - "true", "true - false", - "false", "boolean", "false", - "true", "boolean", "false - false", - "true", "boolean", "true", - "true", "boolean", "true - false", - "false", "boolean", "false"}, + "true", "true - false", + "false", "boolean", "false", + "true", "boolean", "false - false", + "true", "boolean", "true", + "true", "boolean", "true - false", + "false", "boolean", "false"}, IE = {"undefined", "undefined", "false - false", - "undefined", "true - false", - "false", "boolean", "true", - "undefined", "undefined", "false - false", - "false", "boolean", "true", - "undefined", "undefined", "true - false", - "false", "boolean", "true"}) + "undefined", "true - false", + "false", "boolean", "true", + "undefined", "undefined", "false - false", + "false", "boolean", "true", + "undefined", "undefined", "true - false", + "false", "boolean", "true"}) public void returnValueSetterFalse() throws Exception { returnValueSetterUndefined("false"); } @@ -1263,19 +1331,19 @@ public void returnValueSetterFalse() throws Exception { */ @Test @Alerts(DEFAULT = {"true", "boolean", "false - false", - "true", "true - false", - "true", "boolean", "false", - "true", "boolean", "false - false", - "true", "boolean", "true", - "true", "boolean", "true - false", - "true", "boolean", "false"}, + "true", "true - false", + "true", "boolean", "false", + "true", "boolean", "false - false", + "true", "boolean", "true", + "true", "boolean", "true - false", + "true", "boolean", "false"}, IE = {"undefined", "undefined", "false - false", - "undefined", "true - false", - "true", "boolean", "false", - "undefined", "undefined", "false - false", - "true", "boolean", "false", - "undefined", "undefined", "true - false", - "true", "boolean", "false"}) + "undefined", "true - false", + "true", "boolean", "false", + "undefined", "undefined", "false - false", + "true", "boolean", "false", + "undefined", "undefined", "true - false", + "true", "boolean", "false"}) public void returnValueSetterTrue() throws Exception { returnValueSetterUndefined("true"); } @@ -1285,19 +1353,19 @@ public void returnValueSetterTrue() throws Exception { */ @Test @Alerts(DEFAULT = {"true", "boolean", "false - false", - "true", "true - false", - "true", "boolean", "false", - "true", "boolean", "false - false", - "true", "boolean", "true", - "true", "boolean", "true - false", - "true", "boolean", "false"}, + "true", "true - false", + "true", "boolean", "false", + "true", "boolean", "false - false", + "true", "boolean", "true", + "true", "boolean", "true - false", + "true", "boolean", "false"}, IE = {"undefined", "undefined", "false - false", - "undefined", "true - false", - "test", "string", "false", - "undefined", "undefined", "false - false", - "test", "string", "false", - "undefined", "undefined", "true - false", - "test", "string", "false"}) + "undefined", "true - false", + "test", "string", "false", + "undefined", "undefined", "false - false", + "test", "string", "false", + "undefined", "undefined", "true - false", + "test", "string", "false"}) public void returnValueSetterString() throws Exception { returnValueSetterUndefined("'test'"); } @@ -1307,19 +1375,19 @@ public void returnValueSetterString() throws Exception { */ @Test @Alerts(DEFAULT = {"true", "boolean", "false - false", - "true", "true - false", - "false", "boolean", "false", - "true", "boolean", "false - false", - "true", "boolean", "true", - "true", "boolean", "true - false", - "false", "boolean", "false"}, + "true", "true - false", + "false", "boolean", "false", + "true", "boolean", "false - false", + "true", "boolean", "true", + "true", "boolean", "true - false", + "false", "boolean", "false"}, IE = {"undefined", "undefined", "false - false", - "undefined", "true - false", - "0", "number", "true", - "undefined", "undefined", "false - false", - "0", "number", "true", - "undefined", "undefined", "true - false", - "0", "number", "true"}) + "undefined", "true - false", + "0", "number", "true", + "undefined", "undefined", "false - false", + "0", "number", "true", + "undefined", "undefined", "true - false", + "0", "number", "true"}) public void returnValueSetterZero() throws Exception { returnValueSetterUndefined("0"); } @@ -1329,19 +1397,19 @@ public void returnValueSetterZero() throws Exception { */ @Test @Alerts(DEFAULT = {"true", "boolean", "false - false", - "true", "true - false", - "true", "boolean", "false", - "true", "boolean", "false - false", - "true", "boolean", "true", - "true", "boolean", "true - false", - "true", "boolean", "false"}, + "true", "true - false", + "true", "boolean", "false", + "true", "boolean", "false - false", + "true", "boolean", "true", + "true", "boolean", "true - false", + "true", "boolean", "false"}, IE = {"undefined", "undefined", "false - false", - "undefined", "true - false", - "1", "number", "false", - "undefined", "undefined", "false - false", - "1", "number", "false", - "undefined", "undefined", "true - false", - "1", "number", "false"}) + "undefined", "true - false", + "1", "number", "false", + "undefined", "undefined", "false - false", + "1", "number", "false", + "undefined", "undefined", "true - false", + "1", "number", "false"}) public void returnValueSetterOne() throws Exception { returnValueSetterUndefined("1"); } @@ -1351,19 +1419,19 @@ public void returnValueSetterOne() throws Exception { */ @Test @Alerts(DEFAULT = {"true", "boolean", "false - false", - "true", "true - false", - "true", "boolean", "false", - "true", "boolean", "false - false", - "true", "boolean", "true", - "true", "boolean", "true - false", - "true", "boolean", "false"}, + "true", "true - false", + "true", "boolean", "false", + "true", "boolean", "false - false", + "true", "boolean", "true", + "true", "boolean", "true - false", + "true", "boolean", "false"}, IE = {"undefined", "undefined", "false - false", - "undefined", "true - false", - "-1", "number", "false", - "undefined", "undefined", "false - false", - "-1", "number", "false", - "undefined", "undefined", "true - false", - "-1", "number", "false"}) + "undefined", "true - false", + "-1", "number", "false", + "undefined", "undefined", "false - false", + "-1", "number", "false", + "undefined", "undefined", "true - false", + "-1", "number", "false"}) public void returnValueSetterMinusOne() throws Exception { returnValueSetterUndefined("-1"); } @@ -1373,19 +1441,19 @@ public void returnValueSetterMinusOne() throws Exception { */ @Test @Alerts(DEFAULT = {"true", "boolean", "false - false", - "true", "true - false", - "false", "boolean", "false", - "true", "boolean", "false - false", - "true", "boolean", "true", - "true", "boolean", "true - false", - "false", "boolean", "false"}, + "true", "true - false", + "false", "boolean", "false", + "true", "boolean", "false - false", + "true", "boolean", "true", + "true", "boolean", "true - false", + "false", "boolean", "false"}, IE = {"undefined", "undefined", "false - false", - "undefined", "true - false", - "undefined", "undefined", "true", - "undefined", "undefined", "false - false", - "undefined", "undefined", "true", - "undefined", "undefined", "true - false", - "undefined", "undefined", "true"}) + "undefined", "true - false", + "undefined", "undefined", "true", + "undefined", "undefined", "false - false", + "undefined", "undefined", "true", + "undefined", "undefined", "true - false", + "undefined", "undefined", "true"}) public void returnValueSetterUndefined() throws Exception { returnValueSetterUndefined("undefined"); } @@ -1464,11 +1532,11 @@ private void returnValueSetterUndefined(final String value) throws Exception { */ @Test @Alerts(DEFAULT = {"false - false", "true - false", "true - true", - "false - false", "false - false", "false - false", - "false - false", "true - false"}, + "false - false", "false - false", "false - false", + "false - false", "true - false"}, IE = {"false - false", "true - false", "true - false", - "false - false", "false - false", "false - false", - "false - false", "true - false"}) + "false - false", "false - false", "false - false", + "false - false", "true - false"}) @NotYetImplemented(IE) public void preventDefault() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ @@ -1518,4 +1586,26 @@ public void preventDefault() throws Exception { final String text = driver.getTitle().trim().replaceAll(";", "\n").trim(); assertEquals(String.join("\n", getExpectedAlerts()), text); } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("OK") + public void domEventNameUsedAsFunctionName() throws Exception { + final String html + = "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/FocusEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/FocusEventTest.java index 4698d7bff..d52f3bf54 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/FocusEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/FocusEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,11 +32,11 @@ public class FocusEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" // TODO all properties + " }\n"; @@ -49,18 +49,19 @@ public class FocusEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -74,18 +75,19 @@ public void create_ctor() throws Exception { FF78 = {"[object FocusEvent]", "undefined", "false", "false", "false"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -96,18 +98,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -118,18 +121,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -139,18 +143,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -161,18 +166,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -183,20 +189,21 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -207,19 +214,20 @@ public void create_ctorAllDetails() throws Exception { IE = "exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -230,20 +238,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { IE = "exception") public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -256,8 +265,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -265,6 +275,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/GamepadEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/GamepadEventTest.java index f1875dce9..e3dd4037d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/GamepadEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/GamepadEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,11 +32,11 @@ public class GamepadEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" // TODO all properties + " }\n"; @@ -49,18 +49,19 @@ public class GamepadEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -74,18 +75,19 @@ public void create_ctor() throws Exception { FF78 = {"[object GamepadEvent]", "undefined", "false", "false", "false"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -96,18 +98,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -118,18 +121,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -139,18 +143,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -161,18 +166,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -183,20 +189,21 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -207,19 +214,20 @@ public void create_ctorAllDetails() throws Exception { IE = "exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -230,20 +238,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { IE = "exception") public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -257,8 +266,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -266,6 +276,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/HashChangeEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/HashChangeEventTest.java index 8b9609c6a..8569a935a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/HashChangeEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/HashChangeEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -35,16 +35,16 @@ public class HashChangeEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" + " if (event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" - - + " alert(event.oldURL);\n" - + " alert(event.newURL);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + + + " log(event.oldURL);\n" + + " log(event.newURL);\n" + " } else {\n" - + " alert('no event');\n" + + " log('no event');\n" + " }\n" + " }\n"; @@ -56,18 +56,19 @@ public class HashChangeEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -78,7 +79,8 @@ public void create_ctor() throws Exception { IE = "exception") public void create_ctorWithDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + expandExpectedAlertsVariables(URL_FIRST); + loadPageVerifyTitle2(html); } /** @@ -104,18 +107,19 @@ public void create_ctorWithDetails() throws Exception { IE = "exception") public void create_createEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -123,32 +127,34 @@ public void create_createEvent() throws Exception { */ @Test @Alerts(DEFAULT = {"[object HashChangeEvent]", "[object HashChangeEvent]", - "hashchange", "true", "false", "false", "§§URL§§", "§§URL§§#1"}, + "hashchange", "true", "false", "false", "§§URL§§", "§§URL§§#1"}, CHROME = {"[object HashChangeEvent]", "missing initHashChangeEvent"}, EDGE = {"[object HashChangeEvent]", "missing initHashChangeEvent"}, IE = "exception createEvent") public void initHashChangeEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + expandExpectedAlertsVariables(URL_FIRST); + loadPageVerifyTitle2(html); } /** @@ -160,21 +166,23 @@ public void initHashChangeEvent() throws Exception { FF78 = {"[object HashChangeEvent]", "hashchange", "true", "false", "false", "§§URL§§", "§§URL§§#1"}) public void dispatchEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + expandExpectedAlertsVariables(URL_FIRST); + loadPageVerifyTitle2(html); } /** @@ -185,20 +193,21 @@ public void dispatchEvent() throws Exception { IE = {"[object Event]", "hashchange", "true", "false", "undefined", "undefined", "undefined"}) public void dispatchEvent_event() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -208,14 +217,15 @@ public void dispatchEvent_event() throws Exception { @Alerts("supported") public void onHashChange_supported() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -226,7 +236,8 @@ public void onHashChange_supported() throws Exception { IE = {"[object Event]", "hashchange", "false", "false", "undefined", "undefined", "undefined"}) public void onHashChange() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" @@ -237,6 +248,6 @@ public void onHashChange() throws Exception { final WebDriver driver = loadPage2(html); driver.findElement(By.id("click")).click(); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/InputEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/InputEventTest.java new file mode 100644 index 000000000..ff87a1e73 --- /dev/null +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/InputEventTest.java @@ -0,0 +1,345 @@ +/* + * Copyright (c) 2002-2021 Gargoyle Software Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.gargoylesoftware.htmlunit.javascript.host.event; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import com.gargoylesoftware.htmlunit.BrowserRunner; +import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; +import com.gargoylesoftware.htmlunit.WebDriverTestCase; +import com.gargoylesoftware.htmlunit.html.HtmlPageTest; + +/** + * Tests for {@link InputEvent}. + * + * @author Ronald Brill + */ +@RunWith(BrowserRunner.class) +public class InputEventTest extends WebDriverTestCase { + + private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + + + " var details = [event.data, event.inputType, event.isComposing].join(',');\n" + + " log(details);\n" + + " }\n"; + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object InputEvent]", "type", "false", "false", "false", + ",,false"}, + IE = "exception") + public void create_ctor() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + @HtmlUnitNYI(CHROME = {"[object InputEvent]", "undefined", "false", "false", "false", + ",,false"}, + EDGE = {"[object InputEvent]", "undefined", "false", "false", "false", + ",,false"}, + FF = {"[object InputEvent]", "undefined", "false", "false", "false", + ",,false"}, + FF78 = {"[object InputEvent]", "undefined", "false", "false", "false", + ",,false"}) + public void create_ctorWithoutType() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object InputEvent]", "42", "false", "false", "false", + ",,false"}, + IE = "exception") + public void create_ctorNumericType() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object InputEvent]", "null", "false", "false", "false", + ",,false"}, + IE = "exception") + public void create_ctorNullType() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + public void create_ctorUnknownType() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object InputEvent]", "HtmlUnitEvent", "false", "false", "false", + ",,false"}, + IE = "exception") + public void create_ctorArbitraryType() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object InputEvent]", "input", "false", "false", "false", + "data,inputType,true"}, + CHROME = {"[object InputEvent]", "input", "false", "false", "false", + "data,,true"}, + EDGE = {"[object InputEvent]", "input", "false", "false", "false", + "data,,true"}, + IE = "exception") + public void create_ctorAllDetails() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object InputEvent]", "input", "false", "false", "false", + ",,true"}, + IE = "exception") + public void create_ctorSomeDetails() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object InputEvent]", "input", "false", "false", "false", + ",,false"}, + IE = "exception") + public void create_ctorMissingData() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object InputEvent]", "input", "false", "false", "false", + ",,false"}, + IE = "exception") + public void create_ctorNullData() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object InputEvent]", "input", "false", "false", "false", + ",,false"}, + IE = "exception") + public void create_ctorUndefinedData() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object InputEvent]", "input", "false", "false", "false", + "Html,Unit,,false"}, + IE = "exception") + public void create_ctorWrongData() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } +} diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEvent2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEvent2Test.java index 8f27323ac..fcfae50a3 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEvent2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEvent2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEventTest.java index 0208bbe7e..50e7a85e1 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -29,7 +29,9 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; import com.gargoylesoftware.htmlunit.BrowserRunner.BuggyWebDriver; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.html.HtmlPageTest; import com.gargoylesoftware.htmlunit.WebDriverTestCase; /** @@ -39,28 +41,346 @@ * @author Marc Guillemot * @author Frank Danek * @author Ronald Brill + * @author Joerg Werner */ @RunWith(BrowserRunner.class) public class KeyboardEventTest extends WebDriverTestCase { + private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + + + " var details = [event.key, event.code, event.location, event.ctrlKey,\n" + + " event.shiftKey, event.altKey, event.metaKey, event.repeat, \n" + + " event.isComposing, event.charCode, event.which].join(',');\n" + + " log(details);\n" + + " }\n"; + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object KeyboardEvent]", "type", "false", "false", "false", + ",,0,false,false,false,false,false,false,0,0"}, + IE = "exception") + public void create_ctor() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + @HtmlUnitNYI(CHROME = {"[object KeyboardEvent]", "undefined", "false", "false", "false", + ",,0,false,false,false,false,false,false,0,0"}, + EDGE = {"[object KeyboardEvent]", "undefined", "false", "false", "false", + ",,0,false,false,false,false,false,false,0,0"}, + FF = {"[object KeyboardEvent]", "undefined", "false", "false", "false", + ",,0,false,false,false,false,false,false,0,0"}, + FF78 = {"[object KeyboardEvent]", "undefined", "false", "false", "false", + ",,0,false,false,false,false,false,false,0,0"}) + public void create_ctorWithoutType() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object KeyboardEvent]", "42", "false", "false", "false", + ",,0,false,false,false,false,false,false,0,0"}, + IE = "exception") + public void create_ctorNumericType() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object KeyboardEvent]", "null", "false", "false", "false", + ",,0,false,false,false,false,false,false,0,0"}, + IE = "exception") + public void create_ctorNullType() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts("exception") + public void create_ctorUnknownType() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object KeyboardEvent]", "HtmlUnitEvent", "false", "false", "false", + ",,0,false,false,false,false,false,false,0,0"}, + IE = "exception") + public void create_ctorArbitraryType() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object KeyboardEvent]", "keyboard", "false", "false", "false", + "key,code,123,true,true,true,true,true,true,456,789"}, + CHROME = {"[object KeyboardEvent]", "keyboard", "false", "false", "false", + "key,code,123,true,true,true,true,true,true,456,0"}, + EDGE = {"[object KeyboardEvent]", "keyboard", "false", "false", "false", + "key,code,123,true,true,true,true,true,true,456,0"}, + IE = "exception") + public void create_ctorAllDetails() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object KeyboardEvent]", "keyboard", "false", "false", "false", + "null,,0,true,false,false,false,false,false,456,0"}, + IE = "exception") + public void create_ctorSomeDetails() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object KeyboardEvent]", "keyboard", "false", "false", "false", + ",,0,false,false,false,false,false,false,0,0"}, + IE = "exception") + public void create_ctorMissingData() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object KeyboardEvent]", "keyboard", "false", "false", "false", + ",,0,false,false,false,false,false,false,0,0"}, + IE = "exception") + public void create_ctorNullData() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object KeyboardEvent]", "keyboard", "false", "false", "false", + ",,0,false,false,false,false,false,false,0,0"}, + IE = "exception") + public void create_ctorUndefinedData() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"[object KeyboardEvent]", "keyboard", "false", "false", "false", + ",,0,false,false,false,false,false,false,0,0"}, + IE = "exception") + public void create_ctorWrongData() throws Exception { + final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + /** * @throws Exception if the test fails */ @Test @Alerts({"DOM3: [object KeyboardEvent]", "vendor: exception"}) public void createEvent() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -69,24 +389,25 @@ public void createEvent() throws Exception { @Test @Alerts({"exception", "0-0", "undefined-undefined"}) public void keyCode() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -95,19 +416,20 @@ public void keyCode() throws Exception { @Test @Alerts(DEFAULT = {"exception", "exception"}, FF = {"exception", - "keydown, true, true, true, true, true, true, 65, 0", - "keyup, false, false, false, false, false, false, 32, 0"}, + "keydown, true, true, true, true, true, true, 65, 0", + "keyup, false, false, false, false, false, false, 32, 0"}, FF78 = {"exception", - "keydown, true, true, true, true, true, true, 65, 0", - "keyup, false, false, false, false, false, false, 32, 0"}) + "keydown, true, true, true, true, true, true, 65, 0", + "keyup, false, false, false, false, false, false, 32, 0"}) public void initKeyEvent() throws Exception { final String html = "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -309,10 +631,11 @@ public void keyCodeEnter_keypress() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -326,7 +649,7 @@ public void keyCodeEnter_keypress() throws Exception { field.sendKeys(Keys.ENTER); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -334,34 +657,34 @@ public void keyCodeEnter_keypress() throws Exception { */ @Test @Alerts(DEFAULT = {"keydown:16,0,16,Shift,undefined,ShiftLeft,true", - "keydown:65,0,65,A,undefined,KeyA,true", - "keypress:65,65,65,A,undefined,KeyA,true", - "keyup:65,0,65,A,undefined,KeyA,true", - "keyup:16,0,16,Shift,undefined,ShiftLeft,false", - "keydown:65,0,65,a,undefined,KeyA,false", - "keypress:97,97,97,a,undefined,KeyA,false", - "keyup:65,0,65,a,undefined,KeyA,false", - "keydown:190,0,190,.,undefined,Period,false", - "keypress:46,46,46,.,undefined,Period,false", - "keyup:190,0,190,.,undefined,Period,false", - "keydown:13,0,13,Enter,undefined,Enter,false", - "keypress:13,13,13,Enter,undefined,Enter,false", - "keyup:13,0,13,Enter,undefined,Enter,false"}, - FF = { "keydown:16,0,16,Shift,undefined,ShiftLeft,true", - "keydown:65,0,65,A,undefined,KeyA,true", - "keypress:0,65,65,A,undefined,KeyA,true", - "keyup:65,0,65,A,undefined,KeyA,true", - "keyup:16,0,16,Shift,undefined,ShiftLeft,false", - "keydown:65,0,65,a,undefined,KeyA,false", - "keypress:0,97,97,a,undefined,KeyA,false", - "keyup:65,0,65,a,undefined,KeyA,false", - "keydown:190,0,190,.,undefined,Period,false", - "keypress:0,46,46,.,undefined,Period,false", - "keyup:190,0,190,.,undefined,Period,false", - "keydown:13,0,13,Enter,undefined,Enter,false", - "keypress:13,0,13,Enter,undefined,Enter,false", - "keyup:13,0,13,Enter,undefined,Enter,false"}, - FF78 = { "keydown:16,0,16,Shift,undefined,ShiftLeft,true", + "keydown:65,0,65,A,undefined,KeyA,true", + "keypress:65,65,65,A,undefined,KeyA,true", + "keyup:65,0,65,A,undefined,KeyA,true", + "keyup:16,0,16,Shift,undefined,ShiftLeft,false", + "keydown:65,0,65,a,undefined,KeyA,false", + "keypress:97,97,97,a,undefined,KeyA,false", + "keyup:65,0,65,a,undefined,KeyA,false", + "keydown:190,0,190,.,undefined,Period,false", + "keypress:46,46,46,.,undefined,Period,false", + "keyup:190,0,190,.,undefined,Period,false", + "keydown:13,0,13,Enter,undefined,Enter,false", + "keypress:13,13,13,Enter,undefined,Enter,false", + "keyup:13,0,13,Enter,undefined,Enter,false"}, + FF = {"keydown:16,0,16,Shift,undefined,ShiftLeft,true", + "keydown:65,0,65,A,undefined,KeyA,true", + "keypress:0,65,65,A,undefined,KeyA,true", + "keyup:65,0,65,A,undefined,KeyA,true", + "keyup:16,0,16,Shift,undefined,ShiftLeft,false", + "keydown:65,0,65,a,undefined,KeyA,false", + "keypress:0,97,97,a,undefined,KeyA,false", + "keyup:65,0,65,a,undefined,KeyA,false", + "keydown:190,0,190,.,undefined,Period,false", + "keypress:0,46,46,.,undefined,Period,false", + "keyup:190,0,190,.,undefined,Period,false", + "keydown:13,0,13,Enter,undefined,Enter,false", + "keypress:13,0,13,Enter,undefined,Enter,false", + "keyup:13,0,13,Enter,undefined,Enter,false"}, + FF78 = {"keydown:16,0,16,Shift,undefined,ShiftLeft,true", "keydown:65,0,65,A,undefined,KeyA,true", "keypress:0,65,65,A,undefined,KeyA,true", "keyup:65,0,65,A,undefined,KeyA,true", @@ -375,36 +698,35 @@ public void keyCodeEnter_keypress() throws Exception { "keydown:13,0,13,Enter,undefined,Enter,false", "keypress:13,0,13,Enter,undefined,Enter,false", "keyup:13,0,13,Enter,undefined,Enter,false"}, - IE = { "keydown:16,0,16,Shift,,undefined,true", - "keydown:65,0,65,A,A,undefined,true", - "keypress:65,65,65,A,A,undefined,true", - "keyup:65,0,65,A,A,undefined,true", - "keyup:16,0,16,Shift,,undefined,false", - "keydown:65,0,65,a,a,undefined,false", - "keypress:97,97,97,a,a,undefined,false", - "keyup:65,0,65,a,a,undefined,false", - "keydown:190,0,190,.,.,undefined,false", - "keypress:46,46,46,.,.,undefined,false", - "keyup:190,0,190,.,.,undefined,false", - "keydown:13,0,13,Enter,\\n,undefined,false", - "keypress:13,13,13,Enter,\\n,undefined,false", - "keyup:13,0,13,Enter,\\n,undefined,false"} - ) + IE = {"keydown:16,0,16,Shift,,undefined,true", + "keydown:65,0,65,A,A,undefined,true", + "keypress:65,65,65,A,A,undefined,true", + "keyup:65,0,65,A,A,undefined,true", + "keyup:16,0,16,Shift,,undefined,false", + "keydown:65,0,65,a,a,undefined,false", + "keypress:97,97,97,a,a,undefined,false", + "keyup:65,0,65,a,a,undefined,false", + "keydown:190,0,190,.,.,undefined,false", + "keypress:46,46,46,.,.,undefined,false", + "keyup:190,0,190,.,.,undefined,false", + "keydown:13,0,13,Enter,\\n,undefined,false", + "keypress:13,13,13,Enter,\\n,undefined,false", + "keyup:13,0,13,Enter,\\n,undefined,false"}) // https://github.com/SeleniumHQ/selenium/issues/2531 @BuggyWebDriver(CHROME = {"keydown:16,0,16,Shift,undefined,ShiftLeft,false", - "keydown:65,0,65,A,undefined,KeyA,true", - "keypress:65,65,65,A,undefined,KeyA,true", - "keyup:65,0,65,A,undefined,KeyA,true", - "keyup:16,0,16,Shift,undefined,ShiftLeft,false", - "keydown:65,0,65,a,undefined,KeyA,false", - "keypress:97,97,97,a,undefined,KeyA,false", - "keyup:65,0,65,a,undefined,KeyA,false", - "keydown:190,0,190,.,undefined,Period,false", - "keypress:46,46,46,.,undefined,Period,false", - "keyup:190,0,190,.,undefined,Period,false", - "keydown:13,0,13,Enter,undefined,Enter,false", - "keypress:13,13,13,Enter,undefined,Enter,false", - "keyup:13,0,13,Enter,undefined,Enter,false"}, + "keydown:65,0,65,A,undefined,KeyA,true", + "keypress:65,65,65,A,undefined,KeyA,true", + "keyup:65,0,65,A,undefined,KeyA,true", + "keyup:16,0,16,Shift,undefined,ShiftLeft,false", + "keydown:65,0,65,a,undefined,KeyA,false", + "keypress:97,97,97,a,undefined,KeyA,false", + "keyup:65,0,65,a,undefined,KeyA,false", + "keydown:190,0,190,.,undefined,Period,false", + "keypress:46,46,46,.,undefined,Period,false", + "keyup:190,0,190,.,undefined,Period,false", + "keydown:13,0,13,Enter,undefined,Enter,false", + "keypress:13,13,13,Enter,undefined,Enter,false", + "keyup:13,0,13,Enter,undefined,Enter,false"}, EDGE = {"keydown:16,0,16,Shift,undefined,ShiftLeft,false", "keydown:65,0,65,A,undefined,KeyA,true", "keypress:65,65,65,A,undefined,KeyA,true", @@ -419,19 +741,7 @@ public void keyCodeEnter_keypress() throws Exception { "keydown:13,0,13,Enter,undefined,Enter,false", "keypress:13,13,13,Enter,undefined,Enter,false", "keyup:13,0,13,Enter,undefined,Enter,false"}, - FF78 = { "keydown:65,0,65,A,undefined,,false", - "keypress:65,65,65,A,undefined,,false", - "keyup:65,0,65,A,undefined,,false", - "keydown:65,0,65,a,undefined,,false", - "keypress:97,97,97,a,undefined,,false", - "keyup:65,0,65,a,undefined,,false", - "keydown:190,0,190,.,undefined,,false", - "keypress:46,46,46,.,undefined,,false", - "keyup:190,0,190,.,undefined,,false", - "keydown:13,0,13,Enter,undefined,,false", - "keypress:13,13,13,Enter,undefined,,false", - "keyup:13,0,13,Enter,undefined,,false"}, - FF = { "keydown:65,0,65,A,undefined,,false", + FF78 = {"keydown:65,0,65,A,undefined,,false", "keypress:65,65,65,A,undefined,,false", "keyup:65,0,65,A,undefined,,false", "keydown:65,0,65,a,undefined,,false", @@ -443,20 +753,32 @@ public void keyCodeEnter_keypress() throws Exception { "keydown:13,0,13,Enter,undefined,,false", "keypress:13,13,13,Enter,undefined,,false", "keyup:13,0,13,Enter,undefined,,false"}, - IE = { "keydown:16,0,16,Shift,,undefined,false", - "keydown:65,0,65,A,A,undefined,false", - "keypress:65,65,65,A,A,undefined,false", - "keyup:65,0,65,a,a,undefined,false", - "keyup:16,0,16,Shift,,undefined,false", - "keydown:65,0,65,a,a,undefined,false", - "keypress:97,97,97,a,a,undefined,false", - "keyup:65,0,65,a,a,undefined,false", - "keydown:190,0,190,.,.,undefined,false", - "keypress:46,46,46,.,.,undefined,false", - "keyup:190,0,190,.,.,undefined,false", - "keydown:13,0,13,Enter,\\n,undefined,false", - "keypress:13,13,13,\\r,\\r,undefined,false", - "keyup:13,0,13,Enter,\\n,undefined,false"}) + FF = {"keydown:65,0,65,A,undefined,,false", + "keypress:65,65,65,A,undefined,,false", + "keyup:65,0,65,A,undefined,,false", + "keydown:65,0,65,a,undefined,,false", + "keypress:97,97,97,a,undefined,,false", + "keyup:65,0,65,a,undefined,,false", + "keydown:190,0,190,.,undefined,,false", + "keypress:46,46,46,.,undefined,,false", + "keyup:190,0,190,.,undefined,,false", + "keydown:13,0,13,Enter,undefined,,false", + "keypress:13,13,13,Enter,undefined,,false", + "keyup:13,0,13,Enter,undefined,,false"}, + IE = {"keydown:16,0,16,Shift,,undefined,false", + "keydown:65,0,65,A,A,undefined,false", + "keypress:65,65,65,A,A,undefined,false", + "keyup:65,0,65,a,a,undefined,false", + "keyup:16,0,16,Shift,,undefined,false", + "keydown:65,0,65,a,a,undefined,false", + "keypress:97,97,97,a,a,undefined,false", + "keyup:65,0,65,a,a,undefined,false", + "keydown:190,0,190,.,.,undefined,false", + "keypress:46,46,46,.,.,undefined,false", + "keyup:190,0,190,.,.,undefined,false", + "keydown:13,0,13,Enter,\\n,undefined,false", + "keypress:13,13,13,\\r,\\r,undefined,false", + "keyup:13,0,13,Enter,\\n,undefined,false"}) public void which() throws Exception { final String html = "\n" diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/MessageEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/MessageEventTest.java index 0ec509ed9..b327a676a 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/MessageEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/MessageEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -57,7 +57,7 @@ public class MessageEventTest extends WebDriverTestCase { */ @Test @Alerts(DEFAULT = {"-[object MessageEvent]", "-type-message", "-false", "-false", "-false", - "-null", "-", "-", "-null"}, + "-null", "-", "-", "-null"}, IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ @@ -81,7 +81,7 @@ public void create_ctor() throws Exception { */ @Test @Alerts(DEFAULT = {"-[object MessageEvent]", "-type-message", "-false", "-false", "-false", - "-test-data", "-test-origin", "-42", "-[object Window]"}, + "-test-data", "-test-origin", "-42", "-[object Window]"}, IE = "exception") public void create_ctorWithDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ @@ -111,18 +111,20 @@ public void create_ctorWithDetails() throws Exception { @Test @Alerts({"DOM2: exception", "DOM3: [object MessageEvent]"}) public void createEvent() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + + loadPageVerifyTitle2(html); } /** @@ -131,7 +133,7 @@ public void createEvent() throws Exception { @Test @Alerts(DEFAULT = "exception", IE = {"-[object MessageEvent]", "-message", "-true", "-true", "-undefined", "-hello", - "-http://localhost:", "-undefined", "-[object Window]"}) + "-http://localhost:", "-undefined", "-[object Window]"}) @NotYetImplemented(IE) public void initMessageEventPortsNull() throws Exception { final String[] expectedAlerts = getExpectedAlerts(); @@ -142,6 +144,7 @@ public void initMessageEventPortsNull() throws Exception { final String origin = "http://localhost:" + PORT; final String html = ""; @@ -163,9 +166,9 @@ public void initMessageEventPortsNull() throws Exception { */ @Test @Alerts(DEFAULT = {"-[object MessageEvent]", "-message", "-true", "-true", "-false", "-hello", - "-http://localhost:", "-2", "-[object Window]"}, + "-http://localhost:", "-2", "-[object Window]"}, IE = {"-[object MessageEvent]", "-message", "-true", "-true", "-undefined", "-hello", - "-http://localhost:", "-undefined", "-[object Window]"}) + "-http://localhost:", "-undefined", "-[object Window]"}) public void initMessageEventPortsUndefined() throws Exception { final String[] expectedAlerts = getExpectedAlerts(); if (expectedAlerts.length > 4) { @@ -182,7 +185,7 @@ public void initMessageEventPortsUndefined() throws Exception { + " dump(e);\n" + " } catch (e) { document.title += 'exception '; }\n" + "} else {\n" - + " alert('no initMessageEvent');\n" + + " document.title += 'no initMessageEvent';\n" + "}\n" + DUMP_EVENT_FUNCTION + ""; @@ -196,9 +199,9 @@ public void initMessageEventPortsUndefined() throws Exception { */ @Test @Alerts(DEFAULT = {"-[object MessageEvent]", "-message", "-true", "-true", "-false", "-hello", - "-http://localhost:", "-2", "-[object Window]"}, + "-http://localhost:", "-2", "-[object Window]"}, IE = {"-[object MessageEvent]", "-message", "-true", "-true", "-undefined", "-hello", - "-http://localhost:", "-undefined", "-[object Window]"}) + "-http://localhost:", "-undefined", "-[object Window]"}) public void initMessageEvent() throws Exception { final String[] expectedAlerts = getExpectedAlerts(); expectedAlerts[6] += PORT; @@ -213,7 +216,7 @@ public void initMessageEvent() throws Exception { + " dump(e);\n" + " } catch (e) { document.title += 'exception' + e; }\n" + "} else {\n" - + " alert('no initMessageEvent');\n" + + " document.title += 'no initMessageEvent';\n" + "}\n" + DUMP_EVENT_FUNCTION + ""; diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseEventTest.java index 4df1e9f49..9cf4f40be 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -33,28 +33,30 @@ * @author Marc Guillemot * @author Ahmed Ashour * @author Frank Danek + * @author Ronald Brill */ @RunWith(BrowserRunner.class) public class MouseEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" - - + " alert(event.view == window);\n" - + " alert(event.screenX);\n" - + " alert(event.screenY);\n" - + " alert(event.clientX);\n" - + " alert(event.clientY);\n" - + " alert(event.ctrlKey);\n" - + " alert(event.altKey);\n" - + " alert(event.shiftKey);\n" - + " alert(event.metaKey);\n" - + " alert(event.button);\n" - + " alert(event.buttons);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + + + " log(event.view == window);\n" + + " log(event.screenX);\n" + + " log(event.screenY);\n" + + " log(event.clientX);\n" + + " log(event.clientY);\n" + + " log(event.ctrlKey);\n" + + " log(event.altKey);\n" + + " log(event.shiftKey);\n" + + " log(event.metaKey);\n" + + " log(event.button);\n" + + " log(event.buttons);\n" + + " log(event.which);\n" + " }\n"; /** @@ -62,22 +64,23 @@ public class MouseEventTest extends WebDriverTestCase { */ @Test @Alerts(DEFAULT = {"[object MouseEvent]", "click", "false", "false", "false", "false", - "0", "0", "0", "0", "false", "false", "false", "false", "0", "0"}, + "0", "0", "0", "0", "false", "false", "false", "false", "0", "0", "1"}, IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -86,27 +89,28 @@ public void create_ctor() throws Exception { @Test @Alerts("exception") @HtmlUnitNYI(CHROME = {"[object MouseEvent]", "undefined", "false", "false", "false", "false", - "0", "0", "0", "0", "false", "false", "false", "false", "0", "0"}, + "0", "0", "0", "0", "false", "false", "false", "false", "0", "0", "1"}, EDGE = {"[object MouseEvent]", "undefined", "false", "false", "false", "false", - "0", "0", "0", "0", "false", "false", "false", "false", "0", "0"}, + "0", "0", "0", "0", "false", "false", "false", "false", "0", "0", "1"}, FF = {"[object MouseEvent]", "undefined", "false", "false", "false", "false", - "0", "0", "0", "0", "false", "false", "false", "false", "0", "0"}, + "0", "0", "0", "0", "false", "false", "false", "false", "0", "0", "1"}, FF78 = {"[object MouseEvent]", "undefined", "false", "false", "false", "false", - "0", "0", "0", "0", "false", "false", "false", "false", "0", "0"}) + "0", "0", "0", "0", "false", "false", "false", "false", "0", "0", "1"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -114,22 +118,23 @@ public void create_ctorWithoutType() throws Exception { */ @Test @Alerts(DEFAULT = {"[object MouseEvent]", "42", "false", "false", "false", "false", - "0", "0", "0", "0", "false", "false", "false", "false", "0", "0"}, + "0", "0", "0", "0", "false", "false", "false", "false", "0", "0", "1"}, IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -137,7 +142,7 @@ public void create_ctorNumericType() throws Exception { */ @Test @Alerts(DEFAULT = {"[object MouseEvent]", "null", "false", "false", "false", "false", - "0", "0", "0", "0", "false", "false", "false", "false", "0", "0"}, + "0", "0", "0", "0", "false", "false", "false", "false", "0", "0", "1"}, IE = "exception") // @HtmlUnitNYI(CHROME = {"[object MouseEvent]", "null", "false", "false", "false", "false", // "0", "0", "0", "0", "false", "false", "false", "false", "0", "0"}, @@ -149,18 +154,19 @@ public void create_ctorNumericType() throws Exception { // "0", "0", "0", "0", "false", "false", "false", "false", "0", "0"}) public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -170,18 +176,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -189,22 +196,23 @@ public void create_ctorUnknownType() throws Exception { */ @Test @Alerts(DEFAULT = {"[object MouseEvent]", "HtmlUnitEvent", "false", "false", "false", "false", - "0", "0", "0", "0", "false", "false", "false", "false", "0", "0"}, + "0", "0", "0", "0", "false", "false", "false", "false", "0", "0", "1"}, IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -212,11 +220,12 @@ public void create_ctorArbitraryType() throws Exception { */ @Test @Alerts(DEFAULT = {"[object MouseEvent]", "click", "false", "false", "false", "false", - "7", "0", "13", "-15", "true", "true", "true", "true", "2", "4"}, + "7", "0", "13", "-15", "true", "true", "true", "true", "2", "4", "3"}, IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -249,18 +258,19 @@ public void create_ctorAllDetails() throws Exception { @Test @Alerts({"DOM2: [object MouseEvent]", "DOM3: [object MouseEvent]"}) public void createEvent() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -270,23 +280,24 @@ public void createEvent() throws Exception { @Alerts({"click", "true", "true", "true", "1", "2", "3", "4", "true", "true", "true", "true"}) public void initMouseEvent() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -295,7 +306,8 @@ public void initMouseEvent() throws Exception { @Test @Alerts({"1", "1"}) public void dispatchEvent() throws Exception { - final String html = "foo\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + + loadPageVerifyTitle2(html); } /** @@ -348,8 +361,9 @@ public void button_onclick() throws Exception { final String html = "\n" + "

                          Click me!

                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } - } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/MutationEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/MutationEventTest.java index 3a10cd742..a6bdeac64 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/MutationEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/MutationEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -33,11 +33,11 @@ public class MutationEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" // TODO all properties + " }\n"; @@ -49,18 +49,19 @@ public class MutationEventTest extends WebDriverTestCase { @Alerts("exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -70,18 +71,19 @@ public void create_ctor() throws Exception { @Alerts("exception") public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -91,18 +93,19 @@ public void create_ctorWithoutType() throws Exception { @Alerts("exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -112,18 +115,19 @@ public void create_ctorNumericType() throws Exception { @Alerts("exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -133,18 +137,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -154,18 +159,19 @@ public void create_ctorUnknownType() throws Exception { @Alerts("exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -175,20 +181,21 @@ public void create_ctorArbitraryType() throws Exception { @Alerts("exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -198,19 +205,20 @@ public void create_ctorAllDetails() throws Exception { @Alerts("exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -220,20 +228,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { @Alerts("exception") public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -246,8 +255,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -255,7 +265,7 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -264,18 +274,19 @@ public void inWindow() throws Exception { @Test @Alerts({"DOM2: [object MutationEvent]", "DOM3: [object MutationEvent]"}) public void createEvent() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/OfflineAudioCompletionEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/OfflineAudioCompletionEventTest.java index 24888c987..22f07b39d 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/OfflineAudioCompletionEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/OfflineAudioCompletionEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -31,11 +31,11 @@ public class OfflineAudioCompletionEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" // TODO all properties + " }\n"; @@ -47,18 +47,19 @@ public class OfflineAudioCompletionEventTest extends WebDriverTestCase { @Alerts("exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -68,18 +69,19 @@ public void create_ctor() throws Exception { @Alerts("exception") public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -89,18 +91,19 @@ public void create_ctorWithoutType() throws Exception { @Alerts("exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -110,18 +113,19 @@ public void create_ctorNumericType() throws Exception { @Alerts("exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -131,18 +135,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -152,18 +157,19 @@ public void create_ctorUnknownType() throws Exception { @Alerts("exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -173,20 +179,21 @@ public void create_ctorArbitraryType() throws Exception { @Alerts("exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -196,19 +203,20 @@ public void create_ctorAllDetails() throws Exception { @Alerts("exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -218,20 +226,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { @Alerts("exception") public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -245,8 +254,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -254,6 +264,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/PageTransitionEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/PageTransitionEventTest.java index 2414acc58..9283e1514 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/PageTransitionEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/PageTransitionEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,11 +32,11 @@ public class PageTransitionEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" // TODO all properties + " }\n"; @@ -49,18 +49,19 @@ public class PageTransitionEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -74,18 +75,19 @@ public void create_ctor() throws Exception { FF78 = {"[object PageTransitionEvent]", "undefined", "false", "false", "false"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -96,18 +98,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -118,18 +121,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -139,18 +143,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -161,18 +166,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -183,20 +189,21 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -207,19 +214,20 @@ public void create_ctorAllDetails() throws Exception { IE = "exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -230,20 +238,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { IE = "exception") public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -256,8 +265,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -265,6 +275,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/PointerEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/PointerEventTest.java index 523ec9023..ecd08da7e 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/PointerEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/PointerEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -26,30 +26,31 @@ * Tests for {@link PointerEvent}. * * @author Frank Danek + * @author Ronald Brill */ @RunWith(BrowserRunner.class) public class PointerEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" + " if (event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" - + " alert(event.pointerId);\n" - + " alert(event.width);\n" - + " alert(event.height);\n" - + " alert(event.pressure);\n" - + " alert(event.tiltX);\n" - + " alert(event.tiltY);\n" - + " alert(event.pointerType);\n" - + " alert(event.isPrimary);\n" - + " alert(event.altitudeAngle);\n" - + " alert(event.azimuthAngle);\n" + + " log(event.pointerId);\n" + + " log(event.width);\n" + + " log(event.height);\n" + + " log(event.pressure);\n" + + " log(event.tiltX);\n" + + " log(event.tiltY);\n" + + " log(event.pointerType);\n" + + " log(event.isPrimary);\n" + + " log(event.altitudeAngle);\n" + + " log(event.azimuthAngle);\n" + " } else {\n" - + " alert('no event');\n" + + " log('no event');\n" + " }\n" + " }\n"; @@ -58,26 +59,27 @@ public class PointerEventTest extends WebDriverTestCase { */ @Test @Alerts(DEFAULT = {"[object PointerEvent]", "click", "false", "false", "false", - "0", "1", "1", "0", "0", "0", "", "false", "1.5707963267948966", "0"}, + "0", "1", "1", "0", "0", "0", "", "false", "1.5707963267948966", "0"}, FF = {"[object PointerEvent]", "click", "false", "false", "false", - "0", "1", "1", "0", "0", "0", "", "false", "undefined", "undefined"}, + "0", "1", "1", "0", "0", "0", "", "false", "undefined", "undefined"}, FF78 = {"[object PointerEvent]", "click", "false", "false", "false", "0", "1", "1", "0", "0", "0", "", "false", "undefined", "undefined"}, IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -85,15 +87,16 @@ public void create_ctor() throws Exception { */ @Test @Alerts(DEFAULT = {"[object PointerEvent]", "click", "true", "false", "false", - "2", "1", "1", "0", "0", "0", "mouse", "false", "1.5707963267948966", "0"}, + "2", "1", "1", "0", "0", "0", "mouse", "false", "1.5707963267948966", "0"}, FF = {"[object PointerEvent]", "click", "true", "false", "false", - "2", "1", "1", "0", "0", "0", "mouse", "false", "undefined", "undefined"}, + "2", "1", "1", "0", "0", "0", "mouse", "false", "undefined", "undefined"}, FF78 = {"[object PointerEvent]", "click", "true", "false", "false", "2", "1", "1", "0", "0", "0", "mouse", "false", "undefined", "undefined"}, IE = "exception") public void create_ctorWithDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -117,21 +120,22 @@ public void create_ctorWithDetails() throws Exception { @Test @Alerts(DEFAULT = "exception", IE = {"[object PointerEvent]", "", "false", "false", "undefined", - "0", "0", "0", "0", "0", "0", "", "false", "undefined", "undefined"}) + "0", "0", "0", "0", "0", "0", "", "false", "undefined", "undefined"}) public void create_createEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -140,23 +144,24 @@ public void create_createEvent() throws Exception { @Test @Alerts(DEFAULT = "exception", IE = {"[object PointerEvent]", "click", "true", "false", "undefined", - "123", "4", "5", "6", "17", "18", "mouse", "false", "undefined", "undefined"}) + "123", "4", "5", "6", "17", "18", "mouse", "false", "undefined", "undefined"}) public void initPointerEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -165,17 +170,18 @@ public void initPointerEvent() throws Exception { @Test @Alerts(DEFAULT = "exception", IE = {"[object PointerEvent]", "click", "true", "false", "undefined", "123", "4", "5", "6", "17", "18", - "mouse", "false", "undefined", "undefined"}) + "mouse", "false", "undefined", "undefined"}) public void dispatchEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/PopStateEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/PopStateEventTest.java index 1d3bf97d5..ca3a6ce05 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/PopStateEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/PopStateEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -38,16 +38,16 @@ public class PopStateEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" + " if (event) {\n" - + " alert(event);\n" - + " alert(event.target);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" - - + " alert(event.state);\n" + + " log(event);\n" + + " log(event.target);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + + + " log(event.state);\n" + " } else {\n" - + " alert('no event');\n" + + " log('no event');\n" + " }\n" + " }\n"; @@ -59,18 +59,19 @@ public class PopStateEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -81,7 +82,8 @@ public void create_ctor() throws Exception { IE = "exception") public void create_ctorWithDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -108,18 +110,19 @@ public void create_ctorWithDetails() throws Exception { IE = {"[object PopStateEvent]", "null", "", "false", "false", "undefined", "null"}) public void create_createEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -132,19 +135,20 @@ public void create_createEvent() throws Exception { IE = {"[object PopStateEvent]", "null", "", "false", "false", "undefined", "null"}) public void setState() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -156,17 +160,18 @@ public void setState() throws Exception { FF78 = "exception ctor") public void dispatchEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -188,16 +193,17 @@ public void dispatchEvent() throws Exception { @NotYetImplemented({CHROME, EDGE, IE}) public void dispatchEventWithoutInit() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -219,21 +225,22 @@ public void dispatchEventWithoutInit() throws Exception { IE = {"[object PopStateEvent]", "null", "PopState", "true", "false", "undefined", "html"}) public void initPopStateEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/ProgressEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/ProgressEventTest.java index ddd4d7800..0d1db4293 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/ProgressEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/ProgressEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,17 +32,17 @@ public class ProgressEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" + " if (event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" - + " alert(event.lengthComputable);\n" - + " alert(event.loaded);\n" - + " alert(event.total);\n" + + " log(event.lengthComputable);\n" + + " log(event.loaded);\n" + + " log(event.total);\n" + " } else {\n" - + " alert('no event');\n" + + " log('no event');\n" + " }\n" + " }\n"; @@ -54,18 +54,19 @@ public class ProgressEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -76,7 +77,8 @@ public void create_ctor() throws Exception { IE = "exception") public void create_ctorWithDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -103,17 +105,18 @@ public void create_ctorWithDetails() throws Exception { IE = {"[object ProgressEvent]", "", "false", "false", "undefined", "false", "0", "0"}) public void create_createEvent() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/StorageEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/StorageEventTest.java index 3ae16b178..cc35c732f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/StorageEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/StorageEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,11 +32,11 @@ public class StorageEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + " }\n"; /** @@ -47,18 +47,19 @@ public class StorageEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -72,18 +73,19 @@ public void create_ctor() throws Exception { FF78 = {"[object StorageEvent]", "undefined", "false", "false", "false"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -94,18 +96,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -116,18 +119,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -137,18 +141,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -159,18 +164,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -181,7 +187,8 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -210,19 +217,20 @@ public void create_ctorAllDetails() throws Exception { IE = "exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -236,20 +244,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { FF78 = {"[object StorageEvent]", "storage", "false", "false", "false"}) public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -262,8 +271,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -271,6 +281,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TimeEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TimeEventTest.java index e78b897b2..de1cea465 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TimeEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TimeEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -31,11 +31,11 @@ public class TimeEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + " }\n"; /** @@ -45,18 +45,19 @@ public class TimeEventTest extends WebDriverTestCase { @Alerts("exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -66,18 +67,19 @@ public void create_ctor() throws Exception { @Alerts("exception") public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -87,18 +89,19 @@ public void create_ctorWithoutType() throws Exception { @Alerts("exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -108,18 +111,19 @@ public void create_ctorNumericType() throws Exception { @Alerts("exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -129,18 +133,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -150,18 +155,19 @@ public void create_ctorUnknownType() throws Exception { @Alerts("exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -171,7 +177,8 @@ public void create_ctorArbitraryType() throws Exception { @Alerts("exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -195,19 +202,20 @@ public void create_ctorAllDetails() throws Exception { @Alerts("exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -217,20 +225,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { @Alerts("exception") public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -246,8 +255,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -255,6 +265,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TouchEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TouchEventTest.java index fc5506755..f0ebb9774 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TouchEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TouchEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,11 +32,11 @@ public class TouchEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + " }\n"; /** @@ -49,18 +49,19 @@ public class TouchEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -72,18 +73,19 @@ public void create_ctor() throws Exception { EDGE = {"[object TouchEvent]", "undefined", "false", "false", "false"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -96,18 +98,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -120,18 +123,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -141,18 +145,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -165,18 +170,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -189,7 +195,8 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -222,19 +229,20 @@ public void create_ctorAllDetails() throws Exception { IE = "exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -246,20 +254,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { EDGE = {"[object TouchEvent]", "touch", "false", "false", "false"}) public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -275,8 +284,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -284,6 +294,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TrackEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TrackEventTest.java index 495094119..8eb654405 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TrackEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TrackEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,11 +32,11 @@ public class TrackEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + " }\n"; /** @@ -47,18 +47,19 @@ public class TrackEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -72,18 +73,19 @@ public void create_ctor() throws Exception { FF78 = {"[object TrackEvent]", "undefined", "false", "false", "false"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -94,18 +96,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -116,18 +119,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -137,18 +141,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -159,18 +164,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -181,7 +187,8 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -206,19 +213,20 @@ public void create_ctorAllDetails() throws Exception { IE = "exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -232,20 +240,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { FF78 = {"[object TrackEvent]", "track", "false", "false", "false"}) public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -258,8 +267,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -267,6 +277,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TransitionEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TransitionEventTest.java index 50a57ba99..8cefcdd19 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TransitionEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/TransitionEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,11 +32,11 @@ public class TransitionEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + " }\n"; /** @@ -47,18 +47,19 @@ public class TransitionEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -72,18 +73,19 @@ public void create_ctor() throws Exception { FF78 = {"[object TransitionEvent]", "undefined", "false", "false", "false"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -94,18 +96,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -116,18 +119,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -137,18 +141,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -159,18 +164,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -181,7 +187,8 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -208,19 +215,20 @@ public void create_ctorAllDetails() throws Exception { IE = "exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -234,20 +242,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { FF78 = {"[object TransitionEvent]", "transition", "false", "false", "false"}) public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -260,8 +269,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -269,6 +279,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEventTest.java index 5d5e5cd7a..c6fea81e1 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -36,13 +36,13 @@ public class UIEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" - + " alert(event.view == window);\n" + + " log(event.view == window);\n" + " }\n"; /** @@ -53,18 +53,19 @@ public class UIEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -75,7 +76,8 @@ public void create_ctor() throws Exception { IE = "exception") public void create_ctorWithDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -99,19 +101,20 @@ public void create_ctorWithDetails() throws Exception { @Alerts("exception") public void create_ctorWithDetailsViewNotWindow() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -120,18 +123,19 @@ public void create_ctorWithDetailsViewNotWindow() throws Exception { @Test @Alerts({"DOM2: [object UIEvent]", "DOM3: [object UIEvent]"}) public void createEvent() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -141,18 +145,19 @@ public void createEvent() throws Exception { @Alerts({"[object UIEvent]", "click", "true", "true", "true", "7"}) public void initUIEvent() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -164,9 +169,10 @@ public void initUIEvent() throws Exception { public void detail() throws Exception { final String html = "\n" + "\n" @@ -178,15 +184,16 @@ public void detail() throws Exception { int i = 0; final WebDriver driver = loadPage2(html); - verifyAlerts(driver, alerts[i++], alerts[i++]); + verifyTitle2(driver, alerts[i++], alerts[i++]); + i = 0; driver.findElement(By.id("a")).click(); - verifyAlerts(driver, alerts[i++], alerts[i++]); + verifyTitle2(driver, alerts[i++], alerts[i++], alerts[i++], alerts[i++]); final Actions action = new Actions(driver); action.doubleClick(driver.findElement(By.id("b"))); action.perform(); - verifyAlerts(driver, alerts[i++], alerts[i++]); + verifyTitle2(driver, alerts); } /** @@ -198,21 +205,21 @@ public void detail() throws Exception { public void view() throws Exception { final String html = "\n" + "
                          \n" + ""; final String[] alerts = getExpectedAlerts(); - int i = 0; final WebDriver driver = loadPage2(html); - verifyAlerts(driver, alerts[i++], alerts[i++]); + verifyTitle2(driver, alerts[0], alerts[1]); driver.findElement(By.id("b")).click(); - verifyAlerts(driver, alerts[i++], alerts[i++]); + verifyTitle2(driver, alerts); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebGLContextEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebGLContextEventTest.java index 565019c15..3aae6c940 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebGLContextEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/WebGLContextEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,6 +25,7 @@ * Tests for {@link WebGLContextEvent}. * * @author Ahmed Ashour + * @author Ronald Brill */ @RunWith(BrowserRunner.class) public class WebGLContextEventTest extends WebDriverTestCase { @@ -37,15 +38,17 @@ public class WebGLContextEventTest extends WebDriverTestCase { IE = {"undefined", "undefined", "undefined"}) public void constants() throws Exception { final String html = "\n" + ""; - loadPageWithAlerts2(html); + + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/WheelEventTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/WheelEventTest.java index 69d5ad7a7..1ca463432 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/WheelEventTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/event/WheelEventTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -32,11 +32,11 @@ public class WheelEventTest extends WebDriverTestCase { private static final String DUMP_EVENT_FUNCTION = " function dump(event) {\n" - + " alert(event);\n" - + " alert(event.type);\n" - + " alert(event.bubbles);\n" - + " alert(event.cancelable);\n" - + " alert(event.composed);\n" + + " log(event);\n" + + " log(event.type);\n" + + " log(event.bubbles);\n" + + " log(event.cancelable);\n" + + " log(event.composed);\n" + " }\n"; /** @@ -47,18 +47,19 @@ public class WheelEventTest extends WebDriverTestCase { IE = "exception") public void create_ctor() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -72,18 +73,19 @@ public void create_ctor() throws Exception { FF78 = {"[object WheelEvent]", "undefined", "false", "false", "false"}) public void create_ctorWithoutType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -94,18 +96,19 @@ public void create_ctorWithoutType() throws Exception { IE = "exception") public void create_ctorNumericType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -116,18 +119,19 @@ public void create_ctorNumericType() throws Exception { IE = "exception") public void create_ctorNullType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -137,18 +141,19 @@ public void create_ctorNullType() throws Exception { @Alerts("exception") public void create_ctorUnknownType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -159,18 +164,19 @@ public void create_ctorUnknownType() throws Exception { IE = "exception") public void create_ctorArbitraryType() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -181,7 +187,8 @@ public void create_ctorArbitraryType() throws Exception { IE = "exception") public void create_ctorAllDetails() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -209,19 +216,20 @@ public void create_ctorAllDetails() throws Exception { IE = "exception") public void create_ctorAllDetailsMissingData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -235,20 +243,21 @@ public void create_ctorAllDetailsMissingData() throws Exception { FF78 = {"[object WheelEvent]", "wheel", "false", "false", "false"}) public void create_ctorAllDetailsWrongData() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -261,8 +270,9 @@ public void inWindow() throws Exception { = "\n" + "\n" + " \n" + "\n" @@ -270,6 +280,6 @@ public void inWindow() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/BlobTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/BlobTest.java index bbb7b7c0e..d2e2f324e 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/BlobTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/BlobTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileListTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileListTest.java index f6eb0d59f..9369c0058 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileListTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileListTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileReaderTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileReaderTest.java index 0c82bf4e2..4e9b5e00c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileReaderTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileReaderTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,8 +14,6 @@ */ package com.gargoylesoftware.htmlunit.javascript.host.file; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE; - import java.io.File; import java.net.URL; import java.nio.charset.Charset; @@ -29,7 +27,6 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; -import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; import com.gargoylesoftware.htmlunit.WebDriverTestCase; import com.gargoylesoftware.htmlunit.html.HtmlPageTest; @@ -207,14 +204,16 @@ public void readAsDataURL_blobMimeTypeUnknown() throws Exception { } /** + * TODO disabled for the moment as it fails on JDK1.8 on ubuntu + * and i do not like to add special support for checking that. + * * @throws Exception if the test fails */ - @Test + // @Test @Alerts(DEFAULT = "data:application/octet-stream;base64," + "Niii65mOV9yO6adjkXdWd+zTIXFcOWwumIGlIFRqQ05seTG+J2dx0KcD", IE = "data:;base64,Niii65mOV9yO6adjkXdWd+zTIXFcOWwumIGlIFRqQ05seTG+J2dx0KcD") - @NotYetImplemented(IE) // fails only on linux - public void readAsDataURLUnknown() throws Exception { + private void readAsDataURLUnknown() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" @@ -254,10 +253,10 @@ public void readAsDataURLUnknown() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "data:", - FF = "data:image/png;base64,", - FF78 = "data:image/png;base64,", - IE = "null") + @Alerts(DEFAULT = "#data:", + FF = "#data:image/png;base64,", + FF78 = "#data:image/png;base64,", + IE = "#null") public void readAsDataURLEmptyImage() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ @@ -268,9 +267,9 @@ public void readAsDataURLEmptyImage() throws Exception { + " var file = document.querySelector('input[type=file]').files[0];\n" + " var reader = new FileReader();\n" + " reader.addEventListener('load', function () {\n" - + " alert(reader.result);\n" + + " alert('#' + reader.result);\n" + " }, false);\n" - + "\n" + + " if (file) {\n" + " reader.readAsDataURL(file);\n" + " }\n" diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileTest.java index 8c05b65c4..ea0ff8fb5 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -43,15 +43,15 @@ public class FileTest extends WebDriverTestCase { */ @Test @Alerts(DEFAULT = {"1", "ScriptExceptionTest1.txt", - "Sun Jul 26 2015 10:21:47 GMT-0400 (Eastern Daylight Time)", - "1437920507000", "", "14", MimeType.TEXT_PLAIN}, + "Sun Jul 26 2015 10:21:47 GMT-0400 (Eastern Daylight Time)", + "1437920507000", "", "14", MimeType.TEXT_PLAIN}, FF = {"1", "ScriptExceptionTest1.txt", "undefined", - "1437920507000", "", "14", MimeType.TEXT_PLAIN}, + "1437920507000", "", "14", MimeType.TEXT_PLAIN}, FF78 = {"1", "ScriptExceptionTest1.txt", "undefined", "1437920507000", "", "14", MimeType.TEXT_PLAIN}, IE = {"1", "ScriptExceptionTest1.txt", - "Sun Jul 26 2015 10:21:47 GMT-0400 (Eastern Daylight Time)", - "undefined", "undefined", "14", MimeType.TEXT_PLAIN}) + "Sun Jul 26 2015 10:21:47 GMT-0400 (Eastern Daylight Time)", + "undefined", "undefined", "14", MimeType.TEXT_PLAIN}) public void properties() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ @@ -260,8 +260,7 @@ public void ctorNoArgs() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"[object File]", "htMluniT.txt", "", "true", "0", - ""}, + @Alerts(DEFAULT = {"[object File]", "htMluniT.txt", "", "true", "0", ""}, IE = "TypeError true") public void ctorEmpty() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ @@ -294,8 +293,7 @@ public void ctorEmpty() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"[object File]", "htMluniT.txt", "", "true", "8", - "HtmlUnit"}, + @Alerts(DEFAULT = {"[object File]", "htMluniT.txt", "", "true", "8", "HtmlUnit"}, IE = "TypeError true") public void ctorString() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ @@ -329,7 +327,7 @@ public void ctorString() throws Exception { */ @Test @Alerts(DEFAULT = {"[object File]", "htMluniT.txt", "application/octet-stream", "1234567", "8", - "HtmlUnit"}, + "HtmlUnit"}, IE = "TypeError true") public void ctorStringWithOptions() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ @@ -364,7 +362,7 @@ public void ctorStringWithOptions() throws Exception { */ @Test @Alerts(DEFAULT = {"[object File]", "htMluniT.txt", "", "true", "16", - "HtmlUnitis great"}, + "HtmlUnitis great"}, IE = "TypeError true") public void ctorStrings() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ @@ -397,8 +395,7 @@ public void ctorStrings() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"[object File]", "htMluniT.txt", "", "true", "12", - "HtmlUnitMMMK"}, + @Alerts(DEFAULT = {"[object File]", "htMluniT.txt", "", "true", "12", "HtmlUnitMMMK"}, IE = "TypeError true") public void ctorMixed() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/geo/GeolocationTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/geo/GeolocationTest.java index d5370bcf2..9c89d277f 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/geo/GeolocationTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/geo/GeolocationTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,7 +14,10 @@ */ package com.gargoylesoftware.htmlunit.javascript.host.geo; -import static org.junit.Assert.fail; +import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.CHROME; +import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.EDGE; +import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF; +import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF78; import java.io.IOException; import java.io.Writer; @@ -35,6 +38,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.BrowserRunner.OS; import com.gargoylesoftware.htmlunit.CollectingAlertHandler; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.WebServerTestCase; @@ -45,6 +49,8 @@ * * @author Ahmed Ashour * @author Frank Danek + * @author Ronald Brill + * @author cdalexndr */ @RunWith(BrowserRunner.class) public class GeolocationTest extends WebServerTestCase { @@ -54,11 +60,9 @@ public class GeolocationTest extends WebServerTestCase { */ @Test @Alerts("12.34567891 98.76543211") - @NotYetImplemented //since it runs on Windows only (for now) + @NotYetImplemented(value = {EDGE, FF78, FF, CHROME}, + os = OS.Linux) //since it runs on Windows only (for now) public void getCurrentPosition_enabled() throws Exception { - if (getBrowserVersion().isFirefox() && GEOLOCATION_IGNORE) { - fail("To succeed!"); - } getCurrentPosition(true); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/EnumeratorTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/EnumeratorTest.java index 79db9684d..60c656464 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/EnumeratorTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/EnumeratorTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/FormChildTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/FormChildTest.java index 274c2dafe..0db514eed 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/FormChildTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/FormChildTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAllCollectionTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAllCollectionTest.java index 83c188e76..344d790d4 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAllCollectionTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAllCollectionTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElement2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElement2Test.java index 102989ed9..30af227cc 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElement2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElement2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -70,23 +70,25 @@ public void attributes() throws Exception { "\n" + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + expandExpectedAlertsVariables(URL_FIRST); + loadPageVerifyTitle2(html); } /** @@ -96,27 +98,28 @@ public void attributes() throws Exception { @Alerts({"attachEvent not available", "href"}) public void javaScriptPreventDefaultIE() throws Exception { final String html - = "Test\n" + = "\n" + "\n" + "\n" - + " link\n" + + " link\n" + ""; final WebDriver driver = loadPage2(html); - verifyAlerts(driver, getExpectedAlerts()[0]); + verifyTitle2(driver, getExpectedAlerts()[0]); driver.findElement(By.id("link")).click(); - verifyAlerts(driver, getExpectedAlerts()[1]); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -126,25 +129,26 @@ public void javaScriptPreventDefaultIE() throws Exception { @Alerts("onclick") public void javaScriptPreventDefault() throws Exception { final String html - = "Test\n" + = "\n" + "\n" + "\n" - + "link\n" + + "link\n" + ""; final WebDriver driver = loadPage2(html); driver.findElement(By.id("link")).click(); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -154,12 +158,13 @@ public void javaScriptPreventDefault() throws Exception { @Alerts({"", "§§URL§§foo.html", "javascript:void(0)", "§§URL§§#", "mailto:"}) public void defaultConversionToString() throws Exception { final String html - = "AnchorTest\n" + "\n" @@ -169,7 +174,9 @@ public void defaultConversionToString() throws Exception { + "#\n" + "mail\n" + ""; - loadPageWithAlerts2(html); + + expandExpectedAlertsVariables(URL_FIRST); + loadPageVerifyTitle2(html); } /** @@ -211,21 +218,22 @@ public void javaScriptAnchorClick() throws Exception { */ @Test @Alerts({"§§URL§§testsite1.html", "testsite1.html", "§§URL§§testsite2.html", - "testsite2.html", "13", "testanchor", "mailto:"}) + "testsite2.html", "13", "testanchor", "mailto:"}) public void getAttribute_and_href() throws Exception { final String html - = "AnchorTest\n" + = "\n" + "\n" + "\n" + "\n" @@ -237,8 +245,7 @@ public void getAttribute_and_href() throws Exception { driver.findElement(By.name("testanchor")).click(); expandExpectedAlertsVariables(URL_FIRST); - - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -246,17 +253,18 @@ public void getAttribute_and_href() throws Exception { */ @Test @Alerts({"http://htmlunit.sourceforge.net/", "§§URL§§test", "§§URL§§#test", - "§§URL§§#", "§§URL§§"}) + "§§URL§§#", "§§URL§§"}) public void getDefaultValue() throws Exception { final String html - = "AnchorTest\n" + = "\n" + "\n" + "\n" + "\n" @@ -270,8 +278,7 @@ public void getDefaultValue() throws Exception { final WebDriver driver = loadPage2(html); expandExpectedAlertsVariables(URL_FIRST); - - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -279,17 +286,18 @@ public void getDefaultValue() throws Exception { */ @Test @Alerts({"http://htmlunit.sourceforge.net/", "§§URL§§test", "§§URL§§#test", - "§§URL§§#", "§§URL§§"}) + "§§URL§§#", "§§URL§§"}) public void getDefaultValueWithHash() throws Exception { final String html - = "AnchorTest\n" + = "\n" + "\n" + "\n" + "\n" @@ -304,8 +312,7 @@ public void getDefaultValueWithHash() throws Exception { final WebDriver driver = loadPage2(html, UrlUtils.getUrlWithNewRef(URL_FIRST, "ref")); expandExpectedAlertsVariables(URL_FIRST); - - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -313,19 +320,20 @@ public void getDefaultValueWithHash() throws Exception { */ @Test @Alerts(DEFAULT = {"http://htmlunit.sourceforge.net/", "§§URL§§test", "§§URL§§index.html#test", - "§§URL§§index.html#", "§§URL§§index.html"}, + "§§URL§§index.html#", "§§URL§§index.html"}, IE = {"http://htmlunit.sourceforge.net/", "§§URL§§test", "§§URL§§index.html#test", - "§§URL§§index.html#", "§§URL§§"}) + "§§URL§§index.html#", "§§URL§§"}) public void getDefaultValueWithHashAndFileName() throws Exception { final String html - = "AnchorTest\n" + = "\n" + "\n" + "\n" + "\n" @@ -340,8 +348,7 @@ public void getDefaultValueWithHashAndFileName() throws Exception { final WebDriver driver = loadPage2(html, UrlUtils.getUrlWithNewPath(URL_FIRST, "/index.html")); expandExpectedAlertsVariables(URL_FIRST); - - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -351,22 +358,23 @@ public void getDefaultValueWithHashAndFileName() throws Exception { @Alerts({"true", "not defined"}) public void onclickToString() throws Exception { final String html - = "AnchorTest\n" + = "\n" + "\n" + "\n" + "\n" - + " a1\n" + + " a1\n" + " a2\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -380,25 +388,26 @@ public void readWriteAccessKey() throws Exception { + "\n" + " \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -410,13 +419,14 @@ public void readWriteAccessKey() throws Exception { @Test @Alerts({"9", "9", "true", "false"}) public void hrefTrimmed() throws Exception { - final String html = "AnchorTest\n" + final String html = "\n" + "\n" + "\n" @@ -428,7 +438,7 @@ public void hrefTrimmed() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -582,37 +592,39 @@ private void javascriptTarget(final String target, final int newWindows, @Alerts("true") public void thisInJavascriptHref() throws Exception { final String html - = "\n" + = "\n" + + "\n" + + "\n" + "\n" - + " link 1\n" + + " link 1\n" + ""; final WebDriver driver = loadPage2(html); driver.findElement(By.tagName("a")).click(); assertEquals(1, getMockWebConnection().getRequestCount()); - verifyAlerts(driver, getExpectedAlerts()); + verifyTitle2(driver, getExpectedAlerts()); } /** * @throws Exception if the test fails */ @Test - @Alerts(IE = {"§§URL§§second/", "object", "[object HTMLAnchorElement]"}, - CHROME = {"§§URL§§second/", "object", "function HTMLAnchorElement() { [native code] }"}, - EDGE = {"§§URL§§second/", "object", "function HTMLAnchorElement() { [native code] }"}, - FF = {"§§URL§§second/", "object", "function HTMLAnchorElement() {\n [native code]\n}"}, - FF78 = {"§§URL§§second/", "object", "function HTMLAnchorElement() {\n [native code]\n}"}) + @Alerts(DEFAULT = {"§§URL§§second/", "object", "function HTMLAnchorElement() { [native code] }"}, + IE = {"§§URL§§second/", "object", "[object HTMLAnchorElement]"}) public void typeof() throws Exception { final String html = "" - + "foo\n" + + "\n" + "\n" + "\n" @@ -620,7 +632,8 @@ public void typeof() throws Exception { + " link\n" + ""; - loadPageWithAlerts2(html); + expandExpectedAlertsVariables(URL_FIRST); + loadPageVerifyTitle2(html); } /** @@ -629,8 +642,9 @@ public void typeof() throws Exception { @Test @Alerts({"", "", "text/html", "TExT/hTMl", " text/html ", "application/pdf", "unknown"}) public void getType() throws Exception { - final String html = "foo\n" + final String html = "\n" + "\n" + "\n" @@ -656,7 +670,7 @@ public void getType() throws Exception { + " link\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -665,36 +679,38 @@ public void getType() throws Exception { @Test @Alerts({"text/html", "", " TExT/hTMl ", "unknown", "application/pdf"}) public void setType() throws Exception { - final String html = "foo\n" + final String html = "\n" + "\n" + "\n" + "\n" + " link\n" + + LOG_TEXTAREA + ""; - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -702,13 +718,13 @@ public void setType() throws Exception { */ @Test @Alerts(IE = {"http:||||||/", "https:||||||/", "mailto:||||||foo@foo.com", "tel:||||||123456", - "foo:||||||blabla", "file:||||||/p://", "file:||||||/p:/", "file:||||||/p:/TeMp"}, + "foo:||||||blabla", "file:||||||/p://", "file:||||||/p:/", "file:||||||/p:/TeMp"}, CHROME = {":||||||", ":||||||", "mailto:||||||foo@foo.com", "tel:||||||123456", - "foo:||||||blabla", "file:||||||/P://", "file:||||||/P:/", "file:||||||/P:/TeMp"}, + "foo:||||||blabla", "file:||||||/P://", "file:||||||/P:/", "file:||||||/P:/TeMp"}, EDGE = {":||||||", ":||||||", "mailto:||||||foo@foo.com", "tel:||||||123456", - "foo:||||||blabla", "file:||||||/P://", "file:||||||/P:/", "file:||||||/P:/TeMp"}, + "foo:||||||blabla", "file:||||||/P://", "file:||||||/P:/", "file:||||||/P:/TeMp"}, FF = {"http:||||||", "http:||||||", "mailto:||||||", "tel:||||||", - "foo:||||||", "p:||||||", "p:||||||", "p:||||||"}, + "foo:||||||", "p:||||||", "p:||||||", "p:||||||"}, FF78 = {"http:||||||", "http:||||||", "mailto:||||||", "tel:||||||", "foo:||||||", "p:||||||", "p:||||||", "p:||||||"}) public void propertiesNonStandardHref() throws Exception { @@ -724,17 +740,18 @@ public void propertiesNonStandardHref() throws Exception { + " p:/TeMp\n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -751,17 +768,18 @@ private void attribute(final String attribute, final String value) throws Except "\n" + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -799,9 +817,9 @@ public void origin() throws Exception { */ @Test @Alerts(DEFAULT = {"", "§§URL§§", "§§URL§§", "§§URL§§", "http://www.htmlunit.org", - "http://www.htmlunit.org:1234", "https://www.htmlunit.org:1234"}, + "http://www.htmlunit.org:1234", "https://www.htmlunit.org:1234"}, IE = {"undefined", "undefined", "undefined", "undefined", "undefined", - "undefined", "undefined"}) + "undefined", "undefined"}) public void originAttrib() throws Exception { expandExpectedAlertsVariables(new URL("http://localhost:" + PORT)); @@ -809,10 +827,11 @@ public void originAttrib() throws Exception { "\n" + " \n" + " \n" @@ -828,7 +847,7 @@ public void originAttrib() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -836,19 +855,20 @@ public void originAttrib() throws Exception { */ @Test @Alerts(DEFAULT = {"-null", "-", "- \t ", "no-referrer-no-referrer", - "origin-origin", "unsafe-url-unsafe-url", "-unknown"}, + "origin-origin", "unsafe-url-unsafe-url", "-unknown"}, IE = {"undefined-null", "undefined-", "undefined- \t ", - "undefined-no-referrer", "undefined-origin", - "undefined-unsafe-url", "undefined-unknown"}) + "undefined-no-referrer", "undefined-origin", + "undefined-unsafe-url", "undefined-unknown"}) public void referrerPolicy() throws Exception { final String html = "\n" + " \n" + " \n" @@ -861,10 +881,11 @@ public void referrerPolicy() throws Exception { + " a4\n" + " a5\n" + " a6\n" + + LOG_TEXTAREA + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -872,39 +893,40 @@ public void referrerPolicy() throws Exception { */ @Test @Alerts(DEFAULT = {"origin-origin", "-unknown", "no-referrer-no-referrer", - "-", "no-referrer-NO-reFerrer", "origin-origin", "- ", "-unknown"}, + "-", "no-referrer-NO-reFerrer", "origin-origin", "- ", "-unknown"}, IE = {"undefined-origin", "unknown-origin", "no-referrer-origin", - "-origin", "NO-reFerrer-origin", "NO-reFerrer-origin", - "NO-reFerrer- ", "NO-reFerrer-unknown"}) + "-origin", "NO-reFerrer-origin", "NO-reFerrer-origin", + "NO-reFerrer- ", "NO-reFerrer-unknown"}) public void setReferrerPolicy() throws Exception { final String html = "\n" + " \n" + " \n" + " \n" @@ -913,7 +935,7 @@ public void setReferrerPolicy() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -921,30 +943,30 @@ public void setReferrerPolicy() throws Exception { */ @Test @Alerts({"[object HTMLButtonElement]", "[object HTMLButtonElement]", - "§§URL§§", "http://srv/htmlunit.org"}) + "§§URL§§", "http://srv/htmlunit.org"}) public void focus() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" - + " Test\n" + " \n" + "\n" @@ -956,7 +978,8 @@ public void focus() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + expandExpectedAlertsVariables(URL_FIRST); + loadPageVerifyTitle2(html); } /** @@ -1038,23 +1061,24 @@ protected void doPost(final HttpServletRequest request, final HttpServletRespons public void readWriteRel() throws Exception { final String html = "a1a2"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1066,19 +1090,20 @@ public void readWriteRel() throws Exception { public void relList() throws Exception { final String html = "a1a2"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1086,68 +1111,69 @@ public void relList() throws Exception { */ @Test @Alerts(DEFAULT = {"", "user", "user", "", - "", "", - "Tester", "https://Tester:password@developer.mozilla.org/", - "Tester", "https://Tester@developer.mozilla.org/", - "Tester", "https://Tester@developer.mozilla.org/"}, + "", "", + "Tester", "https://Tester:password@developer.mozilla.org/", + "Tester", "https://Tester@developer.mozilla.org/", + "Tester", "https://Tester@developer.mozilla.org/"}, IE = {"undefined", "undefined", "undefined", "undefined"}) @HtmlUnitNYI(CHROME = {"", "user", "user", "", - "", "", - "Tester", "https://Tester:password@developer.mozilla.org", - "Tester", "https://Tester@developer.mozilla.org", - "Tester", "https://Tester@developer.mozilla.org"}, + "", "", + "Tester", "https://Tester:password@developer.mozilla.org", + "Tester", "https://Tester@developer.mozilla.org", + "Tester", "https://Tester@developer.mozilla.org"}, EDGE = {"", "user", "user", "", - "", "", - "Tester", "https://Tester:password@developer.mozilla.org", - "Tester", "https://Tester@developer.mozilla.org", - "Tester", "https://Tester@developer.mozilla.org"}, + "", "", + "Tester", "https://Tester:password@developer.mozilla.org", + "Tester", "https://Tester@developer.mozilla.org", + "Tester", "https://Tester@developer.mozilla.org"}, FF78 = {"", "user", "user", "", - "", "", - "Tester", "https://Tester:password@developer.mozilla.org", - "Tester", "https://Tester@developer.mozilla.org", - "Tester", "https://Tester@developer.mozilla.org"}, + "", "", + "Tester", "https://Tester:password@developer.mozilla.org", + "Tester", "https://Tester@developer.mozilla.org", + "Tester", "https://Tester@developer.mozilla.org"}, FF = {"", "user", "user", "", - "", "", - "Tester", "https://Tester:password@developer.mozilla.org", - "Tester", "https://Tester@developer.mozilla.org", - "Tester", "https://Tester@developer.mozilla.org"}) + "", "", + "Tester", "https://Tester:password@developer.mozilla.org", + "Tester", "https://Tester@developer.mozilla.org", + "Tester", "https://Tester@developer.mozilla.org"}) public void readWriteUsername() throws Exception { final String html = "a1" - + "a2" - + "a3" - + "a3" - + ""; - loadPageWithAlerts2(html); + + "a2" + + "a3" + + "a3" + + ""; + loadPage2(html); } /** @@ -1155,67 +1181,245 @@ public void readWriteUsername() throws Exception { */ @Test @Alerts(DEFAULT = {"", "password", "password", "", - "", "", - "Tester", "https://user:Tester@developer.mozilla.org/", - "Tester", "https://:Tester@developer.mozilla.org/", - "Tester", "https://:Tester@developer.mozilla.org/"}, + "", "", + "Tester", "https://user:Tester@developer.mozilla.org/", + "Tester", "https://:Tester@developer.mozilla.org/", + "Tester", "https://:Tester@developer.mozilla.org/"}, IE = {"undefined", "undefined", "undefined", "undefined"}) @HtmlUnitNYI(CHROME = {"", "password", "password", "", - "", "", - "Tester", "https://user:Tester@developer.mozilla.org", - "Tester", "https://:Tester@developer.mozilla.org", - "Tester", "https://:Tester@developer.mozilla.org"}, + "", "", + "Tester", "https://user:Tester@developer.mozilla.org", + "Tester", "https://:Tester@developer.mozilla.org", + "Tester", "https://:Tester@developer.mozilla.org"}, EDGE = {"", "password", "password", "", - "", "", - "Tester", "https://user:Tester@developer.mozilla.org", - "Tester", "https://:Tester@developer.mozilla.org", - "Tester", "https://:Tester@developer.mozilla.org"}, + "", "", + "Tester", "https://user:Tester@developer.mozilla.org", + "Tester", "https://:Tester@developer.mozilla.org", + "Tester", "https://:Tester@developer.mozilla.org"}, FF78 = {"", "password", "password", "", - "", "", - "Tester", "https://user:Tester@developer.mozilla.org", - "Tester", "https://:Tester@developer.mozilla.org", - "Tester", "https://:Tester@developer.mozilla.org"}, + "", "", + "Tester", "https://user:Tester@developer.mozilla.org", + "Tester", "https://:Tester@developer.mozilla.org", + "Tester", "https://:Tester@developer.mozilla.org"}, FF = {"", "password", "password", "", - "", "", - "Tester", "https://user:Tester@developer.mozilla.org", - "Tester", "https://:Tester@developer.mozilla.org", - "Tester", "https://:Tester@developer.mozilla.org"}) + "", "", + "Tester", "https://user:Tester@developer.mozilla.org", + "Tester", "https://:Tester@developer.mozilla.org", + "Tester", "https://:Tester@developer.mozilla.org"}) public void readWritePassword() throws Exception { final String html = "a1" - + "a2" - + "a3" - + "a3" - + ""; + loadPageVerifyTitle2(html); + } - + "}\n" + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts({"http:", "https:", "https://§§URL§§/foo.html#O"}) + public void readWriteProtocol() throws Exception { + final String html = + "\n" + + " \n" + + " "; - loadPageWithAlerts2(html); + + " tester.protocol = 'httPS';\n" + + " log(tester.protocol);\n" + + " log(tester.href);\n" + + " }\n" + + " \n" + + " \n" + + " \n" + + " link 1\n" + + " \n" + + ""; + + expandExpectedAlertsVariables("localhost:" + PORT); + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts({"http:", "axdeg:", "axdeg://§§URL§§/foo.html#O"}) + public void readWriteProtocolUnknown() throws Exception { + final String html = + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " link 1\n" + + " \n" + + ""; + + expandExpectedAlertsVariables("localhost:" + PORT); + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts(DEFAULT = {"http:", "http:", "http://§§URL§§/foo.html#O", + "http:", "http://§§URL§§/abc_xyz://localhost/foo.html"}, + IE = {"http:", "invalid argument", + "http:", "http://§§URL§§/abc_xyz://localhost/foo.html"}) + public void readWriteProtocolBroken() throws Exception { + final String html = + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " link 1\n" + + " link 1\n" + + " \n" + + ""; + + expandExpectedAlertsVariables("localhost:" + PORT); + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts({"localhost", "motion", "http://§§URL§§/foo.html#O"}) + public void readWriteAnchorHostname() throws Exception { + final String html = + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " link 1\n" + + " \n" + + ""; + + expandExpectedAlertsVariables("motion:" + PORT); + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts(DEFAULT = {"localhost", "localhost", "http://localhost:§§URL§§/foo.html#O", + "localhost", "http://localhost:§§URL§§/foo.html#O"}, + CHROME = {"localhost", "localhost", "http://localhost:§§URL§§/foo.html#O", + "%20%20%20%20", "http://%20%20%20%20:§§URL§§/foo.html#O"}, + EDGE = {"localhost", "localhost", "http://localhost:§§URL§§/foo.html#O", + "%20%20%20%20", "http://%20%20%20%20:§§URL§§/foo.html#O"}, + IE = {"localhost", "", "http://:§§URL§§/foo.html#O", + "%20%20%20%20", "http://%20%20%20%20:§§URL§§/foo.html#O"}) + @HtmlUnitNYI(CHROME = {"localhost", "localhost", "http://localhost:§§URL§§/foo.html#O", + "%20%20%20%20", "http:// :§§URL§§/foo.html#O"}, + EDGE = {"localhost", "localhost", "http://localhost:§§URL§§/foo.html#O", + "%20%20%20%20", "http:// :§§URL§§/foo.html#O"}, + IE = {"localhost", "localhost", "http://localhost:§§URL§§/foo.html#O", + "%20%20%20%20", "http:// :§§URL§§/foo.html#O"}) + public void readWriteAnchorHostnameEmpty() throws Exception { + final String html = + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " link 1\n" + + " \n" + + ""; + + expandExpectedAlertsVariables("" + PORT); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElementTest.java index 9c32478b6..0a2faab43 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAnchorElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAppletElement2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAppletElement2Test.java index 85715a283..5c9330cd9 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAppletElement2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAppletElement2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAppletElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAppletElementTest.java index e942eb1cd..3b934aadb 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAppletElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAppletElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -38,7 +38,7 @@ public class HTMLAppletElementTest extends WebDriverTestCase { */ @Test @Alerts(DEFAULT = {"undefined", "undefined", "undefined", "undefined", - "undefined", "undefined", "undefined"}, + "undefined", "undefined", "undefined"}, IE = {"left", "right", "bottom", "middle", "top", "", ""}) @NotYetImplemented(IE) public void getAlign() throws Exception { diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAreaElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAreaElementTest.java index 673de7396..b34db7d9c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAreaElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAreaElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -93,7 +93,7 @@ public void type() throws Exception { */ @Test @Alerts(DEFAULT = {"[object HTMLButtonElement]", "[object HTMLButtonElement]", - "§§URL§§", "http://srv/htmlunit.org"}, + "§§URL§§", "http://srv/htmlunit.org"}, FF = {"[object HTMLButtonElement]", "", "§§URL§§", "http://srv/htmlunit.org"}, FF78 = {"[object HTMLButtonElement]", "", "§§URL§§", "http://srv/htmlunit.org"}) public void focus() throws Exception { @@ -135,6 +135,7 @@ public void focus() throws Exception { + "\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAudioElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAudioElementTest.java index c006c6885..1e5291554 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAudioElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLAudioElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBRElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBRElementTest.java index 0b3dd79e7..5d4fe392b 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBRElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBRElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -37,9 +37,9 @@ public class HTMLBRElementTest extends WebDriverTestCase { */ @Test @Alerts(DEFAULT = {"", "left", "all", "right", "none", "2", "foo", "left", - "none", "right", "all", "2", "abc", "8"}, + "none", "right", "all", "2", "abc", "8"}, IE = {"", "left", "all", "right", "none", "", "", "!", "!", "!", "left", "none", "right", "all", "none", - "", ""}) + "", ""}) public void clear() throws Exception { final String html = "\n" diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseElementTest.java index a2e5cb7b2..a11c47491 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -53,6 +53,8 @@ public void hrefAndTarget() throws Exception { + " \n" + " foo\n" + ""; + + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html); } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseFontElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseFontElementTest.java index f4d11492d..ca50447fc 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseFontElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBaseFontElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBodyElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBodyElementTest.java index db164e953..ca44e2000 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBodyElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLBodyElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLButtonElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLButtonElementTest.java index 38b464c19..094524cb7 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLButtonElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLButtonElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCanvasElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCanvasElementTest.java index 4d0f1085c..f0bd9a9be 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCanvasElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCanvasElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -65,93 +65,165 @@ public void test() throws Exception { */ @Test @Alerts(FF = {"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAxUlEQVR4nO3BMQEAAADCoPVPbQhf" - + "oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - + "AAAAAAAAAAAAAAAAAAAAAAAAAAAOA1v9QAATX68/0AAAAASUVORK5CYII=", - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAxUlEQVR4nO3BMQEAAADCoPVPbQhf" - + "oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - + "AAAAAAAAAAAAAAAAAAAAAAAAAAAOA1v9QAATX68/0AAAAASUVORK5CYII="}, + + "oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAOA1v9QAATX68/0AAAAASUVORK5CYII=", + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAxUlEQVR4nO3BMQEAAADCoPVPbQhf" + + "oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAOA1v9QAATX68/0AAAAASUVORK5CYII="}, FF78 = {"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAxUlEQVR4nO3BMQEAAADCoPVPbQhf" - + "oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - + "AAAAAAAAAAAAAAAAAAAAAAAAAAAOA1v9QAATX68/0AAAAASUVORK5CYII=", - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAxUlEQVR4nO3BMQEAAADCoPVPbQhf" - + "oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - + "AAAAAAAAAAAAAAAAAAAAAAAAAAAOA1v9QAATX68/0AAAAASUVORK5CYII="}, + + "oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAOA1v9QAATX68/0AAAAASUVORK5CYII=", + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAxUlEQVR4nO3BMQEAAADCoPVPbQhf" + + "oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAOA1v9QAATX68/0AAAAASUVORK5CYII="}, IE = {"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAAAARnQU1BAA" - + "Cxjwv8YQUAAADGSURBVHhe7cExAQAAAMKg9U9tCF8gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAONUAv9QAAcDhjokAAAAASUVORK5CYII=", - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAAAARnQU1BAACx" - + "jwv8YQUAAADGSURBVHhe7cExAQAAAMKg9U9tCF8gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAONUAv9QAAcDhjokAAAAASUVORK5CYII="}, + + "Cxjwv8YQUAAADGSURBVHhe7cExAQAAAMKg9U9tCF8gAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAONUAv9QAAcDhjokAAAAASUVORK5CYII=", + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAAAARnQU1BAACx" + + "jwv8YQUAAADGSURBVHhe7cExAQAAAMKg9U9tCF8gAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + + "AAAAAAAAAAAAAAAAONUAv9QAAcDhjokAAAAASUVORK5CYII="}, CHROME = {"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAEYklEQVR4Xu3UAQkAAAwCwdm/" - + "9HI83BLIOdw5AgQIRAQWySkmAQIEzmB5AgIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUp" - + "QAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGC" - + "w/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAg" - + "YyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOV" - + "qUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQ" - + "IGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfo" - + "AAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZA" - + "YOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OV" - + "oAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDB" - + "YfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQ" - + "IZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK" - + "1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJ" - + "EDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPw" - + "AAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMg" - + "IGK1OVoAQIGCw/QIBARsBgZaoSlACBB1YxAJfjJb2jAAAAAElFTkSuQmCC", - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAEYklEQVR4Xu3UAQkAAAwCwdm/9HI83BLIOdw" - + "5AgQIRAQWySkmAQIEzmB5AgIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQC" - + "AjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZ" - + "aoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgB" - + "AgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8" - + "gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARs" - + "BgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJ" - + "SgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQM" - + "lh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIB" - + "ARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwc" - + "pUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQA" - + "gQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/" - + "QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYy" - + "AwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqU" - + "pQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIG" - + "Cw/QIBARsBgZaoSlACBB1YxAJfjJb2jAAAAAElFTkSuQmCC"}, + + "9HI83BLIOdw5AgQIRAQWySkmAQIEzmB5AgIEMgIGK1OVoAQIGCw/" + + "QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUp" + + "QAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYy" + + "AwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGC" + + "w/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqU" + + "pQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAg" + + "YyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIG" + + "Cw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOV" + + "qUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAA" + + "gYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQ" + + "IGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAY" + + "OVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfo" + + "AAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVo" + + "AQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZA" + + "YOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoA" + + "AgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OV" + + "oAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZ" + + "AYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDB" + + "YfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1O" + + "VoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQ" + + "IZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJED" + + "BYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK" + + "1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAA" + + "QIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJ" + + "EDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIG" + + "K1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPw" + + "AAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkE" + + "JEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMg" + + "IGK1OVoAQIGCw/QIBARsBgZaoSlACBB1YxAJfjJb2jAAAAAElFTkSuQmCC", + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAA" + + "ABkW7XSAAAEYklEQVR4Xu3UAQkAAAwCwdm/9HI83BLIOdw" + + "5AgQIRAQWySkmAQIEzmB5AgIEMgIGK1OVoAQIGCw/QIBARsBgZa" + + "oSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQC" + + "AjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBA" + + "gbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZ" + + "aoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQ" + + "CAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgB" + + "AgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBg" + + "ZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8" + + "gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSg" + + "BAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARs" + + "BgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMl" + + "h8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJ" + + "SgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBAR" + + "sBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQM" + + "lh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpU" + + "JSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIB" + + "ARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQ" + + "Mlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwc" + + "pUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QI" + + "BARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQA" + + "gQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwc" + + "pUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/" + + "QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQ" + + "AgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYy" + + "AwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGC" + + "w/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqU" + + "pQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAg" + + "YyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIG" + + "Cw/QIBARsBgZaoSlACBB1YxAJfjJb2jAAAAAElFTkSuQmCC"}, EDGE = {"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAEYklEQVR4Xu3UAQkAAAwCwdm/" - + "9HI83BLIOdw5AgQIRAQWySkmAQIEzmB5AgIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUp" - + "QAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGC" - + "w/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAg" - + "YyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOV" - + "qUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQ" - + "IGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfo" - + "AAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZA" - + "YOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OV" - + "oAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDB" - + "YfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQ" - + "IZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK" - + "1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJ" - + "EDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPw" - + "AAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMg" - + "IGK1OVoAQIGCw/QIBARsBgZaoSlACBB1YxAJfjJb2jAAAAAElFTkSuQmCC", - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAEYklEQVR4Xu3UAQkAAAwCwdm/9HI83BLIOdw" - + "5AgQIRAQWySkmAQIEzmB5AgIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQC" - + "AjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZ" - + "aoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgB" - + "AgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8" - + "gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARs" - + "BgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJ" - + "SgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQM" - + "lh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIB" - + "ARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwc" - + "pUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQA" - + "gQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/" - + "QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYy" - + "AwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqU" - + "pQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIG" - + "Cw/QIBARsBgZaoSlACBB1YxAJfjJb2jAAAAAElFTkSuQmCC"}) + + "9HI83BLIOdw5AgQIRAQWySkmAQIEzmB5AgIEMgIGK1OVoAQIGCw/Q" + + "IBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUp" + + "QAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYy" + + "AwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGC" + + "w/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqU" + + "pQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAg" + + "YyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGC" + + "w/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOV" + + "qUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAA" + + "gYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQ" + + "IGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYO" + + "VqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfo" + + "AAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoA" + + "QIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZA" + + "YOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYf" + + "oAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OV" + + "oAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZA" + + "YOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDB" + + "YfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVo" + + "AQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQ" + + "IZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJED" + + "BYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK" + + "1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAA" + + "QIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJ" + + "EDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK" + + "1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPw" + + "AAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKk" + + "EJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMg" + + "IGK1OVoAQIGCw/QIBARsBgZaoSlACBB1YxAJfjJb2jAAAAAElFTkSuQmCC", + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAA" + + "ABkW7XSAAAEYklEQVR4Xu3UAQkAAAwCwdm/9HI83BLIOdw" + + "5AgQIRAQWySkmAQIEzmB5AgIEMgIGK1OVoAQIGCw/QIBARsBgZao" + + "SlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQC" + + "AjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAg" + + "bLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZ" + + "aoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQ" + + "CAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgB" + + "AgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBg" + + "ZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8" + + "gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSg" + + "BAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARs" + + "BgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8" + + "gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJ" + + "SgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBAR" + + "sBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQM" + + "lh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpU" + + "JSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIB" + + "ARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQ" + + "Mlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwc" + + "pUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIB" + + "ARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQA" + + "gQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyA" + + "wcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/" + + "QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqU" + + "pQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYy" + + "AwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIG" + + "Cw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqU" + + "pQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAA" + + "gYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIG" + + "Cw/QIBARsBgZaoSlACBB1YxAJfjJb2jAAAAAElFTkSuQmCC"}) public void toDataUrl() throws Exception { final String html = "\n" @@ -174,9 +246,9 @@ public void toDataUrl() throws Exception { */ @Test @Alerts(DEFAULT = {"[object CanvasRenderingContext2D]", "[object WebGLRenderingContext]", - "[object WebGLRenderingContext]", "[object WebGL2RenderingContext]", "null", "null"}, + "[object WebGLRenderingContext]", "[object WebGL2RenderingContext]", "null", "null"}, IE = {"[object CanvasRenderingContext2D]", "null", - "[object WebGLRenderingContext]", "null", "null", "null"}) + "[object WebGLRenderingContext]", "null", "null", "null"}) @NotYetImplemented public void getContext() throws Exception { final String html = @@ -274,5 +346,4 @@ private void getWidth(final String value) throws Exception { + ""; loadPageWithAlerts2(html); } - } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection2Test.java index bf7c2d585..420f64028 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollectionTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollectionTest.java index ba634755d..be290c1d4 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollectionTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollectionTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -126,10 +126,10 @@ public void for_in() throws Exception { */ @Test @Alerts(DEFAULT = {"string 0", "string 1", "string 2", "string 3", "string 4", "string 5", - "string item", "string length", "string namedItem"}, + "string item", "string length", "string namedItem"}, IE = {"string 1", "string action", "string first_submit", "string item", - "string length", "string namedItem", "string second_submit", "string val1", - "string val2"}) + "string length", "string namedItem", "string second_submit", "string val1", + "string val2"}) @NotYetImplemented(IE) public void for_in2() throws Exception { final String html = "foo\n" + + " \n" + + " \n" + + "
                          \n" + + " Automated Status: Operational\n" + + "

                          Velocity: 12m/s

                          \n" + + "

                          Direction: North

                          \n" + + "
                          \n" + + " \n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test + @Alerts(DEFAULT = {"false", "null", "false", "null", "true", "", "true", "blah", "false", "null"}, + IE = {"undefined", "null", "", "null", "abc", "null", "abc", "blah", "abc", "null"}) + public void openString() throws Exception { + final String html = + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "
                          \n" + + " Automated Status: Operational\n" + + "

                          Velocity: 12m/s

                          \n" + + "

                          Direction: North

                          \n" + + "
                          \n" + + " \n" + + ""; + + loadPageVerifyTitle2(html); + } +} diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDirectoryElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDirectoryElementTest.java index c9f62528d..83d3de576 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDirectoryElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDirectoryElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -67,7 +67,7 @@ public void simpleScriptable() throws Exception { */ @Test @Alerts({"false", "true", "true", "true", "null", "", "blah", "2", - "true", "false", "true", "false", "", "null", "", "null"}) + "true", "false", "true", "false", "", "null", "", "null"}) public void compact() throws Exception { final String html = "\n" @@ -113,7 +113,7 @@ public void compact() throws Exception { */ @Test @Alerts(DEFAULT = {"undefined", "undefined", "undefined", "undefined", - "null", "", "blah", "A", "1", "a", "A", "i", "I", "u"}, + "null", "", "blah", "A", "1", "a", "A", "i", "I", "u"}, IE = {"", "", "", "A", "null", "", "blah", "A", "1", "a", "A", "i", "I", "exception", "I"}) @NotYetImplemented(IE) public void type() throws Exception { diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDivElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDivElementTest.java index df5932a29..5454677b9 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDivElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDivElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument2Test.java index 6de08c008..8255c25ee 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -261,12 +261,23 @@ public void cookie_read() throws Exception { @Test @Alerts({"false", "", "", ""}) public void cookie_write_cookiesDisabled() throws Exception { - final String html = HTMLDocumentTest.getCookieWriteHtmlCode(); + final String html = + "\n" + + "\n" + + "abc\n" + + ""; final WebClient client = getWebClientWithMockWebConnection(); client.getCookieManager().setCookiesEnabled(false); - loadPageWithAlerts(html); + loadPage(html); } /** diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument3Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument3Test.java index 96161d9d8..d4ec4df94 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument3Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocument3Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocumentTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocumentTest.java index 7e12c1c01..030bbeee6 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocumentTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocumentTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -87,13 +87,13 @@ public void scriptableToString() throws Exception { public void getElementsByTagName() throws Exception { final String html = "\n" + "\n" - + " Test\n" + " \n" + "\n" @@ -104,7 +104,7 @@ public void getElementsByTagName() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -114,23 +114,24 @@ public void getElementsByTagName() throws Exception { @Alerts({"function", "div1", "span2", "span3", "2", "1", "1", "0", "0", "0"}) public void getElementsByClassName() throws Exception { final String html - = "First\n" + "
                          hello\n" @@ -139,7 +140,7 @@ public void getElementsByClassName() throws Exception { + "bye\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -257,10 +258,10 @@ public void compatMode_xhtml_strict() throws Exception { private void compatMode(final String doctype) throws Exception { final String html = doctype + "\n" + "\n" - + " Test\n" + " \n" + "\n" @@ -268,7 +269,7 @@ private void compatMode(final String doctype) throws Exception { + "\n" + ""; - final WebDriver driver = loadPageWithAlerts2(html); + final WebDriver driver = loadPageVerifyTitle2(html); if (driver instanceof HtmlUnitDriver) { final WebWindow webWindow = getWebWindowOf((HtmlUnitDriver) driver); final HtmlPage page = (HtmlPage) webWindow.getEnclosedPage(); @@ -307,15 +308,15 @@ public void uniqueID() throws Exception { public void createDocumentNS() throws Exception { final String html = "\n" + "\n" - + "Test\n" + "\n" + "\n" @@ -323,7 +324,7 @@ public void createDocumentNS() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -584,11 +585,12 @@ public void identicalIDs() throws Exception { "\n" + " \n" + " \n" @@ -600,7 +602,7 @@ public void identicalIDs() throws Exception { + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -679,7 +681,7 @@ public void lastModifiedOnlyDate() throws Exception { responseHeaders.add(new NameValuePair("Date", "Fri, 16 Oct 2009 13:59:47 GMT")); expandExpectedAlertsVariables(DateUtils.formatDate(new Date()).substring(0, 17)); - final String html = "foo\n" + "" // no \n here! + bodyContent + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -873,16 +876,17 @@ public void frames() throws Exception { FF78 = {"undefined", "false"}) public void frameAccessByName() throws Exception { final String html = "\n" + "\n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -892,16 +896,17 @@ public void frameAccessByName() throws Exception { @Alerts({"0", "0"}) public void getElementsByName_notFound() throws Exception { final String html - = "Test\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -913,11 +918,12 @@ public void getElementsByName_notFound() throws Exception { FF78 = {"0", "0", "0"}) public void getElementsByName_emptyName() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + "
                          \n" @@ -926,7 +932,7 @@ public void getElementsByName_emptyName() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -936,44 +942,45 @@ public void getElementsByName_emptyName() throws Exception { @Alerts({"1", "2", "1", "2", "1", "2", "1", "2", "1", "2", "1", "2"}) public void getElementsByName_elements() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + "
                          \n" @@ -996,7 +1003,7 @@ public void getElementsByName_elements() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1007,14 +1014,15 @@ public void getElementsByName_elements() throws Exception { public void getElementsByName_frame() throws Exception { final String html = "\n" - + "foo\n" + "\n" @@ -1028,7 +1036,7 @@ public void getElementsByName_frame() throws Exception { + "frame"; getMockWebConnection().setDefaultResponse(frame); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1038,61 +1046,62 @@ public void getElementsByName_frame() throws Exception { @Alerts({"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "9"}) public void getElementsByName_changedAfterGet() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + " \n" @@ -1108,7 +1117,7 @@ public void getElementsByName_changedAfterGet() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1120,19 +1129,20 @@ public void getElementsByName_changedAfterGet() throws Exception { @Alerts({"1", "2"}) public void getElementsByName_changedAfterGet2() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1142,61 +1152,62 @@ public void getElementsByName_changedAfterGet2() throws Exception { @Alerts({"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "9"}) public void getElementsByName_changedAfterGet_nested() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + "
                          \n" @@ -1214,7 +1225,7 @@ public void getElementsByName_changedAfterGet_nested() throws Exception { + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1338,7 +1349,8 @@ public void queryCommandSupported_disctinct() throws Exception { private void queryCommandSupported(final String... commands) throws Exception { final String jsCommandArray = "['" + String.join("', '", commands) + "']"; - final String html = "Test\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1422,13 +1434,14 @@ public void querySelectorAll_badSelector() throws Exception { private void doTestQuerySelectorAll_badSelector(final String selector) throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1444,13 +1457,14 @@ public void querySelector_badSelector() throws Exception { private void doTestQuerySelector_badSelector(final String selector) throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1462,7 +1476,6 @@ private void doTestQuerySelector_badSelector(final String selector) throws Excep public void querySelectorAll_quirks() throws Exception { final String html = "\n" + "\n" - + "Test\n" + "\n" + "\n" + "\n" + "\n" @@ -1487,7 +1501,7 @@ public void querySelectorAll_quirks() throws Exception { + "
                          Fourth
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1553,9 +1567,10 @@ public void getElementsByTagName2() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" @@ -1564,7 +1579,7 @@ public void getElementsByTagName2() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1576,9 +1591,10 @@ public void getElementsByTagName3() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" @@ -1587,7 +1603,7 @@ public void getElementsByTagName3() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1615,23 +1631,21 @@ public void cookie_write_cookiesEnabled() throws Exception { // TODO [IE]SINGLE-VS-BULK test runs when executed as single but breaks as bulk shutDownRealIE(); - loadPageWithAlerts2(getCookieWriteHtmlCode()); - } - - static String getCookieWriteHtmlCode() { final String html = - "\n" - + "\n" - + "abc\n" - + ""; - return html; + "\n" + + "\n" + + "abc\n" + + ""; + + loadPageVerifyTitle2(html); } /** @@ -1646,21 +1660,22 @@ public void cookie_write2() throws Exception { "\n" + " \n" + " \n" + " \n" + " abc\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1673,17 +1688,18 @@ public void cookie_write_valueOnly() throws Exception { "\n" + " \n" + " \n" + " \n" + " abc\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1737,16 +1753,17 @@ public void createAttributeNameValue() throws Exception { final String html = "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1815,10 +1832,11 @@ public void getElementById_emptyParams() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" @@ -1829,7 +1847,7 @@ public void getElementById_emptyParams() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1857,22 +1875,23 @@ public void alinkColor() throws Exception { "\n" + " \n" + " \n" + " \n" + " blah\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1886,22 +1905,23 @@ public void linkColor() throws Exception { "\n" + " \n" + " \n" + " \n" + " blah\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1915,22 +1935,23 @@ public void vlinkColor() throws Exception { "\n" + " \n" + " \n" + " \n" + " blah\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1944,22 +1965,23 @@ public void fgColor() throws Exception { "\n" + " \n" + " \n" + " \n" + " blah\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1972,17 +1994,18 @@ public void getSelection() throws Exception { "\n" + " \n" + " \n" + " \n" + " blah\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1995,10 +2018,11 @@ public void document_xxx_formAccess() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" @@ -2008,7 +2032,7 @@ public void document_xxx_formAccess() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2021,17 +2045,18 @@ public void encoding() throws Exception { final String html = "\n" + "\n" + " \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2045,17 +2070,18 @@ public void encoding2() throws Exception { + "\n" + " \n" + " \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2069,11 +2095,12 @@ public void encoding3() throws Exception { + "\n" + " \n" + " \n" + "\n" @@ -2081,7 +2108,7 @@ public void encoding3() throws Exception { final String[] expectedAlerts = getExpectedAlerts(); final WebDriver driver = loadPage2(html, URL_FIRST, MimeType.TEXT_HTML, ISO_8859_1); - verifyAlerts(driver, expectedAlerts); + verifyTitle2(driver, expectedAlerts); } /** @@ -2095,11 +2122,12 @@ public void encoding4() throws Exception { + "\n" + " \n" + " \n" + "\n" @@ -2107,7 +2135,7 @@ public void encoding4() throws Exception { final String[] expectedAlerts = getExpectedAlerts(); final WebDriver driver = loadPage2(html, URL_FIRST, "text/html;charset=UTF-8", ISO_8859_1); - verifyAlerts(driver, expectedAlerts); + verifyTitle2(driver, expectedAlerts); } /** @@ -2121,11 +2149,12 @@ public void encoding5() throws Exception { + "\n" + " \n" + " \n" + "\n" @@ -2133,7 +2162,7 @@ public void encoding5() throws Exception { final String[] expectedAlerts = getExpectedAlerts(); final WebDriver driver = loadPage2(html, URL_FIRST, "text/html;charset=utf-8", ISO_8859_1); - verifyAlerts(driver, expectedAlerts); + verifyTitle2(driver, expectedAlerts); } /** @@ -2147,11 +2176,12 @@ public void encoding6() throws Exception { + "\n" + " \n" + " \n" + "\n" @@ -2160,7 +2190,7 @@ public void encoding6() throws Exception { final String[] expectedAlerts = getExpectedAlerts(); final WebDriver driver = loadPage2(html, URL_FIRST, MimeType.TEXT_HTML, UTF_8); - verifyAlerts(driver, expectedAlerts); + verifyTitle2(driver, expectedAlerts); } /** @@ -2327,11 +2357,12 @@ private void documentMode(final String doctype, final String meta) throws Except + "\n" + meta + " \n" + "\n" @@ -2339,7 +2370,7 @@ private void documentMode(final String doctype, final String meta) throws Except + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2427,6 +2458,7 @@ public void baseURI_noBaseTag() throws Exception { + "\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); final WebDriver driver = loadPageWithAlerts2(html); if (driver instanceof HtmlUnitDriver && !"undefined".equals(getExpectedAlerts()[0])) { final HtmlPage page = (HtmlPage) getWebWindowOf((HtmlUnitDriver) driver).getEnclosedPage(); @@ -2448,8 +2480,9 @@ public void baseURI_noBaseTag_urlPath() throws Exception { + "\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); final URL url = new URL(URL_FIRST.toString() + "details/abc"); - final WebDriver driver = loadPageWithAlerts2(html, url, DEFAULT_WAIT_TIME); + final WebDriver driver = loadPageWithAlerts2(html, url); if (driver instanceof HtmlUnitDriver && !"undefined".equals(getExpectedAlerts()[0])) { final HtmlPage page = (HtmlPage) getWebWindowOf((HtmlUnitDriver) driver).getEnclosedPage(); assertEquals(getExpectedAlerts()[0], page.getBaseURL().toString()); @@ -2470,8 +2503,9 @@ public void baseURI_noBaseTag_urlParams() throws Exception { + "\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); final URL url = new URL(URL_FIRST.toString() + "?x=y&z=zz"); - final WebDriver driver = loadPageWithAlerts2(html, url, DEFAULT_WAIT_TIME); + final WebDriver driver = loadPageWithAlerts2(html, url); if (driver instanceof HtmlUnitDriver && !"undefined".equals(getExpectedAlerts()[0])) { final HtmlPage page = (HtmlPage) getWebWindowOf((HtmlUnitDriver) driver).getEnclosedPage(); assertEquals(getExpectedAlerts()[0], page.getBaseURL().toString()); @@ -2493,7 +2527,8 @@ public void baseURI_noBaseTag_urlPathAndParams() throws Exception { + ""; final URL url = new URL(URL_FIRST.toString() + "details/abc;jsessionid=42?x=y&z=zz"); - final WebDriver driver = loadPageWithAlerts2(html, url, DEFAULT_WAIT_TIME); + expandExpectedAlertsVariables(URL_FIRST); + final WebDriver driver = loadPageWithAlerts2(html, url); if (driver instanceof HtmlUnitDriver && !"undefined".equals(getExpectedAlerts()[0])) { final HtmlPage page = (HtmlPage) getWebWindowOf((HtmlUnitDriver) driver).getEnclosedPage(); assertEquals(getExpectedAlerts()[0], page.getBaseURL().toString()); @@ -2554,6 +2589,7 @@ public void baseURI_withBaseTag_absolutePath() throws Exception { + "\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html, new URL("http://localhost:" + PORT + "/path/to/page.html")); } @@ -2574,6 +2610,7 @@ public void baseURI_withBaseTag_relativePath() throws Exception { + "\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html, new URL("http://localhost:" + PORT + "/path/to/page.html")); } @@ -2594,6 +2631,7 @@ public void baseURI_withBaseTag_relativePath_slash() throws Exception { + "\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html, new URL("http://localhost:" + PORT + "/path/to/page.html")); } @@ -2614,6 +2652,7 @@ public void baseURI_withBaseTag_relativePath_parent() throws Exception { + "\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html, new URL("http://localhost:" + PORT + "/path/to/page.html")); } @@ -2634,6 +2673,7 @@ public void baseURI_withBaseTag_relativePath_strange() throws Exception { + "\n" + ""; + expandExpectedAlertsVariables(URL_FIRST); loadPageWithAlerts2(html, new URL("http://localhost:" + PORT + "/path/to/page.html")); } @@ -2765,11 +2805,12 @@ public void plugins() throws Exception { final String html = "" + "\n" + "\n" + "\n" @@ -2777,7 +2818,7 @@ public void plugins() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2790,10 +2831,11 @@ public void images() throws Exception { final String html = "" + "\n" + "\n" + "\n" @@ -2801,7 +2843,7 @@ public void images() throws Exception { + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocumentWrite2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocumentWrite2Test.java index 12123397b..58e00e0ac 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocumentWrite2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocumentWrite2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocumentWriteTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocumentWriteTest.java index 4f0039336..cc00a9051 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocumentWriteTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDocumentWriteTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement2Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement2Test.java index 521479117..2a0457734 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement2Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement2Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,6 +27,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; import com.gargoylesoftware.htmlunit.WebDriverTestCase; import com.gargoylesoftware.htmlunit.html.HtmlPageTest; @@ -50,15 +51,16 @@ public class HTMLElement2Test extends WebDriverTestCase { public void scopeName() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -69,22 +71,23 @@ public void scopeName() throws Exception { public void scopeName2() throws Exception { final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -96,23 +99,22 @@ public void scopeName2() throws Exception { @Alerts({"number", "number", "number", "number", "number", "number", "number", "number"}) public void offsets() throws Exception { final String html = "\n" - + "\n" - + " Test\n" - + "\n" + + "\n" + "\n" + "
                          \n" + "
                          foo
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -125,9 +127,10 @@ public void offsetWidth_withEvent() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -147,7 +150,7 @@ public void offsetWidth_withEvent() throws Exception { + "
                          \n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -160,12 +163,13 @@ public void offsetWidth_spanWithDifferentFontSize() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -173,7 +177,7 @@ public void offsetWidth_spanWithDifferentFontSize() throws Exception { + " 1234567890\n" + " 1234567890\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -187,12 +191,13 @@ public void offsetWidth_spanWithDifferentFonts() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -200,7 +205,7 @@ public void offsetWidth_spanWithDifferentFonts() throws Exception { + " 1234567890\n" + " 1234567890\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -213,10 +218,11 @@ public void offsetTopAndLeft_Padding() throws Exception { "\n" + " \n" + " \n" + " \n" @@ -228,7 +234,7 @@ public void offsetTopAndLeft_Padding() throws Exception { + "
                          \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -241,10 +247,11 @@ public void offsetTopAndLeft_Margins() throws Exception { "\n" + " \n" + " \n" + " \n" @@ -256,7 +263,7 @@ public void offsetTopAndLeft_Margins() throws Exception { + "
                          \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -272,10 +279,11 @@ public void offsetTopAndLeft_Borders() throws Exception { "\n" + " \n" + " \n" + " \n" @@ -287,7 +295,7 @@ public void offsetTopAndLeft_Borders() throws Exception { + "
                          \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -300,10 +308,11 @@ public void offsetTopAndLeft_Nothing() throws Exception { "\n" + " \n" + " \n" + " \n" @@ -315,7 +324,7 @@ public void offsetTopAndLeft_Nothing() throws Exception { + "
                          \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -328,10 +337,11 @@ public void offsetTopAndLeft_AbsolutelyPositioned() throws Exception { "\n" + " \n" + " \n" + " \n" @@ -343,7 +353,7 @@ public void offsetTopAndLeft_AbsolutelyPositioned() throws Exception { + "
                          \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -356,6 +366,7 @@ public void offsetTopAndLeft_AbsolutelyPositioned() throws Exception { "13 inherit_auto 0", "14 inherit_length 50", "15 inherit_inherit 10"}) public void offsetLeft_PositionLeft_DifferentCombinations() throws Exception { final String html = "\n" @@ -393,7 +404,7 @@ public void offsetLeft_PositionLeft_DifferentCombinations() throws Exception { + "
                          15
                          \n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -406,10 +417,11 @@ public void offsetTopAndLeft_parentAbsolute() throws Exception { "\n" + "\n" + "\n" + "\n" @@ -417,7 +429,7 @@ public void offsetTopAndLeft_parentAbsolute() throws Exception { + "
                          \n" + "
                          TEST
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -431,33 +443,34 @@ public void offsetTopAndLeft_parentAbsolute() throws Exception { @Test @Alerts(DEFAULT = {"true", "true", "2", "3", "4", "5", "6", "7", "8", "9", "99", "199", "5999"}, IE = {"true", "true", "2.0555555555555553", "3.0555555555555553", - "4.111111111111111", "5.111111111111111", "6.111111111111111", - "7.166666666666667", "8.166666666666666", "9.222222222222221", - "101.22222222222223", "203.44444444444446", "6132.333333333333"}) + "4.111111111111111", "5.111111111111111", "6.111111111111111", + "7.166666666666667", "8.166666666666666", "9.222222222222221", + "101.22222222222223", "203.44444444444446", "6132.333333333333"}) @NotYetImplemented(IE) public void offsetTopWithPreviousSiblings() throws Exception { String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ + "\n" + "\n" + "\n" @@ -468,7 +481,7 @@ public void offsetTopWithPreviousSiblings() throws Exception { html = html + "\n" + ""; - loadPageWithAlerts2(html, 8 * DEFAULT_WAIT_TIME); + loadPageVerifyTitle2(html); } /** @@ -496,6 +509,7 @@ public void offsetTopAndLeftWhenParentIsBody() throws Exception { public void offsetTopAndLeftWithRelativePosition() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -528,29 +542,30 @@ public void offsetWidthAndHeight() throws Exception { + ".hideMe { visibility: hidden }\n" + "\n" + "\n" + "\n" + "\n" + "
                          hello
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -563,10 +578,12 @@ public void offsetWidthAndHeight_displayNoneAndChildren() throws Exception { final String html = "\n" + "\n" - + "\n" - + "\n" + + "\n" + + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -579,10 +596,12 @@ public void offsetHeight_explicitHeightZero() throws Exception { final String html = "\n" + "
                          x
                          \n" - + "\n" - + "\n" + + "\n" + + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -601,10 +620,12 @@ public void offsetHeight_calculatedBasedOnChildren() throws Exception { + "
                          x
                          \n" + "
                          x
                          \n" + "
                          \n" - + " \n" + + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -615,12 +636,13 @@ public void offsetHeight_calculatedBasedOnChildren() throws Exception { public void offsetHeight_takeFontSizeIntoAccount() throws Exception { final String html = "\n" + "\n" + "\n" @@ -628,7 +650,7 @@ public void offsetHeight_takeFontSizeIntoAccount() throws Exception { + "
                          something
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -643,11 +665,12 @@ public void offsetWidth_calculatedBasedOnPage() throws Exception { + "
                          hello
                          \n" + "
                          hello
                          \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -662,10 +685,12 @@ public void offsetWidth_parentWidthConstrainsChildWidth() throws Exception { + "\n" + "\n" + "
                          foo
                          \n" - + "\n" + + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -680,10 +705,12 @@ public void offsetWidth_parentWidthConstrainsChildWidth2() throws Exception { + "\n" + "\n" + "
                          foo
                          \n" - + "\n" + + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -700,17 +727,18 @@ public void offsetWidth_cssFloat_rightOrLeft() throws Exception { + "
                          hello
                          hellohello
                          \n" + "
                          hello
                          hellohello
                          \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -721,13 +749,14 @@ public void offsetWidth_cssFloat_rightOrLeft() throws Exception { public void offsetWidth_takeContentIntoAccount() throws Exception { final String html = "\n" + "\n" + "\n" @@ -737,7 +766,7 @@ public void offsetWidth_takeContentIntoAccount() throws Exception { + " loooooooooong\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -748,12 +777,13 @@ public void offsetWidth_takeContentIntoAccount() throws Exception { public void offsetWidth_takeFontSizeIntoAccount() throws Exception { final String html = "\n" + "\n" + "\n" @@ -761,7 +791,7 @@ public void offsetWidth_takeFontSizeIntoAccount() throws Exception { + " something\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -772,6 +802,7 @@ public void offsetWidth_takeFontSizeIntoAccount() throws Exception { public void textContent_null() throws Exception { final String html = "\n" + "\n" + "\n" @@ -789,7 +820,7 @@ public void textContent_null() throws Exception { + "
                          something
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -800,6 +831,7 @@ public void textContent_null() throws Exception { public void textContent_emptyString() throws Exception { final String html = "\n" + "\n" + "\n" @@ -817,7 +849,107 @@ public void textContent_emptyString() throws Exception { + "
                          something
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"something", "Hello World"}) + public void innerText() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "\n" + + "
                          something
                          \n" + + ""; + + loadPageVerifyTitle2(html); + } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"something", "3", "Hello", "[object HTMLBRElement]", "World"}) + public void innerText_LineBreak() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "\n" + + "
                          something
                          \n" + + ""; + + loadPageVerifyTitle2(html); + } + + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"0", "1", " ", "0", "1", "undefined", "1", "[object Object]"}, + IE = {"0", "1", "\u00A0", "1", "1", "undefined", "1", "[object Object]"}) + @HtmlUnitNYI(IE = {"0", "1", " ", "1", "1", "undefined", "1", "[object Object]"}) + public void innerText_Empty() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "\n" + + "
                          something
                          \n" + + "
                          something
                          \n" + + "
                          something
                          \n" + + "
                          something
                          \n" + + "
                          something
                          \n" + + ""; + + loadPageVerifyTitle2(html); } /** @@ -829,20 +961,17 @@ public void textContent_emptyString() throws Exception { public void innerText_null() throws Exception { final String html = "\n" + "\n" + "\n" @@ -850,7 +979,7 @@ public void innerText_null() throws Exception { + "
                          something
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -861,20 +990,17 @@ public void innerText_null() throws Exception { public void innerText_emptyString() throws Exception { final String html = "\n" + "\n" + "\n" @@ -882,7 +1008,7 @@ public void innerText_emptyString() throws Exception { + "
                          something
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -953,16 +1079,17 @@ private void events(final String type) throws Exception { public void setAttributeNodeUnknown() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -973,16 +1100,17 @@ public void setAttributeNodeUnknown() throws Exception { public void setAttributeNodeUnknown2() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -993,16 +1121,17 @@ public void setAttributeNodeUnknown2() throws Exception { public void setAttributeNodeClass() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1013,16 +1142,17 @@ public void setAttributeNodeClass() throws Exception { public void setAttributeNodeClass2() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1034,21 +1164,22 @@ public void removeAttributeNode() throws Exception { final String html = "\n" + "\n" + "\n" + "
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1057,17 +1188,18 @@ public void removeAttributeNode() throws Exception { @Test @Alerts({"3", "div1"}) public void querySelectorAll() throws Exception { - final String html = "Test\n" + final String html = "\n" + "\n" + "\n" + "
                          First
                          \n" @@ -1076,7 +1208,7 @@ public void querySelectorAll() throws Exception { + "
                          Fourth
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1085,20 +1217,21 @@ public void querySelectorAll() throws Exception { @Test @Alerts({"1", "p1"}) public void querySelectorAllOnDisconnectedElement() throws Exception { - final String html = "Test\n" + final String html = "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1121,13 +1254,14 @@ public void querySelectorAll_badSelector() throws Exception { private void doTestQuerySelectorAll_badSelector(final String selector) throws Exception { final String html = "
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1143,13 +1277,14 @@ public void querySelector_badSelector() throws Exception { private void doTestQuerySelector_badSelector(final String selector) throws Exception { final String html = "
                          "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1162,11 +1297,12 @@ public void querySelectorAll_noDuplication() throws Exception { final String html = "\n" + "
                          First
                          \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1180,7 +1316,6 @@ public void querySelectorAll_noDuplication() throws Exception { public void getSetInnerHTMLComplex() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -1279,7 +1413,7 @@ public void dispatchEvent2() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1291,7 +1425,9 @@ public void dispatchEvent2() throws Exception { public void offsetLeft_PositionFixed() throws Exception { final String html = "\n" + "\n" - + " Box-Example\n" + + " \n" + " \n" + "\n" - + " 0)\">\n" + + " 0)\">\n" + "
                          \n" + "
                            \n" + "
                          • 1st List Item.
                          • \n" @@ -1311,7 +1447,7 @@ public void offsetLeft_PositionFixed() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1323,28 +1459,28 @@ public void fireEvent_WithoutTemplate() throws Exception { final String html = "\n" + " \n" - + " Test\n" + " \n" + " \n" + "\n" - + "
                            foo
                            \n" + + "
                            foo
                            \n" + "
                            bar
                            \n" + ""; final WebDriver driver = loadPage2(html); driver.findElement(By.id("a")).click(); - verifyAlerts(driver, getExpectedAlerts()[0]); + verifyTitle2(driver, getExpectedAlerts()[0]); final Actions actions = new Actions(driver); actions.moveToElement(driver.findElement(By.id("b"))); actions.perform(); - verifyAlerts(driver, getExpectedAlerts()[1]); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -1356,22 +1492,21 @@ public void fireEvent_WithTemplate() throws Exception { final String html = "\n" + " \n" - + " Test\n" + " \n" + " \n" + "\n" - + "
                            foo
                            \n" + + "
                            foo
                            \n" + "
                            bar
                            \n" + "
                            baz
                            \n" + ""; final WebDriver driver = loadPage2(html); driver.findElement(By.id("a")).click(); - verifyAlerts(driver, getExpectedAlerts()[0]); + verifyTitle2(driver, getExpectedAlerts()[0]); + driver.findElement(By.id("b")).click(); - verifyAlerts(driver, getExpectedAlerts()[1]); + verifyTitle2(driver, getExpectedAlerts()[0], getExpectedAlerts()[1]); + driver.findElement(By.id("c")).click(); - verifyAlerts(driver, getExpectedAlerts()[2]); + verifyTitle2(driver, getExpectedAlerts()); } /** @@ -1418,7 +1555,7 @@ public void setInnerHTMLDocumentWrite() throws Exception { @Test @Alerts(DEFAULT = {"First: body1", "Second:", "Second: body1 setActive not available"}, IE = {"First: body1", "Second:", - "Second: body1 text1 [object HTMLButtonElement] text2 [object Window] onfocus text2"}) + "Second: body1 text1 [object HTMLButtonElement] text2 [object Window] onfocus text2"}) // alert conflicts with focus/blur @NotYetImplemented(IE) public void setActiveAndFocus() throws Exception { @@ -1484,7 +1621,7 @@ public void setActiveAndFocus() throws Exception { */ @Test @Alerts({"DIV,DIV,http://www.w3.org/1999/xhtml,null,div", "svg,svg,http://www.w3.org/2000/svg,null,svg", - "g,g,http://www.w3.org/2000/svg,null,g", "svg,svg,http://www.w3.org/2000/svg,null,svg"}) + "g,g,http://www.w3.org/2000/svg,null,g", "svg,svg,http://www.w3.org/2000/svg,null,svg"}) public void variousNames() throws Exception { final String html = "\n" + "\n" + "\n" + "\n" @@ -1512,7 +1650,7 @@ public void variousNames() throws Exception { + " \n" + "\n"; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1649,14 +1787,15 @@ private void eventHandlerSetterGetterTest(final String eventName) throws Excepti final String html = "\n" + "\n" + "\n" @@ -1666,7 +1805,7 @@ private void eventHandlerSetterGetterTest(final String eventName) throws Excepti + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } } diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement3Test.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement3Test.java index e8f99db64..746624750 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement3Test.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement3Test.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java index ed251fd76..978e0821c 100644 --- a/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java +++ b/src/test-hu/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElementTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -14,8 +14,6 @@ */ package com.gargoylesoftware.htmlunit.javascript.host.html; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.CHROME; -import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.EDGE; import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF; import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF78; import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE; @@ -30,6 +28,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.HtmlUnitNYI; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; import com.gargoylesoftware.htmlunit.WebDriverTestCase; import com.gargoylesoftware.htmlunit.html.HtmlPageTest; @@ -60,10 +59,11 @@ public class HTMLElementTest extends WebDriverTestCase { */ @Test @Alerts({"all is not supported", "all is not supported", - "all is not supported", "all is not supported", "all is not supported"}) + "all is not supported", "all is not supported", "all is not supported"}) public void all_IndexByInt() throws Exception { final String html = "\n" + "\n" @@ -93,7 +93,7 @@ public void all_IndexByInt() throws Exception { getMockWebConnection().setDefaultResponse("Error: not found", 404, "Not Found", MimeType.TEXT_HTML); - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -106,22 +106,29 @@ public void getAttribute() throws Exception { + "\n" + " test\n" + " \n" + "\n" + "\n" - + "

                            \n" - + "

                            \n" + + "

                            \n" + + " \n" + "\n" + ""; - final WebDriver driver = loadPageWithAlerts2(html); + final WebDriver driver = loadPage2(html); + + final WebElement textArea = driver.findElement(By.id("myTextArea")); + assertEquals(String.join("; ", getExpectedAlerts()) + "; ", textArea.getAttribute("value")); assertTitle(driver, "test"); } @@ -131,17 +138,18 @@ public void getAttribute() throws Exception { @Test @Alerts("null") public void getAttribute_styleAttribute() throws Exception { - final String html = "foo\n" + "\n" + "
                            tester
                            \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -153,13 +161,14 @@ public void getAttribute_styleAttributeWithFlag() throws Exception { final String html = "
                            abc
                            \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -173,14 +182,14 @@ public void getAttribute_styleAttributeWithFlag() throws Exception { public void attributes() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -189,7 +198,7 @@ public void attributes() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -201,14 +210,14 @@ public void attributes() throws Exception { public void getSetAttributeNS() throws Exception { final String html = "\n" + "\n" - + "test\n" + "\n" + "\n" @@ -218,7 +227,7 @@ public void getSetAttributeNS() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -233,21 +242,24 @@ public void getSetAttributeNS() throws Exception { public void attributesAccess() throws Exception { final String html = "\n" + + " \n" + "\n" + "\n" - + " \n" + + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -258,16 +270,16 @@ public void attributesAccess() throws Exception { public void setAttribute() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -277,8 +289,7 @@ public void setAttribute() throws Exception { + "\n" + ""; - final WebDriver driver = loadPageWithAlerts2(html); - assertTitle(driver, "test"); + loadPageVerifyTitle2(html); } /** @@ -288,64 +299,60 @@ public void setAttribute() throws Exception { * @throws Exception on test failure */ @Test - @Alerts(DEFAULT = { - "null", - "expando=undefined", - "firstChild=null", - "lastChild=null", - "name=custom_attribute", - "nextSibling=null", - "nodeName=custom_attribute", - "nodeType=2", - "nodeValue=bleh", - "(ownerDocument == document) = true", - "parentNode=null", - "previousSibling=null", - "specified=true", - "value=bleh" - }, - IE = { - "null", - "expando=true", - "firstChild=[object Text]", - "lastChild=[object Text]", - "name=custom_attribute", - "nextSibling=null", - "nodeName=custom_attribute", - "nodeType=2", - "nodeValue=bleh", - "(ownerDocument == document) = true", - "parentNode=null", - "previousSibling=null", - "specified=true", - "value=bleh" - }) + @Alerts(DEFAULT = {"null", + "expando=undefined", + "firstChild=null", + "lastChild=null", + "name=custom_attribute", + "nextSibling=null", + "nodeName=custom_attribute", + "nodeType=2", + "nodeValue=bleh", + "(ownerDocument == document) = true", + "parentNode=null", + "previousSibling=null", + "specified=true", + "value=bleh"}, + IE = {"null", + "expando=true", + "firstChild=[object Text]", + "lastChild=[object Text]", + "name=custom_attribute", + "nextSibling=null", + "nodeName=custom_attribute", + "nodeType=2", + "nodeValue=bleh", + "(ownerDocument == document) = true", + "parentNode=null", + "previousSibling=null", + "specified=true", + "value=bleh"}) public void getAttributeNode() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -356,8 +363,7 @@ public void getAttributeNode() throws Exception { + "\n" + ""; - final WebDriver driver = loadPageWithAlerts2(html); - assertTitle(driver, "test"); + loadPageVerifyTitle2(html); } /** @@ -412,6 +418,10 @@ public void setAttribute_eventHandler() throws Exception { @NotYetImplemented(IE) public void setAttribute_eventHandlerNull() throws Exception { final String html = "\n" + "\n" + "
                            \n" + " \n" + "
                            \n" + + " \n" + ""; - final WebDriver driver = loadPageWithAlerts2(html); + final WebDriver driver = loadPage2(html); + + final WebElement textArea = driver.findElement(By.id("myTextArea")); + assertEquals(String.join("; ", getExpectedAlerts()) + "; ", textArea.getAttribute("value")); driver.findElement(By.id("login")).click(); assertTitle(driver, ""); @@ -447,6 +461,10 @@ public void setAttribute_eventHandlerNull() throws Exception { @Alerts({"null", "inform('newHandler')", ""}) public void setAttribute_eventHandlerEmptyString() throws Exception { final String html = "\n" + "\n" + "
                            \n" + " \n" + "
                            \n" + + " \n" + ""; - final WebDriver driver = loadPageWithAlerts2(html); + final WebDriver driver = loadPage2(html); + + final WebElement textArea = driver.findElement(By.id("myTextArea")); + assertEquals(String.join("; ", getExpectedAlerts()) + "; ", textArea.getAttribute("value")); driver.findElement(By.id("login")).click(); assertTitle(driver, ""); @@ -482,6 +504,10 @@ public void setAttribute_eventHandlerEmptyString() throws Exception { @Alerts({"null", "inform('newHandler')", "undefined"}) public void setAttribute_eventHandlerUndefined() throws Exception { final String html = "\n" + "\n" + "
                            \n" + " \n" + "
                            \n" + + " \n" + ""; - final WebDriver driver = loadPageWithAlerts2(html); + final WebDriver driver = loadPage2(html); + + final WebElement textArea = driver.findElement(By.id("myTextArea")); + assertEquals(String.join("; ", getExpectedAlerts()) + "; ", textArea.getAttribute("value")); driver.findElement(By.id("login")).click(); assertTitle(driver, ""); @@ -555,16 +585,17 @@ public void setAttribute_eventHandlerEventArgument() throws Exception { @Test @Alerts({"inform(\"onclick\")", "inform('newHandler')", "newHandler"}) public void getAttribute_eventHandler() throws Exception { - final String html = "foo\n" + "\n" @@ -576,10 +607,10 @@ public void getAttribute_eventHandler() throws Exception { final String[] alerts = getExpectedAlerts(); final WebDriver webDriver = loadPage2(html); - verifyAlerts(webDriver, alerts[0], alerts[1]); + verifyTitle2(webDriver, alerts[0], alerts[1]); webDriver.findElement(By.id("login")).click(); - verifyAlerts(webDriver, alerts[2]); + verifyTitle2(webDriver, alerts); } /** @@ -591,20 +622,20 @@ public void setAttributeNode() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -612,8 +643,8 @@ public void setAttributeNode() throws Exception { + "
                            \n" + "\n" + ""; - final WebDriver driver = loadPageWithAlerts2(html); - assertTitle(driver, "test"); + + loadPageVerifyTitle2(html); } /** @@ -624,14 +655,15 @@ public void setAttributeNode() throws Exception { @Alerts({"all = 4", "row = 2", "by wrong name: 0"}) public void getElementsByTagName() throws Exception { final String html - = "First\n" + "\n" @@ -639,7 +671,7 @@ public void getElementsByTagName() throws Exception { + "\n" + "
                            34
                            \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -648,11 +680,12 @@ public void getElementsByTagName() throws Exception { @Test @Alerts({"div1", "div2"}) public void getElementsByTagName2() throws Exception { - final String html = "foo\n" + "
                            \n" @@ -661,7 +694,7 @@ public void getElementsByTagName2() throws Exception { + "
                            \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -675,12 +708,13 @@ public void getElementsByTagNameCollection() throws Exception { final String html = "\n" + "\n" + "\n" @@ -691,7 +725,7 @@ public void getElementsByTagNameCollection() throws Exception { + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -703,14 +737,15 @@ public void getElementsByTagNameCollection() throws Exception { @Alerts({"8", "3"}) public void getElementsByTagNameAsterisk() throws Exception { final String html = "\n" + "

                            a

                            b

                            c

                            \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -721,14 +756,15 @@ public void getElementsByTagNameAsterisk() throws Exception { public void getElementsByTagNameEquality() throws Exception { final String html = "
                            "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -741,16 +777,17 @@ public void getClassName() throws Exception { final String html = "\n" + "\n" + "

                            text

                            \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -763,19 +800,23 @@ public void getClassNameWhitespace() throws Exception { final String html = "\n" + "\n" + "\n" @@ -785,9 +826,13 @@ public void getClassNameWhitespace() throws Exception { + "

                            text

                            \n" + "

                            text

                            \n" + "

                            text

                            \n" + + " \n" + ""; - loadPageWithAlerts2(html); + final WebDriver driver = loadPage2(html); + + final WebElement textArea = driver.findElement(By.id("myTextArea")); + assertEquals(String.join("; ", getExpectedAlerts()) + "; ", textArea.getAttribute("value")); } /** @@ -800,17 +845,18 @@ public void setClassName() throws Exception { final String html = "\n" + "\n" + "

                            text

                            \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -821,12 +867,12 @@ public void setClassName() throws Exception { public void getInnerHTML() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + " \n" + "\n" @@ -834,7 +880,7 @@ public void getInnerHTML() throws Exception { + "
                            \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -851,17 +897,17 @@ public void getInnerHTML_EmptyAttributes() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"Old = Old innerHTML", "New = New cell value"}) + @Alerts({"Old#=#Old#innerHTML", "New#=#New##cell#value"}) public void getSetInnerHTMLSimple_FF() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -869,7 +915,7 @@ public void getSetInnerHTMLSimple_FF() throws Exception { + "

                            Old innerHTML

                            \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -881,12 +927,12 @@ public void getSetInnerHTMLSimple_FF() throws Exception { public void getSetInnerHTMLNewInput() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -894,25 +940,25 @@ public void getSetInnerHTMLNewInput() throws Exception { + "
                            \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** * @throws Exception if the test fails */ @Test - @Alerts({"Old = Old innerHTML", - "New = New cell value & \u0110 \u0110"}) + @Alerts({"Old#=#Old#innerHTML", + "New#=#New##cell#value#&#\u0110#\u0110"}) public void getSetInnerHTMLChar_FF() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -920,7 +966,7 @@ public void getSetInnerHTMLChar_FF() throws Exception { + "

                            Old innerHTML

                            \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -929,19 +975,20 @@ public void getSetInnerHTMLChar_FF() throws Exception { @Test public void setInnerHTMLExecuteJavaScript() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + "
                            \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -950,19 +997,20 @@ public void setInnerHTMLExecuteJavaScript() throws Exception { @Test public void setInnerHTMLExecuteNestedJavaScript() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + "
                            \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -972,22 +1020,23 @@ public void setInnerHTMLExecuteNestedJavaScript() throws Exception { @Alerts("exception") public void setInnerHTMLDeclareJavaScript() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + "
                            \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -998,16 +1047,17 @@ public void setInnerHTMLDeclareJavaScript() throws Exception { @Alerts({"true", "true", "true"}) public void outerHTMLinNewDiv() throws Exception { final String html = "\n" + "
                            \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1018,16 +1068,17 @@ public void outerHTMLinNewDiv() throws Exception { @Alerts({"
                              ", "
                                ", ""}) public void getSetInnerHtmlEmptyTag_FF() throws Exception { final String html = "\n" + "
                                  " + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1038,16 +1089,17 @@ public void getSetInnerHtmlEmptyTag_FF() throws Exception { @Alerts({"
                                  ", "", ""}) public void getSetInnerHtmlAttributeWithWhitespace_FF() throws Exception { final String html = "\n" + "
                                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1060,11 +1112,12 @@ public void setInnerHTMLEmpty() throws Exception { final String html = "\n" + "
                                  foo
                                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1078,12 +1131,13 @@ public void setInnerHTMLNull() throws Exception { final String html = "\n" + "
                                  foo
                                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1097,13 +1151,14 @@ public void setInnerHTMLResetsStyle() throws Exception { + "\n" + "
                                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1114,7 +1169,7 @@ public void setInnerHTMLResetsStyle() throws Exception { @Alerts("Outer =
                                  New cell value
                                  ") public void getOuterHTMLFromBlock() throws Exception { final String html = createPageForGetOuterHTML("div", "New cell value", false); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -1125,7 +1180,7 @@ public void getOuterHTMLFromBlock() throws Exception { @Alerts("Outer = New cell value") public void getOuterHTMLFromInline() throws Exception { final String html = createPageForGetOuterHTML("span", "New cell value", false); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -1136,7 +1191,7 @@ public void getOuterHTMLFromInline() throws Exception { @Alerts("Outer =
                                  ") public void getOuterHTMLFromEmpty() throws Exception { final String html = createPageForGetOuterHTML("br", "", true); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -1145,27 +1200,30 @@ public void getOuterHTMLFromEmpty() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = "Outer =

                                  New cell value\n\n

                                  ", - IE = "Outer =

                                  New cell value\n\n") + @Alerts(DEFAULT = "Outer =

                                  New cell value\n" + + " \n\n

                                  ", + IE = "Outer =

                                  New cell value\n" + + " \n\n") @NotYetImplemented public void getOuterHTMLFromUnclosedParagraph() throws Exception { final String html = createPageForGetOuterHTML("p", "New cell value", true); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } private static String createPageForGetOuterHTML(final String nodeTag, final String value, final boolean unclosed) { return "\n" + "\n" - + " test\n" + " \n" + "\n" + "\n" + " <" + nodeTag + " id='myNode'>" + value + (unclosed ? "" : "") + "\n" + + LOG_TEXTAREA + "\n" + ""; } @@ -1179,7 +1237,7 @@ private static String createPageForGetOuterHTML(final String nodeTag, final Stri IE = {"Old = Old outerHTML", "New = null", "Children: 1"}) public void setOuterHTMLNull() throws Exception { final String html = createPageForSetOuterHTML("div", null); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -1190,7 +1248,7 @@ public void setOuterHTMLNull() throws Exception { @Alerts({"Old = Old outerHTML", "New = undefined", "Children: 1"}) public void setOuterHTMLUndefined() throws Exception { final String html = createPageForSetOuterHTML("div", "undefined"); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -1201,7 +1259,7 @@ public void setOuterHTMLUndefined() throws Exception { @Alerts({"Old = Old outerHTML", "New = ", "Children: 0"}) public void setOuterHTMLEmpty() throws Exception { final String html = createPageForSetOuterHTML("div", ""); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -1212,7 +1270,7 @@ public void setOuterHTMLEmpty() throws Exception { @Alerts({"Old = Old outerHTML", "New = ", "Children: 1"}) public void setOuterHTMLBlank() throws Exception { final String html = createPageForSetOuterHTML("div", " "); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -1223,7 +1281,7 @@ public void setOuterHTMLBlank() throws Exception { @Alerts({"Old = Old outerHTML", "New = New cell value", "Children: 1"}) public void setOuterHTMLAddTextToBlock() throws Exception { final String html = createPageForSetOuterHTML("div", "New cell value"); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -1234,7 +1292,7 @@ public void setOuterHTMLAddTextToBlock() throws Exception { @Alerts({"Old = Old outerHTML", "New = New cell value", "Children: 1"}) public void setOuterHTMLAddTextToInline() throws Exception { final String html = createPageForSetOuterHTML("span", "New cell value"); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -1245,7 +1303,7 @@ public void setOuterHTMLAddTextToInline() throws Exception { @Alerts({"Old = Old outerHTML", "New =

                                  test
                                  ", "Children: 1"}) public void setOuterHTMLAddBlockToBlock() throws Exception { final String html = createPageForSetOuterHTML("div", "
                                  test
                                  "); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -1256,7 +1314,7 @@ public void setOuterHTMLAddBlockToBlock() throws Exception { @Alerts({"Old = Old outerHTML", "New =
                                  test
                                  ", "Children: 1"}) public void setOuterHTMLAddBlockToInline() throws Exception { final String html = createPageForSetOuterHTML("span", "
                                  test
                                  "); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -1267,7 +1325,7 @@ public void setOuterHTMLAddBlockToInline() throws Exception { @Alerts({"Old = Old outerHTML", "New = test", "Children: 1"}) public void setOuterHTMLAddInlineToInline() throws Exception { final String html = createPageForSetOuterHTML("span", "test"); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -1278,7 +1336,7 @@ public void setOuterHTMLAddInlineToInline() throws Exception { @Alerts({"Old = Old outerHTML", "New = test", "Children: 1"}) public void setOuterHTMLAddInlineToBlock() throws Exception { final String html = createPageForSetOuterHTML("div", "test"); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -1289,7 +1347,7 @@ public void setOuterHTMLAddInlineToBlock() throws Exception { @Alerts({"Old = Old outerHTML", "New =
                                  ", "Children: 1"}) public void setOuterHTMLAddEmpty() throws Exception { final String html = createPageForSetOuterHTML("div", "
                                  "); - loadPageWithAlerts2(html); + loadPageVerifyTextArea2(html); } /** @@ -1300,8 +1358,7 @@ public void setOuterHTMLAddEmpty() throws Exception { @Alerts({"-0", "1", "2", "3", "-4", "5", "6", "7", "8", "9", "10", "11"}) public void setOuterHTMLToReadOnly() throws Exception { final String html = "\n" - + "\n" - + " test\n" + + "n" + " \n" + "\n" + "\n" + " <" + nodeTag + " id='myNode'>Old outerHTML\n" + + LOG_TEXTAREA + "\n" + ""; } @@ -1462,24 +1520,24 @@ else if (newValue != null) { */ @Test @Alerts(DEFAULT = {"Old = Old outerHTML", - "New = Old outerHTML", "Children: 1"}, + "New = Old outerHTML", "Children: 1"}, CHROME = {"Old = Old outerHTML", "exception"}, EDGE = {"Old = Old outerHTML", "exception"}, IE = {"Old = Old outerHTML", "New = ", "Children: 0"}) public void setOuterHTMLDetachedElementNull() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -1487,7 +1545,7 @@ public void setOuterHTMLDetachedElementNull() throws Exception { + "
                                  Old outerHTML
                                  \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1496,24 +1554,24 @@ public void setOuterHTMLDetachedElementNull() throws Exception { */ @Test @Alerts(DEFAULT = {"Old = Old outerHTML", - "New = Old outerHTML", "Children: 1"}, + "New = Old outerHTML", "Children: 1"}, CHROME = {"Old = Old outerHTML", "exception"}, EDGE = {"Old = Old outerHTML", "exception"}, IE = {"Old = Old outerHTML", "New = ", "Children: 0"}) public void setOuterHTMLDetachedElementUndefined() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -1521,7 +1579,7 @@ public void setOuterHTMLDetachedElementUndefined() throws Exception { + "
                                  Old outerHTML
                                  \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1530,24 +1588,24 @@ public void setOuterHTMLDetachedElementUndefined() throws Exception { */ @Test @Alerts(DEFAULT = {"Old = Old outerHTML", - "New = Old outerHTML", "Children: 1"}, + "New = Old outerHTML", "Children: 1"}, CHROME = {"Old = Old outerHTML", "exception"}, EDGE = {"Old = Old outerHTML", "exception"}, IE = {"Old = Old outerHTML", "New = ", "Children: 0"}) public void setOuterHTMLDetachedElementEmpty() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -1555,7 +1613,7 @@ public void setOuterHTMLDetachedElementEmpty() throws Exception { + "
                                  Old outerHTML
                                  \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPage2(html); } /** @@ -1564,24 +1622,24 @@ public void setOuterHTMLDetachedElementEmpty() throws Exception { */ @Test @Alerts(DEFAULT = {"Old = Old outerHTML", - "New = Old outerHTML", "Children: 1"}, + "New = Old outerHTML", "Children: 1"}, CHROME = {"Old = Old outerHTML", "exception"}, EDGE = {"Old = Old outerHTML", "exception"}, IE = {"Old = Old outerHTML", "New = ", "Children: 0"}) public void setOuterHTMLDetachedElementBlank() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -1589,7 +1647,7 @@ public void setOuterHTMLDetachedElementBlank() throws Exception { + "
                                  Old outerHTML
                                  \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1598,24 +1656,24 @@ public void setOuterHTMLDetachedElementBlank() throws Exception { */ @Test @Alerts(DEFAULT = {"Old = Old outerHTML", - "New = Old outerHTML", "Children: 1"}, + "New = Old outerHTML", "Children: 1"}, CHROME = {"Old = Old outerHTML", "exception"}, EDGE = {"Old = Old outerHTML", "exception"}, IE = {"Old = Old outerHTML", "New = ", "Children: 0"}) public void setOuterHTMLDetachedElement() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" @@ -1623,7 +1681,7 @@ public void setOuterHTMLDetachedElement() throws Exception { + "
                                  Old outerHTML
                                  \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1632,19 +1690,20 @@ public void setOuterHTMLDetachedElement() throws Exception { @Test public void setOuterHTMLExecuteJavaScript() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + "
                                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1653,19 +1712,20 @@ public void setOuterHTMLExecuteJavaScript() throws Exception { @Test public void setOuterHTMLExecuteNestedJavaScript() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + "
                                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1675,22 +1735,23 @@ public void setOuterHTMLExecuteNestedJavaScript() throws Exception { @Alerts("exception") public void setOuterHTMLDeclareJavaScript() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + "
                                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1702,17 +1763,18 @@ public void setOuterHTMLDeclareJavaScript() throws Exception { @Alerts({"body.cpuClass = undefined", "exception"}) public void addBehaviorDefaultClientCaps() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1724,20 +1786,21 @@ public void addBehaviorDefaultClientCaps() throws Exception { @Alerts({"body.isHomePage = undefined", "!addBehavior", "!removeBehavior", "exception"}) public void removeBehavior() throws Exception { final String html = ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1749,16 +1812,17 @@ public void children() throws Exception { final String html = "\n" + "

                                  test
                                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1768,19 +1832,20 @@ public void children() throws Exception { @Alerts({"1", "0"}) public void childrenDoesNotCountTextNodes() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ - + "foo\n" + "
                                  abcd
                                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1793,13 +1858,14 @@ public void childrenFunctionAccess() throws Exception { final String html = "\n" + "

                                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1808,25 +1874,37 @@ public void childrenFunctionAccess() throws Exception { @Test @Alerts(DEFAULT = {"Old = Old\n\ninnerText", "New = New cell value"}, IE = {"Old = Old \ninnerText", "New = New cell value"}) - @NotYetImplemented({CHROME, EDGE, FF, FF78}) + @HtmlUnitNYI(CHROME = {"Old = Old\ninnerText", "New = New cell value"}, + EDGE = {"Old = Old\ninnerText", "New = New cell value"}, + FF = {"Old = Old\ninnerText", "New = New cell value"}, + FF78 = {"Old = Old\ninnerText", "New = New cell value"}, + IE = {"Old = Old\ninnerText", "New = New cell value"}) public void getSetInnerTextSimple() throws Exception { final String html = "\n" + "\n" - + " test\n" + " \n" + "\n" + "\n" + "
                                  Old

                                  innerText

                                  \n" + + " \n" + "\n" + ""; - loadPageWithAlerts2(html); + + final WebDriver driver = loadPage2(html); + + final WebElement textArea = driver.findElement(By.id("myTextArea")); + assertEquals(String.join("; ", getExpectedAlerts()) + "; ", textArea.getAttribute("value")); } /** @@ -1839,20 +1917,20 @@ public void getSetInnerTextSimple() throws Exception { public void removeAttribute() throws Exception { final String html = "\n" + "\n" - + " Test\n" + " \n" + "\n" + "
                                  \n" + "
                                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1865,22 +1943,22 @@ public void removeAttribute() throws Exception { public void removeAttribute_property() throws Exception { final String html = "\n" + "\n" - + " Test\n" + " \n" + "\n" + "
                                  \n" + "
                                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1892,25 +1970,23 @@ public void removeAttribute_property() throws Exception { @Alerts({"number", "number", "number", "number", "number", "number", "number", "number"}) public void scrolls() throws Exception { final String html = "\n" - + "\n" - + " Test\n" - + "\n" + "\n" + "
                                  \n" + "
                                  foo
                                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1943,28 +2019,29 @@ private void scrollLeft(final String overflow) throws Exception { + "
                                  \n" + "
                                  \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -1975,18 +2052,18 @@ private void scrollLeft(final String overflow) throws Exception { public void scrollLeft() throws Exception { final String html = "\n" + "\n" - + " Test\n" + " \n" + "\n" @@ -1996,7 +2073,7 @@ public void scrollLeft() throws Exception { + "
                                \n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2029,28 +2106,29 @@ private void scrollTop(final String overflow) throws Exception { + "
                                \n" + "
                                \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2072,16 +2150,16 @@ public void scrollIntoView() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({ - "element: span3 offsetParent: td2", "element: td2 offsetParent: table2", - "element: tr2 offsetParent: table2", "element: table2 offsetParent: td1", - "element: td1 offsetParent: table1", "element: tr1 offsetParent: table1", - "element: table1 offsetParent: body1", "element: span2 offsetParent: body1", - "element: span1 offsetParent: body1", "element: div1 offsetParent: body1", - "element: body1 offsetParent: null"}) + @Alerts({"element: span3 offsetParent: td2", "element: td2 offsetParent: table2", + "element: tr2 offsetParent: table2", "element: table2 offsetParent: td1", + "element: td1 offsetParent: table1", "element: tr1 offsetParent: table1", + "element: table1 offsetParent: body1", "element: span2 offsetParent: body1", + "element: span1 offsetParent: body1", "element: div1 offsetParent: body1", + "element: body1 offsetParent: null"}) public void offsetParent_Basic() throws Exception { final String html = "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2158,9 +2237,9 @@ public void offsetParent_newElement() throws Exception { */ @Test @Alerts(DEFAULT = {"null", "body", "exception", "body", "body", "body", - "f1", "body", "h1", "i1", "td", "exception", "td", "body", "body"}, + "f1", "body", "h1", "i1", "td", "exception", "td", "body", "body"}, FF = {"null", "body", "body", "body", "body", "body", - "f1", "body", "h1", "i1", "td", "body", "td", "body", "body"}, + "f1", "body", "h1", "i1", "td", "body", "td", "body", "body"}, FF78 = {"null", "body", "body", "body", "body", "body", "f1", "body", "h1", "i1", "td", "body", "td", "body", "body"}) public void offsetParent_WithCSS() throws Exception { @@ -2187,13 +2266,14 @@ public void offsetParent_WithCSS() throws Exception { + " \n" + " \n" + " \n" + " \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2245,30 +2325,31 @@ public void offsetParent_withSelectors() throws Exception { */ @Test @Alerts({"undefined", "undefined", "undefined", "undefined", - "undefined", "123", "from myFunction", "123", "from myFunction"}) + "undefined", "123", "from myFunction", "123", "from myFunction"}) public void prototype() throws Exception { - final String html = "Prototype test\n" + final String html = "\n" + "\n" + "
                                bla
                                \n" + "bla\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2279,17 +2360,18 @@ public void prototype() throws Exception { @Test @Alerts("in selectNodes") public void prototype_Element() throws Exception { - final String html = "foo\n" + "
                                \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2298,19 +2380,20 @@ public void prototype_Element() throws Exception { @Test @Alerts({"true", "true"}) public void instanceOf() throws Exception { - final String html = "instanceof test\n" + final String html = "\n" + "\n" + "
                                bla
                                \n" + "bla\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2326,12 +2409,13 @@ public void parentElement() throws Exception { + "\n" + "
                                \n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2360,18 +2444,19 @@ private void style(final String styleProperty) throws Exception { final String html = "\n" + "\n" + "\n" + "\n" + "\n" + "
                                \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2382,11 +2467,12 @@ private void style(final String styleProperty) throws Exception { public void clientLeftTop() throws Exception { final String html = "" + "
                                hello
                                "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2402,11 +2488,12 @@ public void clientLeftTop_documentElement() throws Exception { + "\n" + "" + "
                                hello
                                "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2417,11 +2504,12 @@ public void clientLeftTop_documentElement() throws Exception { public void clientLeftTopWithBorder() throws Exception { final String html = "" + "
                                hello
                                "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2433,11 +2521,12 @@ public void clientLeftTopWithBorder() throws Exception { public void getBoundingClientRect() throws Exception { final String html = "\n" + "
                                hello
                                "; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2446,18 +2535,19 @@ public void getBoundingClientRect() throws Exception { @Test @Alerts({"400", "100"}) public void getBoundingClientRect2() throws Exception { - final String html = "foo\n" + "
                                " + "
                                " + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2466,18 +2556,19 @@ public void getBoundingClientRect2() throws Exception { @Test @Alerts({"0", "100", "100", "50"}) public void getBoundingClientRect_Scroll() throws Exception { - final String html = "foo\n" + "\n" @@ -2491,7 +2582,7 @@ public void getBoundingClientRect_Scroll() throws Exception { + "
                                way down
                                \n" + "
                                " + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2502,21 +2593,22 @@ public void getBoundingClientRect_Scroll() throws Exception { IE = "exception") public void getBoundingClientRectDisconnected() throws Exception { final String html = "\n" - + "foo\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2526,18 +2618,19 @@ public void getBoundingClientRectDisconnected() throws Exception { @Alerts(DEFAULT = {"[object DOMRectList]", "1"}, IE = {"[object ClientRectList]", "1"}) public void getClientRects() throws Exception { - final String html = "foo\n" + "\n" + "
                                \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2548,16 +2641,17 @@ public void getClientRects() throws Exception { IE = {"[object ClientRectList]", "0"}) public void getClientRectsDisconnected() throws Exception { final String html = - "foo\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2568,7 +2662,8 @@ public void getClientRectsDisconnected() throws Exception { IE = {"[object ClientRectList]", "0", "[object ClientRectList]", "0"}) public void getClientRectsDisplayNone() throws Exception { final String html = - "foo\n" + "\n" @@ -2586,7 +2681,7 @@ public void getClientRectsDisplayNone() throws Exception { + "
                                \n" + "
                                \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2595,19 +2690,20 @@ public void getClientRectsDisplayNone() throws Exception { @Test @Alerts({"null", "null"}) public void innerHTML_parentNode() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2616,19 +2712,20 @@ public void innerHTML_parentNode() throws Exception { @Test @Alerts({"null", "null"}) public void innerText_parentNode() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2638,20 +2735,21 @@ public void innerText_parentNode() throws Exception { @Alerts(DEFAULT = {"true", "true", "true"}, IE = {"false", "true", "false"}) public void uniqueID() throws Exception { - final String html = "foo\n" + "
                                \n" + "
                                \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2663,24 +2761,25 @@ public void uniqueID() throws Exception { @Alerts(DEFAULT = "undefined", IE = {"true", "true"}) public void uniqueIDFormatIE() throws Exception { - final String html = "foo\n" + "
                                \n" + "
                                \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2689,17 +2788,18 @@ public void uniqueIDFormatIE() throws Exception { @Test @Alerts("exception") public void setExpression() throws Exception { - final String html = "foo\n" + "
                                \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2708,23 +2808,24 @@ public void setExpression() throws Exception { @Test @Alerts({"ex setExpression", "ex removeExpression"}) public void removeExpression() throws Exception { - final String html = "foo\n" + "
                                \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2805,17 +2906,18 @@ public void hasAttribute() throws Exception { + "\n" + "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2829,15 +2931,16 @@ public void hasAttributeTypeOf() throws Exception { + "\n" + "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2850,18 +2953,19 @@ public void hasAttributeQuirksMode() throws Exception { "\n" + "\n" + "\n" + "\n" + "\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2870,21 +2974,22 @@ public void hasAttributeQuirksMode() throws Exception { @Test @Alerts({"undefined", "undefined", "undefined"}) public void getComponentVersion() throws Exception { - final String html = "foo\n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2894,11 +2999,12 @@ public void getComponentVersion() throws Exception { @Alerts({"36", "46"}) public void clientWidthAndHeight() throws Exception { final String html = - "foo\n" + "\n" @@ -2906,7 +3012,7 @@ public void clientWidthAndHeight() throws Exception { + "\n" + "
                                \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2916,19 +3022,20 @@ public void clientWidthAndHeight() throws Exception { @Alerts({"true", "true", "true", "true", "true"}) public void clientWidthAndHeightPositionAbsolute() throws Exception { final String html = - "foo\n" + "\n" @@ -2936,7 +3043,7 @@ public void clientWidthAndHeightPositionAbsolute() throws Exception { + "
                                Test
                                \n" + "
                                Test
                                \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2946,18 +3053,19 @@ public void clientWidthAndHeightPositionAbsolute() throws Exception { @Alerts({"0", "0"}) public void clientWidthAndHeightPositionAbsoluteEmpty() throws Exception { final String html = - "foo\n" + "\n" + "\n" + "
                                \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -2967,21 +3075,22 @@ public void clientWidthAndHeightPositionAbsoluteEmpty() throws Exception { @Alerts({"true", "true", "false", "true", "true", "true", "true", "true", "true", "true"}) public void scrollWidthAndHeight() throws Exception { final String html = - "foo\n" + "\n" @@ -2990,7 +3099,7 @@ public void scrollWidthAndHeight() throws Exception { + "
                                \n" + "
                                \n" + ""; - loadPageWithAlerts2(html); + loadPageVerifyTitle2(html); } /** @@ -3000,18 +3109,19 @@ public void scrollWidthAndHeight() throws Exception { @Alerts({"0", "0"}) public void scrollWidthAndHeightDisplayNone() throws Exception { final String html = - "foo\n" + "\n" + "\n" + "