From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- dom/tests/mochitest/general/497633.html | 35 + dom/tests/mochitest/general/chrome.ini | 12 + dom/tests/mochitest/general/cssA.css | 0 dom/tests/mochitest/general/cssB.css | 2 + dom/tests/mochitest/general/cssC.css | 0 dom/tests/mochitest/general/embed_navigate.html | 1 + dom/tests/mochitest/general/emptyCssFile2.css | 1 + dom/tests/mochitest/general/fail.png | Bin 0 -> 91 bytes dom/tests/mochitest/general/file_bug628069.html | 16 + dom/tests/mochitest/general/file_clonewrapper.html | 35 + .../general/file_domWindowUtils_scrollbarSize.html | 7 + dom/tests/mochitest/general/file_focusrings.html | 5 + .../general/file_frameElementWrapping.html | 32 + .../mochitest/general/file_moving_nodeList.html | 31 + dom/tests/mochitest/general/file_moving_xhr.html | 28 + .../general/file_resource_timing_nocors.html | 191 ++ dom/tests/mochitest/general/frameSelectEvents.html | 929 +++++++++ .../mochitest/general/frameStorageAllowed.html | 22 + .../mochitest/general/frameStorageChrome.html | 20 + .../general/frameStorageNullprincipal.sjs | 40 + .../mochitest/general/frameStoragePrevented.html | 47 + dom/tests/mochitest/general/generateCss.sjs | 42 + dom/tests/mochitest/general/historyframes.html | 179 ++ dom/tests/mochitest/general/image_100.png | Bin 0 -> 91 bytes dom/tests/mochitest/general/image_200.png | Bin 0 -> 100 bytes dom/tests/mochitest/general/image_50.png | Bin 0 -> 85 bytes .../general/importsSameAndCrossOrigin.css | 3 + dom/tests/mochitest/general/mochitest.ini | 182 ++ dom/tests/mochitest/general/navigation_timing.html | 100 + dom/tests/mochitest/general/pass.apng | Bin 0 -> 188 bytes .../general/performance_timeline_main_test.html | 106 + dom/tests/mochitest/general/postback.html | 16 + dom/tests/mochitest/general/res0.resource | 0 dom/tests/mochitest/general/res1.resource | 0 dom/tests/mochitest/general/res1.resource^headers^ | 2 + dom/tests/mochitest/general/res2.resource | 0 dom/tests/mochitest/general/res2.resource^headers^ | 2 + dom/tests/mochitest/general/res3.resource | 0 dom/tests/mochitest/general/res3.resource^headers^ | 2 + dom/tests/mochitest/general/res4.resource | 0 dom/tests/mochitest/general/res4.resource^headers^ | 3 + dom/tests/mochitest/general/res5.resource | 0 dom/tests/mochitest/general/res5.resource^headers^ | 2 + dom/tests/mochitest/general/res6.resource | 0 dom/tests/mochitest/general/res6.resource^headers^ | 2 + dom/tests/mochitest/general/res7.resource | 0 dom/tests/mochitest/general/res7.resource^headers^ | 2 + dom/tests/mochitest/general/res8.resource | 0 dom/tests/mochitest/general/res8.resource^headers^ | 2 + dom/tests/mochitest/general/resource_timing.js | 0 .../general/resource_timing_cross_origin.html | 191 ++ .../mochitest/general/resource_timing_iframe.html | 50 + .../general/resource_timing_location_navigate.html | 3 + .../general/resource_timing_main_test.html | 290 +++ .../general/resource_timing_meta_refresh.html | 10 + .../mochitest/general/resource_timing_nocors.html | 88 + .../general/resource_timing_redirect.html | 11 + .../general/resource_timing_redirect.html^headers^ | 2 + .../mochitest/general/start_historyframe.html | 1 + .../mochitest/general/storagePermissionsUtils.js | 282 +++ dom/tests/mochitest/general/test-data.json | 1 + dom/tests/mochitest/general/test-data2.json | 1 + dom/tests/mochitest/general/test_497898.html | 41 + .../mochitest/general/test_CCW_optimization.html | 50 + dom/tests/mochitest/general/test_DOMMatrix.html | 717 +++++++ .../mochitest/general/test_WebKitCSSMatrix.html | 339 ++++ dom/tests/mochitest/general/test_bug1161721.html | 32 + dom/tests/mochitest/general/test_bug1170911.html | 90 + dom/tests/mochitest/general/test_bug1208217.html | 31 + dom/tests/mochitest/general/test_bug1313753.html | 63 + dom/tests/mochitest/general/test_bug1434273.html | 36 + dom/tests/mochitest/general/test_bug504220.html | 65 + dom/tests/mochitest/general/test_bug628069_1.html | 50 + dom/tests/mochitest/general/test_bug628069_2.html | 41 + dom/tests/mochitest/general/test_bug631440.html | 39 + dom/tests/mochitest/general/test_bug653364.html | 39 + dom/tests/mochitest/general/test_bug861217.html | 115 ++ dom/tests/mochitest/general/test_clientRects.html | 127 ++ .../general/test_clipboard_disallowed.html | 69 + .../mochitest/general/test_clipboard_events.html | 37 + dom/tests/mochitest/general/test_consoleAPI.html | 66 + .../general/test_contentViewer_overrideDPPX.html | 428 ++++ .../general/test_devicePixelRatio_with_zoom.html | 84 + .../mochitest/general/test_domWindowUtils.html | 183 ++ .../general/test_domWindowUtils_scrollXY.html | 90 + .../general/test_domWindowUtils_scrollbarSize.html | 65 + dom/tests/mochitest/general/test_donottrack.html | 72 + .../general/test_focus_legend_noparent.html | 36 + .../general/test_focus_scrollchildframe.html | 24 + dom/tests/mochitest/general/test_focusrings.xhtml | 217 +++ dom/tests/mochitest/general/test_for_of.html | 25 + .../general/test_frameElementWrapping.html | 44 + .../general/test_framedhistoryframes.html | 31 + .../mochitest/general/test_img_mutations.html | 236 +++ dom/tests/mochitest/general/test_innerScreen.xhtml | 83 + dom/tests/mochitest/general/test_interfaces.html | 28 + dom/tests/mochitest/general/test_interfaces.js | 2049 ++++++++++++++++++++ .../general/test_interfaces_secureContext.html | 28 + .../general/test_media_queries_with_zoom.html | 52 + .../mochitest/general/test_navigation_timing.html | 36 + .../mochitest/general/test_network_events.html | 72 + .../test_nodeAdoption_chrome_boundary.xhtml | 28 + dom/tests/mochitest/general/test_offsets.css | 3 + dom/tests/mochitest/general/test_offsets.html | 100 + dom/tests/mochitest/general/test_offsets.js | 332 ++++ dom/tests/mochitest/general/test_offsets.xhtml | 98 + dom/tests/mochitest/general/test_outerHTML.html | 74 + dom/tests/mochitest/general/test_outerHTML.xhtml | 75 + .../mochitest/general/test_paste_selection.html | 122 ++ .../test_performance_nav_timing_before_onload.html | 30 + .../mochitest/general/test_performance_now.html | 60 + .../general/test_performance_timeline.html | 35 + dom/tests/mochitest/general/test_picture_apng.html | 77 + .../mochitest/general/test_picture_mutations.html | 311 +++ .../mochitest/general/test_pointerPreserves3D.html | 25 + .../general/test_pointerPreserves3DClip.html | 55 + .../test_pointerPreserves3DPerspective.html | 29 + dom/tests/mochitest/general/test_resizeby.html | 64 + .../mochitest/general/test_resource_timing.html | 40 + .../general/test_resource_timing_cross_origin.html | 47 + ...test_resource_timing_cross_origin_navigate.html | 73 + .../general/test_resource_timing_frameset.html | 29 + .../general/test_resource_timing_nocors.html | 37 + dom/tests/mochitest/general/test_selectevents.html | 31 + .../general/test_showModalDialog_removed.html | 31 + .../mochitest/general/test_spacetopagedown.html | 75 + .../general/test_storagePermissionsAccept.html | 44 + .../test_storagePermissionsLimitForeign.html | 46 + .../general/test_storagePermissionsReject.html | 44 + .../test_storagePermissionsRejectForeign.html | 44 + dom/tests/mochitest/general/test_stylesheetPI.html | 37 + ...est_toggling_performance_navigation_timing.html | 47 + dom/tests/mochitest/general/test_vibrator.html | 148 ++ .../mochitest/general/test_windowProperties.html | 28 + .../general/test_windowedhistoryframes.html | 32 + dom/tests/mochitest/general/url1_historyframe.html | 1 + dom/tests/mochitest/general/url2_historyframe.html | 1 + .../mochitest/general/window_clipboard_events.html | 1239 ++++++++++++ .../general/window_storagePermissions.html | 38 + .../mochitest/general/workerStorageAllowed.js | 78 + .../mochitest/general/workerStoragePrevented.js | 75 + 141 files changed, 12742 insertions(+) create mode 100644 dom/tests/mochitest/general/497633.html create mode 100644 dom/tests/mochitest/general/chrome.ini create mode 100644 dom/tests/mochitest/general/cssA.css create mode 100644 dom/tests/mochitest/general/cssB.css create mode 100644 dom/tests/mochitest/general/cssC.css create mode 100644 dom/tests/mochitest/general/embed_navigate.html create mode 100644 dom/tests/mochitest/general/emptyCssFile2.css create mode 100644 dom/tests/mochitest/general/fail.png create mode 100644 dom/tests/mochitest/general/file_bug628069.html create mode 100644 dom/tests/mochitest/general/file_clonewrapper.html create mode 100644 dom/tests/mochitest/general/file_domWindowUtils_scrollbarSize.html create mode 100644 dom/tests/mochitest/general/file_focusrings.html create mode 100644 dom/tests/mochitest/general/file_frameElementWrapping.html create mode 100644 dom/tests/mochitest/general/file_moving_nodeList.html create mode 100644 dom/tests/mochitest/general/file_moving_xhr.html create mode 100644 dom/tests/mochitest/general/file_resource_timing_nocors.html create mode 100644 dom/tests/mochitest/general/frameSelectEvents.html create mode 100644 dom/tests/mochitest/general/frameStorageAllowed.html create mode 100644 dom/tests/mochitest/general/frameStorageChrome.html create mode 100644 dom/tests/mochitest/general/frameStorageNullprincipal.sjs create mode 100644 dom/tests/mochitest/general/frameStoragePrevented.html create mode 100644 dom/tests/mochitest/general/generateCss.sjs create mode 100644 dom/tests/mochitest/general/historyframes.html create mode 100644 dom/tests/mochitest/general/image_100.png create mode 100644 dom/tests/mochitest/general/image_200.png create mode 100644 dom/tests/mochitest/general/image_50.png create mode 100644 dom/tests/mochitest/general/importsSameAndCrossOrigin.css create mode 100644 dom/tests/mochitest/general/mochitest.ini create mode 100644 dom/tests/mochitest/general/navigation_timing.html create mode 100644 dom/tests/mochitest/general/pass.apng create mode 100644 dom/tests/mochitest/general/performance_timeline_main_test.html create mode 100644 dom/tests/mochitest/general/postback.html create mode 100644 dom/tests/mochitest/general/res0.resource create mode 100644 dom/tests/mochitest/general/res1.resource create mode 100644 dom/tests/mochitest/general/res1.resource^headers^ create mode 100644 dom/tests/mochitest/general/res2.resource create mode 100644 dom/tests/mochitest/general/res2.resource^headers^ create mode 100644 dom/tests/mochitest/general/res3.resource create mode 100644 dom/tests/mochitest/general/res3.resource^headers^ create mode 100644 dom/tests/mochitest/general/res4.resource create mode 100644 dom/tests/mochitest/general/res4.resource^headers^ create mode 100644 dom/tests/mochitest/general/res5.resource create mode 100644 dom/tests/mochitest/general/res5.resource^headers^ create mode 100644 dom/tests/mochitest/general/res6.resource create mode 100644 dom/tests/mochitest/general/res6.resource^headers^ create mode 100644 dom/tests/mochitest/general/res7.resource create mode 100644 dom/tests/mochitest/general/res7.resource^headers^ create mode 100644 dom/tests/mochitest/general/res8.resource create mode 100644 dom/tests/mochitest/general/res8.resource^headers^ create mode 100644 dom/tests/mochitest/general/resource_timing.js create mode 100644 dom/tests/mochitest/general/resource_timing_cross_origin.html create mode 100644 dom/tests/mochitest/general/resource_timing_iframe.html create mode 100644 dom/tests/mochitest/general/resource_timing_location_navigate.html create mode 100644 dom/tests/mochitest/general/resource_timing_main_test.html create mode 100644 dom/tests/mochitest/general/resource_timing_meta_refresh.html create mode 100644 dom/tests/mochitest/general/resource_timing_nocors.html create mode 100644 dom/tests/mochitest/general/resource_timing_redirect.html create mode 100644 dom/tests/mochitest/general/resource_timing_redirect.html^headers^ create mode 100644 dom/tests/mochitest/general/start_historyframe.html create mode 100644 dom/tests/mochitest/general/storagePermissionsUtils.js create mode 100644 dom/tests/mochitest/general/test-data.json create mode 100644 dom/tests/mochitest/general/test-data2.json create mode 100644 dom/tests/mochitest/general/test_497898.html create mode 100644 dom/tests/mochitest/general/test_CCW_optimization.html create mode 100644 dom/tests/mochitest/general/test_DOMMatrix.html create mode 100644 dom/tests/mochitest/general/test_WebKitCSSMatrix.html create mode 100644 dom/tests/mochitest/general/test_bug1161721.html create mode 100644 dom/tests/mochitest/general/test_bug1170911.html create mode 100644 dom/tests/mochitest/general/test_bug1208217.html create mode 100644 dom/tests/mochitest/general/test_bug1313753.html create mode 100644 dom/tests/mochitest/general/test_bug1434273.html create mode 100644 dom/tests/mochitest/general/test_bug504220.html create mode 100644 dom/tests/mochitest/general/test_bug628069_1.html create mode 100644 dom/tests/mochitest/general/test_bug628069_2.html create mode 100644 dom/tests/mochitest/general/test_bug631440.html create mode 100644 dom/tests/mochitest/general/test_bug653364.html create mode 100644 dom/tests/mochitest/general/test_bug861217.html create mode 100644 dom/tests/mochitest/general/test_clientRects.html create mode 100644 dom/tests/mochitest/general/test_clipboard_disallowed.html create mode 100644 dom/tests/mochitest/general/test_clipboard_events.html create mode 100644 dom/tests/mochitest/general/test_consoleAPI.html create mode 100644 dom/tests/mochitest/general/test_contentViewer_overrideDPPX.html create mode 100644 dom/tests/mochitest/general/test_devicePixelRatio_with_zoom.html create mode 100644 dom/tests/mochitest/general/test_domWindowUtils.html create mode 100644 dom/tests/mochitest/general/test_domWindowUtils_scrollXY.html create mode 100644 dom/tests/mochitest/general/test_domWindowUtils_scrollbarSize.html create mode 100644 dom/tests/mochitest/general/test_donottrack.html create mode 100644 dom/tests/mochitest/general/test_focus_legend_noparent.html create mode 100644 dom/tests/mochitest/general/test_focus_scrollchildframe.html create mode 100644 dom/tests/mochitest/general/test_focusrings.xhtml create mode 100644 dom/tests/mochitest/general/test_for_of.html create mode 100644 dom/tests/mochitest/general/test_frameElementWrapping.html create mode 100644 dom/tests/mochitest/general/test_framedhistoryframes.html create mode 100644 dom/tests/mochitest/general/test_img_mutations.html create mode 100644 dom/tests/mochitest/general/test_innerScreen.xhtml create mode 100644 dom/tests/mochitest/general/test_interfaces.html create mode 100644 dom/tests/mochitest/general/test_interfaces.js create mode 100644 dom/tests/mochitest/general/test_interfaces_secureContext.html create mode 100644 dom/tests/mochitest/general/test_media_queries_with_zoom.html create mode 100644 dom/tests/mochitest/general/test_navigation_timing.html create mode 100644 dom/tests/mochitest/general/test_network_events.html create mode 100644 dom/tests/mochitest/general/test_nodeAdoption_chrome_boundary.xhtml create mode 100644 dom/tests/mochitest/general/test_offsets.css create mode 100644 dom/tests/mochitest/general/test_offsets.html create mode 100644 dom/tests/mochitest/general/test_offsets.js create mode 100644 dom/tests/mochitest/general/test_offsets.xhtml create mode 100644 dom/tests/mochitest/general/test_outerHTML.html create mode 100644 dom/tests/mochitest/general/test_outerHTML.xhtml create mode 100644 dom/tests/mochitest/general/test_paste_selection.html create mode 100644 dom/tests/mochitest/general/test_performance_nav_timing_before_onload.html create mode 100644 dom/tests/mochitest/general/test_performance_now.html create mode 100644 dom/tests/mochitest/general/test_performance_timeline.html create mode 100644 dom/tests/mochitest/general/test_picture_apng.html create mode 100644 dom/tests/mochitest/general/test_picture_mutations.html create mode 100644 dom/tests/mochitest/general/test_pointerPreserves3D.html create mode 100644 dom/tests/mochitest/general/test_pointerPreserves3DClip.html create mode 100644 dom/tests/mochitest/general/test_pointerPreserves3DPerspective.html create mode 100644 dom/tests/mochitest/general/test_resizeby.html create mode 100644 dom/tests/mochitest/general/test_resource_timing.html create mode 100644 dom/tests/mochitest/general/test_resource_timing_cross_origin.html create mode 100644 dom/tests/mochitest/general/test_resource_timing_cross_origin_navigate.html create mode 100644 dom/tests/mochitest/general/test_resource_timing_frameset.html create mode 100644 dom/tests/mochitest/general/test_resource_timing_nocors.html create mode 100644 dom/tests/mochitest/general/test_selectevents.html create mode 100644 dom/tests/mochitest/general/test_showModalDialog_removed.html create mode 100644 dom/tests/mochitest/general/test_spacetopagedown.html create mode 100644 dom/tests/mochitest/general/test_storagePermissionsAccept.html create mode 100644 dom/tests/mochitest/general/test_storagePermissionsLimitForeign.html create mode 100644 dom/tests/mochitest/general/test_storagePermissionsReject.html create mode 100644 dom/tests/mochitest/general/test_storagePermissionsRejectForeign.html create mode 100644 dom/tests/mochitest/general/test_stylesheetPI.html create mode 100644 dom/tests/mochitest/general/test_toggling_performance_navigation_timing.html create mode 100644 dom/tests/mochitest/general/test_vibrator.html create mode 100644 dom/tests/mochitest/general/test_windowProperties.html create mode 100644 dom/tests/mochitest/general/test_windowedhistoryframes.html create mode 100644 dom/tests/mochitest/general/url1_historyframe.html create mode 100644 dom/tests/mochitest/general/url2_historyframe.html create mode 100644 dom/tests/mochitest/general/window_clipboard_events.html create mode 100644 dom/tests/mochitest/general/window_storagePermissions.html create mode 100644 dom/tests/mochitest/general/workerStorageAllowed.js create mode 100644 dom/tests/mochitest/general/workerStoragePrevented.js (limited to 'dom/tests/mochitest/general') diff --git a/dom/tests/mochitest/general/497633.html b/dom/tests/mochitest/general/497633.html new file mode 100644 index 0000000000..da011f54c8 --- /dev/null +++ b/dom/tests/mochitest/general/497633.html @@ -0,0 +1,35 @@ + + + + + + + + + + diff --git a/dom/tests/mochitest/general/chrome.ini b/dom/tests/mochitest/general/chrome.ini new file mode 100644 index 0000000000..9910eb7a9b --- /dev/null +++ b/dom/tests/mochitest/general/chrome.ini @@ -0,0 +1,12 @@ +[DEFAULT] +skip-if = os == 'android' + +[test_innerScreen.xhtml] +[test_offsets.xhtml] +support-files = test_offsets.css test_offsets.js +skip-if = (os == "mac" && debug) #leaks Bug 1571583 +[test_spacetopagedown.html] +[test_nodeAdoption_chrome_boundary.xhtml] +[test_focusrings.xhtml] +support-files = file_focusrings.html +skip-if = toolkit == 'android' #TIMED_OUT diff --git a/dom/tests/mochitest/general/cssA.css b/dom/tests/mochitest/general/cssA.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dom/tests/mochitest/general/cssB.css b/dom/tests/mochitest/general/cssB.css new file mode 100644 index 0000000000..8d44ebd00f --- /dev/null +++ b/dom/tests/mochitest/general/cssB.css @@ -0,0 +1,2 @@ +@import 'cssC.css'; +@import url('http://example.org/tests/dom/tests/mochitest/general/cssC.css'); diff --git a/dom/tests/mochitest/general/cssC.css b/dom/tests/mochitest/general/cssC.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dom/tests/mochitest/general/embed_navigate.html b/dom/tests/mochitest/general/embed_navigate.html new file mode 100644 index 0000000000..93641f026a --- /dev/null +++ b/dom/tests/mochitest/general/embed_navigate.html @@ -0,0 +1 @@ + diff --git a/dom/tests/mochitest/general/emptyCssFile2.css b/dom/tests/mochitest/general/emptyCssFile2.css new file mode 100644 index 0000000000..64f97ae687 --- /dev/null +++ b/dom/tests/mochitest/general/emptyCssFile2.css @@ -0,0 +1 @@ +@import url('http://example.org/tests/dom/tests/mochitest/general/cross.css'); \ No newline at end of file diff --git a/dom/tests/mochitest/general/fail.png b/dom/tests/mochitest/general/fail.png new file mode 100644 index 0000000000..db812bd7d5 Binary files /dev/null and b/dom/tests/mochitest/general/fail.png differ diff --git a/dom/tests/mochitest/general/file_bug628069.html b/dom/tests/mochitest/general/file_bug628069.html new file mode 100644 index 0000000000..9fd28888c9 --- /dev/null +++ b/dom/tests/mochitest/general/file_bug628069.html @@ -0,0 +1,16 @@ + + + + + +Just a shell of a page. + + diff --git a/dom/tests/mochitest/general/file_clonewrapper.html b/dom/tests/mochitest/general/file_clonewrapper.html new file mode 100644 index 0000000000..18e0505d86 --- /dev/null +++ b/dom/tests/mochitest/general/file_clonewrapper.html @@ -0,0 +1,35 @@ + + + + + + + + + diff --git a/dom/tests/mochitest/general/file_domWindowUtils_scrollbarSize.html b/dom/tests/mochitest/general/file_domWindowUtils_scrollbarSize.html new file mode 100644 index 0000000000..1959fc4f68 --- /dev/null +++ b/dom/tests/mochitest/general/file_domWindowUtils_scrollbarSize.html @@ -0,0 +1,7 @@ + + + +
+
+
+ diff --git a/dom/tests/mochitest/general/file_focusrings.html b/dom/tests/mochitest/general/file_focusrings.html new file mode 100644 index 0000000000..74f3a563ed --- /dev/null +++ b/dom/tests/mochitest/general/file_focusrings.html @@ -0,0 +1,5 @@ +
diff --git a/dom/tests/mochitest/general/file_frameElementWrapping.html b/dom/tests/mochitest/general/file_frameElementWrapping.html new file mode 100644 index 0000000000..44237f7e04 --- /dev/null +++ b/dom/tests/mochitest/general/file_frameElementWrapping.html @@ -0,0 +1,32 @@ + + + diff --git a/dom/tests/mochitest/general/file_moving_nodeList.html b/dom/tests/mochitest/general/file_moving_nodeList.html new file mode 100644 index 0000000000..2456c6e689 --- /dev/null +++ b/dom/tests/mochitest/general/file_moving_nodeList.html @@ -0,0 +1,31 @@ + + + + + + + diff --git a/dom/tests/mochitest/general/file_moving_xhr.html b/dom/tests/mochitest/general/file_moving_xhr.html new file mode 100644 index 0000000000..ee09c2bd10 --- /dev/null +++ b/dom/tests/mochitest/general/file_moving_xhr.html @@ -0,0 +1,28 @@ + + + + + + + diff --git a/dom/tests/mochitest/general/file_resource_timing_nocors.html b/dom/tests/mochitest/general/file_resource_timing_nocors.html new file mode 100644 index 0000000000..631251c2b1 --- /dev/null +++ b/dom/tests/mochitest/general/file_resource_timing_nocors.html @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bug #1180145 - Resource Timing NO-CORS CSS + +

+
+
+ +
BLUE
+
RED
+
Font
+
CURSOR
+
+
+ + diff --git a/dom/tests/mochitest/general/frameSelectEvents.html b/dom/tests/mochitest/general/frameSelectEvents.html new file mode 100644 index 0000000000..21995c86ef --- /dev/null +++ b/dom/tests/mochitest/general/frameSelectEvents.html @@ -0,0 +1,929 @@ + + + + Testing Selection Events + + + + + +
+ A bunch of text in a span inside of a div which should be selected +
+ +
+ This is a random block of text +
+ +
+ + + + + + diff --git a/dom/tests/mochitest/general/frameStorageAllowed.html b/dom/tests/mochitest/general/frameStorageAllowed.html new file mode 100644 index 0000000000..bb96392398 --- /dev/null +++ b/dom/tests/mochitest/general/frameStorageAllowed.html @@ -0,0 +1,22 @@ + + +frame for storage allowed test + + + + + + + + + diff --git a/dom/tests/mochitest/general/frameStorageChrome.html b/dom/tests/mochitest/general/frameStorageChrome.html new file mode 100644 index 0000000000..51f4fa85e6 --- /dev/null +++ b/dom/tests/mochitest/general/frameStorageChrome.html @@ -0,0 +1,20 @@ + + +frame for storage allowed test + + + + + + + + + diff --git a/dom/tests/mochitest/general/frameStorageNullprincipal.sjs b/dom/tests/mochitest/general/frameStorageNullprincipal.sjs new file mode 100644 index 0000000000..7dfdc32d1e --- /dev/null +++ b/dom/tests/mochitest/general/frameStorageNullprincipal.sjs @@ -0,0 +1,40 @@ +// This is a sjs file which reads in frameStoragePrevented.html, and writes it out as a data: URI, which this page redirects to. +// This produces a URI with the null principal, which should be unable to access storage. +// We append the #nullprincipal hash to the end of the data: URI to tell the script that it shouldn't try to spawn a webworker, +// as it won't be allowed to, as it has a null principal. + +function handleRequest(request, response) { + // Get the nsIFile for frameStoragePrevented.html + var file; + getObjectState("SERVER_ROOT", function (serverRoot) { + file = serverRoot.getFile( + "/tests/dom/tests/mochitest/general/frameStoragePrevented.html" + ); + }); + + // Set up the file streams to read in the file as UTF-8 + let fstream = Components.classes[ + "@mozilla.org/network/file-input-stream;1" + ].createInstance(Components.interfaces.nsIFileInputStream); + fstream.init(file, -1, 0, 0); + let cstream = Components.classes[ + "@mozilla.org/intl/converter-input-stream;1" + ].createInstance(Components.interfaces.nsIConverterInputStream); + cstream.init(fstream, "UTF-8", 0, 0); + + // Read in the file, and concatenate it onto the data string + let data = ""; + let str = {}; + let read = 0; + do { + read = cstream.readString(0xffffffff, str); + data += str.value; + } while (read != 0); + + // Write out the file as a data: URI, and redirect to it + response.setStatusLine("1.1", 302, "Found"); + response.setHeader( + "Location", + "data:text/html," + encodeURIComponent(data) + "#nullprincipal" + ); +} diff --git a/dom/tests/mochitest/general/frameStoragePrevented.html b/dom/tests/mochitest/general/frameStoragePrevented.html new file mode 100644 index 0000000000..693beff5a4 --- /dev/null +++ b/dom/tests/mochitest/general/frameStoragePrevented.html @@ -0,0 +1,47 @@ + + + +frame for storage prevented test + + + + + + + + + diff --git a/dom/tests/mochitest/general/generateCss.sjs b/dom/tests/mochitest/general/generateCss.sjs new file mode 100644 index 0000000000..d6b4348aa3 --- /dev/null +++ b/dom/tests/mochitest/general/generateCss.sjs @@ -0,0 +1,42 @@ +function handleRequest(request, response) { + response.setHeader("Content-Type", "text/css", false); + response.write(gResponses[request.queryString]); +} + +let gResponses = { + // 1 + A: "@import 'generateCss.sjs?B';", + B: "", + + // 2 + C: "@import 'generateCss.sjs?D';", + D: "", + + // 3 + E: "@import 'generateCss.sjs?F';", + F: "", + + // 4 + G: "@import 'generateCss.sjs?H'; @import 'http://example.org/tests/dom/tests/mochitest/general/generateCss.sjs?K';", + H: "@import 'http://example.com/tests/dom/tests/mochitest/general/generateCss.sjs?I';", + I: "@import 'generateCss.sjs?J", + J: "", + K: "@import 'generateCss.sjs?L';", + L: "@import 'generateCss.sjs?M", + M: "", + + // 5 + N: ".c1 { background-image: -moz-image-rect(url('/image/test/mochitest/blue.png'), 0, 0, 200, 200);}", + + // 6 + O: ".c2 { background-image: url('/image/test/mochitest/red.png');}", + + // 7 + P: "@font-face { font-family: Ahem; src: url('/tests/dom/base/test/Ahem.ttf'); } .c3 { font-family: Ahem; font-size: 20px; }", + + // 8 + Q: ".c4 { cursor: url('/image/test/mochitest/over.png') 2 2, auto; } ", + + // 9 + R: "#image { mask: url('/tests/dom/base/test/file_use_counter_svg_fill_pattern_data.svg'); }", +}; diff --git a/dom/tests/mochitest/general/historyframes.html b/dom/tests/mochitest/general/historyframes.html new file mode 100644 index 0000000000..f0f7e934ae --- /dev/null +++ b/dom/tests/mochitest/general/historyframes.html @@ -0,0 +1,179 @@ + + + + + Test for Bug 602256 + + +Mozilla Bug 602256 +
+ +
+
+
+
+ + diff --git a/dom/tests/mochitest/general/image_100.png b/dom/tests/mochitest/general/image_100.png new file mode 100644 index 0000000000..df421453c2 Binary files /dev/null and b/dom/tests/mochitest/general/image_100.png differ diff --git a/dom/tests/mochitest/general/image_200.png b/dom/tests/mochitest/general/image_200.png new file mode 100644 index 0000000000..6f76d44387 Binary files /dev/null and b/dom/tests/mochitest/general/image_200.png differ diff --git a/dom/tests/mochitest/general/image_50.png b/dom/tests/mochitest/general/image_50.png new file mode 100644 index 0000000000..144a2f0b93 Binary files /dev/null and b/dom/tests/mochitest/general/image_50.png differ diff --git a/dom/tests/mochitest/general/importsSameAndCrossOrigin.css b/dom/tests/mochitest/general/importsSameAndCrossOrigin.css new file mode 100644 index 0000000000..69e239c063 --- /dev/null +++ b/dom/tests/mochitest/general/importsSameAndCrossOrigin.css @@ -0,0 +1,3 @@ +@import 'emptyCssFile2.css'; +@import url('http://example.org/tests/dom/tests/mochitest/general/emptyCssFile2.css'); + diff --git a/dom/tests/mochitest/general/mochitest.ini b/dom/tests/mochitest/general/mochitest.ini new file mode 100644 index 0000000000..1fe4ccbaec --- /dev/null +++ b/dom/tests/mochitest/general/mochitest.ini @@ -0,0 +1,182 @@ +[DEFAULT] +prefs = + dom.svg.pathSeg.enabled=false +support-files = + 497633.html + fail.png + file_bug628069.html + file_clonewrapper.html + file_domWindowUtils_scrollbarSize.html + file_frameElementWrapping.html + file_moving_nodeList.html + file_moving_xhr.html + file_resource_timing_nocors.html + generateCss.sjs + historyframes.html + start_historyframe.html + url1_historyframe.html + url2_historyframe.html + image_50.png + image_100.png + image_200.png + pass.apng + performance_timeline_main_test.html + resource_timing_iframe.html + resource_timing_main_test.html + resource_timing_cross_origin.html + res0.resource + res1.resource + res1.resource^headers^ + res2.resource + res2.resource^headers^ + res3.resource + res3.resource^headers^ + res4.resource + res4.resource^headers^ + res5.resource + res5.resource^headers^ + res6.resource + res6.resource^headers^ + res7.resource + res7.resource^headers^ + res8.resource + res8.resource^headers^ + resource_timing.js + navigation_timing.html + test_interfaces.js + frameStorageAllowed.html + frameStoragePrevented.html + frameStorageChrome.html + frameStorageNullprincipal.sjs + workerStorageAllowed.js + workerStoragePrevented.js + storagePermissionsUtils.js + window_storagePermissions.html + frameSelectEvents.html + !/image/test/mochitest/big.png + !/image/test/mochitest/blue.png + !/image/test/mochitest/clear.png + !/image/test/mochitest/damon.jpg + !/image/test/mochitest/over.png + !/image/test/mochitest/red.png + !/dom/base/test/Ahem.ttf + !/dom/base/test/file_empty.html + !/dom/base/test/file_use_counter_svg_fill_pattern_data.svg + resource_timing_location_navigate.html + resource_timing_meta_refresh.html + resource_timing_redirect.html + resource_timing_redirect.html^headers^ + embed_navigate.html + postback.html + +[test_497898.html] +[test_bug504220.html] +[test_bug628069_1.html] +[test_bug628069_2.html] +[test_bug631440.html] +[test_bug653364.html] +[test_bug861217.html] +[test_bug1161721.html] +[test_bug1170911.html] +[test_bug1208217.html] +[test_bug1313753.html] +[test_bug1434273.html] +[test_clientRects.html] +[test_clipboard_disallowed.html] +[test_clipboard_events.html] +support-files = window_clipboard_events.html +skip-if = headless # bug 1403542 +[test_consoleAPI.html] +[test_contentViewer_overrideDPPX.html] +[test_CCW_optimization.html] +[test_devicePixelRatio_with_zoom.html] +[test_DOMMatrix.html] +[test_domWindowUtils.html] +[test_domWindowUtils_scrollbarSize.html] +skip-if = + http3 +[test_domWindowUtils_scrollXY.html] +[test_donottrack.html] +[test_focus_scrollchildframe.html] +[test_focus_legend_noparent.html] +[test_for_of.html] +[test_framedhistoryframes.html] +skip-if = + http3 +[test_frameElementWrapping.html] +skip-if = + http3 +[test_img_mutations.html] +[test_interfaces.html] +skip-if = + http3 +[test_interfaces_secureContext.html] +scheme = https +[test_media_queries_with_zoom.html] +[test_navigation_timing.html] +[test_network_events.html] +skip-if = true +# Disable this test until bug 795711 is fixed. +[test_offsets.html] +support-files = test_offsets.js +[test_outerHTML.html] +[test_outerHTML.xhtml] +[test_paste_selection.html] +[test_performance_now.html] +[test_performance_timeline.html] +skip-if = + verify + http3 +[test_performance_nav_timing_before_onload.html] +[test_picture_apng.html] +[test_picture_mutations.html] +[test_pointerPreserves3D.html] +[test_pointerPreserves3DClip.html] +[test_pointerPreserves3DPerspective.html] +[test_resource_timing.html] +skip-if = + verify + http3 +[test_resource_timing_cross_origin.html] +skip-if = + http3 +[test_resource_timing_frameset.html] +skip-if = + http3 +[test_selectevents.html] +skip-if = toolkit == 'android' # bug 1627523 +[test_showModalDialog_removed.html] +[test_storagePermissionsAccept.html] +skip-if = + http3 +[test_storagePermissionsLimitForeign.html] +skip-if = + http3 +[test_storagePermissionsReject.html] +skip-if = + http3 +[test_storagePermissionsRejectForeign.html] +skip-if = + http3 +[test_stylesheetPI.html] +[test_toggling_performance_navigation_timing.html] +skip-if = + os == 'win' && bits == 64 && !debug # Bug 1730152 + os == 'mac' && bits == 64 && !debug # Bug 1730152 +[test_vibrator.html] +fail-if = xorigin +skip-if = + http3 +[test_WebKitCSSMatrix.html] +[test_windowedhistoryframes.html] +skip-if = + http3 +[test_windowProperties.html] +[test_resource_timing_nocors.html] +skip-if = + http3 +[test_resizeby.html] +skip-if = (toolkit == 'android') || (devedition && os == 'win' && bits == 32) || (os == 'linux' && bits == 64) # Window sizes cannot be controled on android; Windows: bug 1540554; Bug 1604152 +[test_resource_timing_cross_origin_navigate.html] +skip-if = + http3 diff --git a/dom/tests/mochitest/general/navigation_timing.html b/dom/tests/mochitest/general/navigation_timing.html new file mode 100644 index 0000000000..72ce60fb73 --- /dev/null +++ b/dom/tests/mochitest/general/navigation_timing.html @@ -0,0 +1,100 @@ + + + + + + + + + + + + + Bug #1099092 - Navigation Timing has incorrect values when page is load via link with target=_blank attribute + +

+ + diff --git a/dom/tests/mochitest/general/pass.apng b/dom/tests/mochitest/general/pass.apng new file mode 100644 index 0000000000..6e78a9eef4 Binary files /dev/null and b/dom/tests/mochitest/general/pass.apng differ diff --git a/dom/tests/mochitest/general/performance_timeline_main_test.html b/dom/tests/mochitest/general/performance_timeline_main_test.html new file mode 100644 index 0000000000..f8094998eb --- /dev/null +++ b/dom/tests/mochitest/general/performance_timeline_main_test.html @@ -0,0 +1,106 @@ + + + + + + + + + + + + Bug #1158731 - Buffer for Performance APIs (Resource Timing, User Timing) should be separeted + +

+
+ + + +
+ + diff --git a/dom/tests/mochitest/general/postback.html b/dom/tests/mochitest/general/postback.html new file mode 100644 index 0000000000..c45cf5ad34 --- /dev/null +++ b/dom/tests/mochitest/general/postback.html @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/dom/tests/mochitest/general/res0.resource b/dom/tests/mochitest/general/res0.resource new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dom/tests/mochitest/general/res1.resource b/dom/tests/mochitest/general/res1.resource new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dom/tests/mochitest/general/res1.resource^headers^ b/dom/tests/mochitest/general/res1.resource^headers^ new file mode 100644 index 0000000000..2e5d8ea17a --- /dev/null +++ b/dom/tests/mochitest/general/res1.resource^headers^ @@ -0,0 +1,2 @@ +HTTP 200 +Timing-Allow-Origin: * diff --git a/dom/tests/mochitest/general/res2.resource b/dom/tests/mochitest/general/res2.resource new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dom/tests/mochitest/general/res2.resource^headers^ b/dom/tests/mochitest/general/res2.resource^headers^ new file mode 100644 index 0000000000..f19c20d3ec --- /dev/null +++ b/dom/tests/mochitest/general/res2.resource^headers^ @@ -0,0 +1,2 @@ +HTTP 302 Moved +Location: http://test2.example.com/tests/image/test/mochitest/red.png diff --git a/dom/tests/mochitest/general/res3.resource b/dom/tests/mochitest/general/res3.resource new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dom/tests/mochitest/general/res3.resource^headers^ b/dom/tests/mochitest/general/res3.resource^headers^ new file mode 100644 index 0000000000..391a442227 --- /dev/null +++ b/dom/tests/mochitest/general/res3.resource^headers^ @@ -0,0 +1,2 @@ +HTTP 200 +Timing-Allow-Origin: http://mochi.test:8888 diff --git a/dom/tests/mochitest/general/res4.resource b/dom/tests/mochitest/general/res4.resource new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dom/tests/mochitest/general/res4.resource^headers^ b/dom/tests/mochitest/general/res4.resource^headers^ new file mode 100644 index 0000000000..fbf4a9de7f --- /dev/null +++ b/dom/tests/mochitest/general/res4.resource^headers^ @@ -0,0 +1,3 @@ +HTTP 302 Moved +Timing-Allow-Origin: * +Location: http://mochi.test:8888/tests/dom/tests/mochitest/general/res1.resource diff --git a/dom/tests/mochitest/general/res5.resource b/dom/tests/mochitest/general/res5.resource new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dom/tests/mochitest/general/res5.resource^headers^ b/dom/tests/mochitest/general/res5.resource^headers^ new file mode 100644 index 0000000000..1be24a555c --- /dev/null +++ b/dom/tests/mochitest/general/res5.resource^headers^ @@ -0,0 +1,2 @@ +HTTP 200 +Timing-Allow-Origin: http://mochi.test:8889 diff --git a/dom/tests/mochitest/general/res6.resource b/dom/tests/mochitest/general/res6.resource new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dom/tests/mochitest/general/res6.resource^headers^ b/dom/tests/mochitest/general/res6.resource^headers^ new file mode 100644 index 0000000000..4a570ae678 --- /dev/null +++ b/dom/tests/mochitest/general/res6.resource^headers^ @@ -0,0 +1,2 @@ +HTTP 200 +Timing-Allow-Origin: diff --git a/dom/tests/mochitest/general/res7.resource b/dom/tests/mochitest/general/res7.resource new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dom/tests/mochitest/general/res7.resource^headers^ b/dom/tests/mochitest/general/res7.resource^headers^ new file mode 100644 index 0000000000..d9bbf9462b --- /dev/null +++ b/dom/tests/mochitest/general/res7.resource^headers^ @@ -0,0 +1,2 @@ +HTTP 200 +Timing-Allow-Origin: http://mochi.test:8888 http://test1.com diff --git a/dom/tests/mochitest/general/res8.resource b/dom/tests/mochitest/general/res8.resource new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dom/tests/mochitest/general/res8.resource^headers^ b/dom/tests/mochitest/general/res8.resource^headers^ new file mode 100644 index 0000000000..21f490fd32 --- /dev/null +++ b/dom/tests/mochitest/general/res8.resource^headers^ @@ -0,0 +1,2 @@ +HTTP 302 Moved +Location: http://test1.example.com/tests/dom/tests/mochitest/general/res4.resource diff --git a/dom/tests/mochitest/general/resource_timing.js b/dom/tests/mochitest/general/resource_timing.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/dom/tests/mochitest/general/resource_timing_cross_origin.html b/dom/tests/mochitest/general/resource_timing_cross_origin.html new file mode 100644 index 0000000000..d608cdce9a --- /dev/null +++ b/dom/tests/mochitest/general/resource_timing_cross_origin.html @@ -0,0 +1,191 @@ + + + + + + + + + + + Bug #822480 - Add in the Resource Timing API + +

+
+ + + + + + + + + + + +
+ + + diff --git a/dom/tests/mochitest/general/resource_timing_iframe.html b/dom/tests/mochitest/general/resource_timing_iframe.html new file mode 100644 index 0000000000..2d50427d92 --- /dev/null +++ b/dom/tests/mochitest/general/resource_timing_iframe.html @@ -0,0 +1,50 @@ + + + + + + + + + Test for Bug 822480 - Add in the Resource Timing API + + + + + + + diff --git a/dom/tests/mochitest/general/resource_timing_location_navigate.html b/dom/tests/mochitest/general/resource_timing_location_navigate.html new file mode 100644 index 0000000000..94d0d0512e --- /dev/null +++ b/dom/tests/mochitest/general/resource_timing_location_navigate.html @@ -0,0 +1,3 @@ + diff --git a/dom/tests/mochitest/general/resource_timing_main_test.html b/dom/tests/mochitest/general/resource_timing_main_test.html new file mode 100644 index 0000000000..88b44f76dd --- /dev/null +++ b/dom/tests/mochitest/general/resource_timing_main_test.html @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + Bug #822480 - Add in the Resource Timing API + +

+
+ + + + +
+ + diff --git a/dom/tests/mochitest/general/resource_timing_meta_refresh.html b/dom/tests/mochitest/general/resource_timing_meta_refresh.html new file mode 100644 index 0000000000..dbbcd65413 --- /dev/null +++ b/dom/tests/mochitest/general/resource_timing_meta_refresh.html @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/dom/tests/mochitest/general/resource_timing_nocors.html b/dom/tests/mochitest/general/resource_timing_nocors.html new file mode 100644 index 0000000000..39b34950fc --- /dev/null +++ b/dom/tests/mochitest/general/resource_timing_nocors.html @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + Bug #1180145 - Resource Timing NO-CORS CSS + +

+
+
+ + diff --git a/dom/tests/mochitest/general/resource_timing_redirect.html b/dom/tests/mochitest/general/resource_timing_redirect.html new file mode 100644 index 0000000000..5417098d72 --- /dev/null +++ b/dom/tests/mochitest/general/resource_timing_redirect.html @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/dom/tests/mochitest/general/resource_timing_redirect.html^headers^ b/dom/tests/mochitest/general/resource_timing_redirect.html^headers^ new file mode 100644 index 0000000000..aed575c918 --- /dev/null +++ b/dom/tests/mochitest/general/resource_timing_redirect.html^headers^ @@ -0,0 +1,2 @@ +HTTP 302 Found +Location: https://example.org/tests/dom/tests/mochitest/general/postback.html diff --git a/dom/tests/mochitest/general/start_historyframe.html b/dom/tests/mochitest/general/start_historyframe.html new file mode 100644 index 0000000000..a791af4e64 --- /dev/null +++ b/dom/tests/mochitest/general/start_historyframe.html @@ -0,0 +1 @@ +

Start

diff --git a/dom/tests/mochitest/general/storagePermissionsUtils.js b/dom/tests/mochitest/general/storagePermissionsUtils.js new file mode 100644 index 0000000000..d4a7190c82 --- /dev/null +++ b/dom/tests/mochitest/general/storagePermissionsUtils.js @@ -0,0 +1,282 @@ +const BEHAVIOR_ACCEPT = 0; +const BEHAVIOR_REJECT_FOREIGN = 1; +const BEHAVIOR_REJECT = 2; +const BEHAVIOR_LIMIT_FOREIGN = 3; + +const kPrefName = "network.cookie.cookieBehavior"; + +// Check if we are in frame, and declare ok and finishTest appropriately +const inFrame = ("" + location).match(/frame/); +if (inFrame) { + ok = function (a, message) { + if (!a) { + parent.postMessage("FAILURE: " + message, "http://mochi.test:8888"); + } else { + parent.postMessage(message, "http://mochi.test:8888"); + } + }; + + finishTest = function () { + parent.postMessage("done", "http://mochi.test:8888"); + }; +} else { + finishTest = function () { + SimpleTest.finish(); + }; +} + +function setCookieBehavior(behavior) { + return SpecialPowers.pushPrefEnv({ set: [[kPrefName, behavior]] }); +} + +function runIFrame(url) { + return new Promise((resolve, reject) => { + function onMessage(e) { + if (e.data == "done") { + resolve(); + window.removeEventListener("message", onMessage); + return; + } + + ok(!e.data.match(/^FAILURE/), e.data + " (IFRAME = " + url + ")"); + } + window.addEventListener("message", onMessage); + + document.querySelector("iframe").src = url; + }); +} + +function runWorker(url) { + return new Promise((resolve, reject) => { + var worker = new Worker(url); + worker.addEventListener("message", function (e) { + if (e.data == "done") { + resolve(); + return; + } + + ok(!e.data.match(/^FAILURE/), e.data + " (WORKER = " + url + ")"); + }); + }); +} + +function chromePower(allowed, blockSessionStorage) { + // localStorage is affected by storage policy. + try { + SpecialPowers.wrap(window).localStorage.getItem("X"); + ok(allowed, "getting localStorage from chrome didn't throw"); + } catch (e) { + ok(!allowed, "getting localStorage from chrome threw"); + } + + // sessionStorage is not. See bug 1183968. + try { + SpecialPowers.wrap(window).sessionStorage.getItem("X"); + ok(!blockSessionStorage, "getting sessionStorage from chrome didn't throw"); + } catch (e) { + ok(blockSessionStorage, "getting sessionStorage from chrome threw"); + } + + // indexedDB is affected by storage policy. + try { + SpecialPowers.wrap(window).indexedDB; + ok(allowed, "getting indexedDB from chrome didn't throw"); + } catch (e) { + ok(!allowed, "getting indexedDB from chrome threw"); + } + + // Same with caches, along with the additional https-only requirement. + try { + var shouldResolve = allowed && location.protocol == "https:"; + var promise = SpecialPowers.wrap(window).caches.keys(); + ok(true, "getting caches from chrome should never throw"); + return new Promise((resolve, reject) => { + promise.then( + function () { + ok(shouldResolve, "The promise was resolved for chrome"); + resolve(); + }, + function (e) { + ok(!shouldResolve, "The promise was rejected for chrome: " + e); + resolve(); + } + ); + }); + } catch (e) { + ok(false, "getting caches from chrome threw"); + } +} + +function storageAllowed() { + try { + localStorage.getItem("X"); + ok(true, "getting localStorage didn't throw"); + } catch (e) { + ok(false, "getting localStorage should not throw"); + } + + try { + sessionStorage.getItem("X"); + ok(true, "getting sessionStorage didn't throw"); + } catch (e) { + ok(false, "getting sessionStorage should not throw"); + } + + try { + indexedDB; + ok(true, "getting indexedDB didn't throw"); + } catch (e) { + ok(false, "getting indexedDB should not throw"); + } + + try { + var promise = caches.keys(); + ok(true, "getting caches didn't throw"); + + return new Promise((resolve, reject) => { + promise.then( + function () { + ok(location.protocol == "https:", "The promise was not rejected"); + resolve(); + }, + function () { + ok( + location.protocol !== "https:", + "The promise should not have been rejected" + ); + resolve(); + } + ); + }); + } catch (e) { + ok(location.protocol !== "https:", "getting caches should not have thrown"); + return Promise.resolve(); + } +} + +function storagePrevented() { + try { + localStorage.getItem("X"); + ok(false, "getting localStorage should have thrown"); + } catch (e) { + ok(true, "getting localStorage threw"); + } + + if (location.hash == "#thirdparty") { + // No matter what the user's preferences are, we don't block + // sessionStorage in 3rd-party iframes. We do block them everywhere + // else however. + try { + sessionStorage.getItem("X"); + ok(true, "getting sessionStorage didn't throw"); + } catch (e) { + ok(false, "getting sessionStorage should not have thrown"); + } + } else { + try { + sessionStorage.getItem("X"); + ok(false, "getting sessionStorage should have thrown"); + } catch (e) { + ok(true, "getting sessionStorage threw"); + } + } + + try { + indexedDB; + ok(false, "getting indexedDB should have thrown"); + } catch (e) { + ok(true, "getting indexedDB threw"); + } + + try { + var promise = caches.keys(); + ok(true, "getting caches didn't throw"); + + return new Promise((resolve, reject) => { + promise.then( + function () { + ok(false, "The promise should have rejected"); + resolve(); + }, + function () { + ok(true, "The promise was rejected"); + resolve(); + } + ); + }); + } catch (e) { + ok(location.protocol !== "https:", "getting caches should not have thrown"); + + return Promise.resolve(); + } +} + +function task(fn) { + if (!inFrame) { + SimpleTest.waitForExplicitFinish(); + } + + var gen = fn(); + + function next_step(val, e) { + var it; + try { + if (typeof e !== "undefined") { + it = gen.throw(e); + } else { + it = gen.next(val); + } + } catch (e) { + ok(false, "An error was thrown while stepping: " + e); + ok(false, "Stack: " + e.stack); + finishTest(); + } + + if (it.done) { + finishTest(); + return; + } + it.value.then(next_step, e => next_step(null, e)); + } + + if (!gen.then) { + next_step(); + } else { + gen.then(finishTest, e => { + ok(false, "An error was thrown while stepping: " + e); + ok(false, "Stack: " + e.stack); + finishTest(); + }); + } +} + +// The test will run on a separate window in order to apply the new cookie jar settings. +async function runTestInWindow(test) { + let w = window.open("window_storagePermissions.html"); + await new Promise(resolve => { + w.onload = e => { + resolve(); + }; + }); + + await new Promise(resolve => { + onmessage = e => { + if (e.data.type == "finish") { + w.close(); + resolve(); + return; + } + + if (e.data.type == "check") { + ok(e.data.test, e.data.msg); + return; + } + + ok(false, "Unknown message"); + }; + + w.postMessage(test.toString(), "*"); + }); +} + +var thirdparty = "https://example.com/tests/dom/tests/mochitest/general/"; diff --git a/dom/tests/mochitest/general/test-data.json b/dom/tests/mochitest/general/test-data.json new file mode 100644 index 0000000000..797ab7a9dc --- /dev/null +++ b/dom/tests/mochitest/general/test-data.json @@ -0,0 +1 @@ +{ "id": "test JSON data", "myArray": ["foo", "bar", "baz", "biff"] } diff --git a/dom/tests/mochitest/general/test-data2.json b/dom/tests/mochitest/general/test-data2.json new file mode 100644 index 0000000000..797ab7a9dc --- /dev/null +++ b/dom/tests/mochitest/general/test-data2.json @@ -0,0 +1 @@ +{ "id": "test JSON data", "myArray": ["foo", "bar", "baz", "biff"] } diff --git a/dom/tests/mochitest/general/test_497898.html b/dom/tests/mochitest/general/test_497898.html new file mode 100644 index 0000000000..c26c67af86 --- /dev/null +++ b/dom/tests/mochitest/general/test_497898.html @@ -0,0 +1,41 @@ + + +Crash [@ nsFocusManager::SendFocusOrBlurEvent] after switching focus to a different window in this case + + + + + + + +

+ + + + + diff --git a/dom/tests/mochitest/general/test_CCW_optimization.html b/dom/tests/mochitest/general/test_CCW_optimization.html new file mode 100644 index 0000000000..ca3a2e096c --- /dev/null +++ b/dom/tests/mochitest/general/test_CCW_optimization.html @@ -0,0 +1,50 @@ + + + + + Test for Bug 1319087 + + + + + +Mozilla Bug 1319087 +

+
+ + +
+
+
+
+
diff --git a/dom/tests/mochitest/general/test_DOMMatrix.html b/dom/tests/mochitest/general/test_DOMMatrix.html
new file mode 100644
index 0000000000..81bf68d71c
--- /dev/null
+++ b/dom/tests/mochitest/general/test_DOMMatrix.html
@@ -0,0 +1,717 @@
+
+
+
+  Test DOMMatrix behavior
+  
+  
+
+
+
+ + diff --git a/dom/tests/mochitest/general/test_WebKitCSSMatrix.html b/dom/tests/mochitest/general/test_WebKitCSSMatrix.html new file mode 100644 index 0000000000..690a7d2c63 --- /dev/null +++ b/dom/tests/mochitest/general/test_WebKitCSSMatrix.html @@ -0,0 +1,339 @@ + + +Test for WebKitCSSMatrix + + +
+ diff --git a/dom/tests/mochitest/general/test_bug1161721.html b/dom/tests/mochitest/general/test_bug1161721.html new file mode 100644 index 0000000000..ab609bf046 --- /dev/null +++ b/dom/tests/mochitest/general/test_bug1161721.html @@ -0,0 +1,32 @@ + + + + + Test for Bug 1161721 + + + + + + +Mozilla Bug 1161721 +

+ +
+
+ +
+  
+
+ + diff --git a/dom/tests/mochitest/general/test_bug1170911.html b/dom/tests/mochitest/general/test_bug1170911.html new file mode 100644 index 0000000000..af0e71576f --- /dev/null +++ b/dom/tests/mochitest/general/test_bug1170911.html @@ -0,0 +1,90 @@ + + + + + Test for Bug 1170911 + + + + + + +Mozilla Bug 1170911 +

+ +
+ +
+ +
+
+
+ + diff --git a/dom/tests/mochitest/general/test_bug1208217.html b/dom/tests/mochitest/general/test_bug1208217.html new file mode 100644 index 0000000000..1f76ba34de --- /dev/null +++ b/dom/tests/mochitest/general/test_bug1208217.html @@ -0,0 +1,31 @@ + + + + + Test for Bug 1208217 + + + + + +Mozilla Bug 1208217 + + + diff --git a/dom/tests/mochitest/general/test_bug1313753.html b/dom/tests/mochitest/general/test_bug1313753.html new file mode 100644 index 0000000000..e684f29136 --- /dev/null +++ b/dom/tests/mochitest/general/test_bug1313753.html @@ -0,0 +1,63 @@ + + +Test for bug 1313753 + +
+ + + +
+
+
+
+
    +
  • +
    +
    +
    +
  • +
+
+
+
+
diff --git a/dom/tests/mochitest/general/test_bug1434273.html b/dom/tests/mochitest/general/test_bug1434273.html new file mode 100644 index 0000000000..89556d1a0d --- /dev/null +++ b/dom/tests/mochitest/general/test_bug1434273.html @@ -0,0 +1,36 @@ + + + + + + Test for Bug 1434273 + + + + + + + +Mozilla Bug 1434273 +

+ +
+
+ + diff --git a/dom/tests/mochitest/general/test_bug504220.html b/dom/tests/mochitest/general/test_bug504220.html new file mode 100644 index 0000000000..7223c67d91 --- /dev/null +++ b/dom/tests/mochitest/general/test_bug504220.html @@ -0,0 +1,65 @@ + + + + + Test for Bug 504220 + + + + + +Mozilla Bug 504220 +

+
+ + +
+
+
+
+ + diff --git a/dom/tests/mochitest/general/test_bug628069_1.html b/dom/tests/mochitest/general/test_bug628069_1.html new file mode 100644 index 0000000000..fef2307a45 --- /dev/null +++ b/dom/tests/mochitest/general/test_bug628069_1.html @@ -0,0 +1,50 @@ + + + + + Test for Bug 628069 + + + + + +Mozilla Bug 628069 +

+
+ + +
+
+
+
+
diff --git a/dom/tests/mochitest/general/test_bug628069_2.html b/dom/tests/mochitest/general/test_bug628069_2.html
new file mode 100644
index 0000000000..e9c5b623eb
--- /dev/null
+++ b/dom/tests/mochitest/general/test_bug628069_2.html
@@ -0,0 +1,41 @@
+
+
+
+
+  Test for Bug 628069
+  
+  
+  
+
+
+Mozilla Bug 628069
+

+
+ + +
+
+
+
+
diff --git a/dom/tests/mochitest/general/test_bug631440.html b/dom/tests/mochitest/general/test_bug631440.html
new file mode 100644
index 0000000000..8228a0af99
--- /dev/null
+++ b/dom/tests/mochitest/general/test_bug631440.html
@@ -0,0 +1,39 @@
+
+
+
+
+  Test for Bug 631440
+  
+  
+
+
+Mozilla Bug 631440
+

+ +
+
+
+ + diff --git a/dom/tests/mochitest/general/test_bug653364.html b/dom/tests/mochitest/general/test_bug653364.html new file mode 100644 index 0000000000..2db81254eb --- /dev/null +++ b/dom/tests/mochitest/general/test_bug653364.html @@ -0,0 +1,39 @@ + + + + + Test for Bug 653364 + + + + + +Mozilla Bug 653364 +

+
+ + +
+
+
+
+
diff --git a/dom/tests/mochitest/general/test_bug861217.html b/dom/tests/mochitest/general/test_bug861217.html
new file mode 100644
index 0000000000..1af3f58ff6
--- /dev/null
+++ b/dom/tests/mochitest/general/test_bug861217.html
@@ -0,0 +1,115 @@
+
+
+
+
+  Test for Bug 861217
+  
+  
+
+
+Mozilla Bug 861217
+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
1
2
3
4
5
6
7
8
+ +
+
+
+
+ + diff --git a/dom/tests/mochitest/general/test_clientRects.html b/dom/tests/mochitest/general/test_clientRects.html new file mode 100644 index 0000000000..bcfe1ee909 --- /dev/null +++ b/dom/tests/mochitest/general/test_clientRects.html @@ -0,0 +1,127 @@ + + + + Tests for getClientRects/getBoundingClientRect + + + + + + + + +
+ +
+
+
+
+
+
+ + + +
+
+
+ + + +
+
+ + +
+ +
+
+
+ +
+
+
+
+
+ +
+ + + + + + + + + + +

+ + + + diff --git a/dom/tests/mochitest/general/test_clipboard_disallowed.html b/dom/tests/mochitest/general/test_clipboard_disallowed.html new file mode 100644 index 0000000000..ce331ee253 --- /dev/null +++ b/dom/tests/mochitest/general/test_clipboard_disallowed.html @@ -0,0 +1,69 @@ + + + + Test for Clipboard Events + + + + + + +

+ + + diff --git a/dom/tests/mochitest/general/test_clipboard_events.html b/dom/tests/mochitest/general/test_clipboard_events.html new file mode 100644 index 0000000000..aa99010b89 --- /dev/null +++ b/dom/tests/mochitest/general/test_clipboard_events.html @@ -0,0 +1,37 @@ + + + + Test for Clipboard Events + + + + +

+ + + diff --git a/dom/tests/mochitest/general/test_consoleAPI.html b/dom/tests/mochitest/general/test_consoleAPI.html new file mode 100644 index 0000000000..506fc7f160 --- /dev/null +++ b/dom/tests/mochitest/general/test_consoleAPI.html @@ -0,0 +1,66 @@ + + + + window.console test + + + + + + + + +

+ + + diff --git a/dom/tests/mochitest/general/test_contentViewer_overrideDPPX.html b/dom/tests/mochitest/general/test_contentViewer_overrideDPPX.html new file mode 100644 index 0000000000..af3f46b81b --- /dev/null +++ b/dom/tests/mochitest/general/test_contentViewer_overrideDPPX.html @@ -0,0 +1,428 @@ + + + + nsIContentViewer::overrideDPPX test + + + + + + + + + + + + + + diff --git a/dom/tests/mochitest/general/test_devicePixelRatio_with_zoom.html b/dom/tests/mochitest/general/test_devicePixelRatio_with_zoom.html new file mode 100644 index 0000000000..710af8fe43 --- /dev/null +++ b/dom/tests/mochitest/general/test_devicePixelRatio_with_zoom.html @@ -0,0 +1,84 @@ + + + + DevicePixelRatios with Zoom + + + + + + +
Testing devicePixelRatio with different zoom levels
+ + + + + diff --git a/dom/tests/mochitest/general/test_domWindowUtils.html b/dom/tests/mochitest/general/test_domWindowUtils.html new file mode 100644 index 0000000000..2b0bcc9086 --- /dev/null +++ b/dom/tests/mochitest/general/test_domWindowUtils.html @@ -0,0 +1,183 @@ + + + + Test nsIDOMWindowUtils + + + + + + + + +
+
+ + + +

+ + + diff --git a/dom/tests/mochitest/general/test_domWindowUtils_scrollXY.html b/dom/tests/mochitest/general/test_domWindowUtils_scrollXY.html new file mode 100644 index 0000000000..6bf29f46e4 --- /dev/null +++ b/dom/tests/mochitest/general/test_domWindowUtils_scrollXY.html @@ -0,0 +1,90 @@ + + + + nsIDOMWindowUtils::elementFromPoint test + + + + + + + + + + + + + +

+ + + diff --git a/dom/tests/mochitest/general/test_domWindowUtils_scrollbarSize.html b/dom/tests/mochitest/general/test_domWindowUtils_scrollbarSize.html new file mode 100644 index 0000000000..2822a5d93c --- /dev/null +++ b/dom/tests/mochitest/general/test_domWindowUtils_scrollbarSize.html @@ -0,0 +1,65 @@ + + + + nsIDOMWindowUtils::getScrollbarSize test + + + + + + + + + + + diff --git a/dom/tests/mochitest/general/test_donottrack.html b/dom/tests/mochitest/general/test_donottrack.html new file mode 100644 index 0000000000..84bd383a1d --- /dev/null +++ b/dom/tests/mochitest/general/test_donottrack.html @@ -0,0 +1,72 @@ + + + + + Test for Bug 629535 + + + + +Mozilla Bug 629535 + + + + + + diff --git a/dom/tests/mochitest/general/test_focus_legend_noparent.html b/dom/tests/mochitest/general/test_focus_legend_noparent.html new file mode 100644 index 0000000000..99bc9d9f22 --- /dev/null +++ b/dom/tests/mochitest/general/test_focus_legend_noparent.html @@ -0,0 +1,36 @@ + + + + + + + +

+ + + + diff --git a/dom/tests/mochitest/general/test_focus_scrollchildframe.html b/dom/tests/mochitest/general/test_focus_scrollchildframe.html new file mode 100644 index 0000000000..91688a13a7 --- /dev/null +++ b/dom/tests/mochitest/general/test_focus_scrollchildframe.html @@ -0,0 +1,24 @@ + + + + Tests for for-of loops + + + + + +

+ + +
+ + diff --git a/dom/tests/mochitest/general/test_focusrings.xhtml b/dom/tests/mochitest/general/test_focusrings.xhtml new file mode 100644 index 0000000000..38882ad99c --- /dev/null +++ b/dom/tests/mochitest/general/test_focusrings.xhtml @@ -0,0 +1,217 @@ + + + + + + + + + + +* { outline: none; } +#b3:focus-visible { outline: auto } +#l1:focus-visible, #l3:focus-visible, #b1:focus-visible { outline: 2px solid red; } +#l2:focus, #b2:focus { outline: 2px solid red; } + + + + + + + +
+ + + diff --git a/dom/tests/mochitest/general/test_performance_nav_timing_before_onload.html b/dom/tests/mochitest/general/test_performance_nav_timing_before_onload.html new file mode 100644 index 0000000000..af85a6edab --- /dev/null +++ b/dom/tests/mochitest/general/test_performance_nav_timing_before_onload.html @@ -0,0 +1,30 @@ + + + + + + + Test for Bug 1405961 - Using PerformanceNavigationTiming before onload + + + + +
+ + + diff --git a/dom/tests/mochitest/general/test_performance_now.html b/dom/tests/mochitest/general/test_performance_now.html new file mode 100644 index 0000000000..23f5f45969 --- /dev/null +++ b/dom/tests/mochitest/general/test_performance_now.html @@ -0,0 +1,60 @@ + + + + Test for High Resolution Timer + + + + + + + + diff --git a/dom/tests/mochitest/general/test_performance_timeline.html b/dom/tests/mochitest/general/test_performance_timeline.html new file mode 100644 index 0000000000..e0ec357ab7 --- /dev/null +++ b/dom/tests/mochitest/general/test_performance_timeline.html @@ -0,0 +1,35 @@ + + + + + + + + + + +
+
+
+ + + diff --git a/dom/tests/mochitest/general/test_picture_apng.html b/dom/tests/mochitest/general/test_picture_apng.html new file mode 100644 index 0000000000..8fc37c04c2 --- /dev/null +++ b/dom/tests/mochitest/general/test_picture_apng.html @@ -0,0 +1,77 @@ + + + + + + Image srcset mutations + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dom/tests/mochitest/general/test_picture_mutations.html b/dom/tests/mochitest/general/test_picture_mutations.html new file mode 100644 index 0000000000..b311ffc8a2 --- /dev/null +++ b/dom/tests/mochitest/general/test_picture_mutations.html @@ -0,0 +1,311 @@ + + + + + Image srcset mutations + + + + + + + diff --git a/dom/tests/mochitest/general/test_pointerPreserves3D.html b/dom/tests/mochitest/general/test_pointerPreserves3D.html new file mode 100644 index 0000000000..d99403002d --- /dev/null +++ b/dom/tests/mochitest/general/test_pointerPreserves3D.html @@ -0,0 +1,25 @@ + + + + Test for pointer events with preserve-3d + + + + +
+
+
+
+
+
+
+ + + diff --git a/dom/tests/mochitest/general/test_pointerPreserves3DClip.html b/dom/tests/mochitest/general/test_pointerPreserves3DClip.html new file mode 100644 index 0000000000..82f64f5969 --- /dev/null +++ b/dom/tests/mochitest/general/test_pointerPreserves3DClip.html @@ -0,0 +1,55 @@ + + + + Test for pointer events with preserve-3d and clips + + + + + +
+
+
+
+
+
+
+
+ + + diff --git a/dom/tests/mochitest/general/test_pointerPreserves3DPerspective.html b/dom/tests/mochitest/general/test_pointerPreserves3DPerspective.html new file mode 100644 index 0000000000..4feaf03551 --- /dev/null +++ b/dom/tests/mochitest/general/test_pointerPreserves3DPerspective.html @@ -0,0 +1,29 @@ + + + + Test for pointer events with preserve-3d + + + + +
+
+
+
+
+
+
+
+
+ + + diff --git a/dom/tests/mochitest/general/test_resizeby.html b/dom/tests/mochitest/general/test_resizeby.html new file mode 100644 index 0000000000..4826e538a0 --- /dev/null +++ b/dom/tests/mochitest/general/test_resizeby.html @@ -0,0 +1,64 @@ + + + + Test for Bug 1369627 + + + + + + + +Mozilla Bug 1369627 +

+
+ +
+
+
+ + + + diff --git a/dom/tests/mochitest/general/test_resource_timing.html b/dom/tests/mochitest/general/test_resource_timing.html new file mode 100644 index 0000000000..4b45d69941 --- /dev/null +++ b/dom/tests/mochitest/general/test_resource_timing.html @@ -0,0 +1,40 @@ + + + + + + + + + + + +
+
+
+ + + diff --git a/dom/tests/mochitest/general/test_resource_timing_cross_origin.html b/dom/tests/mochitest/general/test_resource_timing_cross_origin.html new file mode 100644 index 0000000000..bef092abde --- /dev/null +++ b/dom/tests/mochitest/general/test_resource_timing_cross_origin.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +
+
+
+ + + Bug #936814 - Implement the "timing allow check algorithm" for cross-origin Resource Timing + + + + diff --git a/dom/tests/mochitest/general/test_resource_timing_cross_origin_navigate.html b/dom/tests/mochitest/general/test_resource_timing_cross_origin_navigate.html new file mode 100644 index 0000000000..133e9a0c8a --- /dev/null +++ b/dom/tests/mochitest/general/test_resource_timing_cross_origin_navigate.html @@ -0,0 +1,73 @@ + + + + + + + + + + + +
+
+
+ + + Bug #1789128 - Cross-Origin URL Steal is possible using performance.getEntries() + + + + + + + + + + + diff --git a/dom/tests/mochitest/general/test_resource_timing_frameset.html b/dom/tests/mochitest/general/test_resource_timing_frameset.html new file mode 100644 index 0000000000..245bd382ee --- /dev/null +++ b/dom/tests/mochitest/general/test_resource_timing_frameset.html @@ -0,0 +1,29 @@ + + + + + + + browser_frametree_sample_frameset.html + + + + + + + + + + diff --git a/dom/tests/mochitest/general/test_resource_timing_nocors.html b/dom/tests/mochitest/general/test_resource_timing_nocors.html new file mode 100644 index 0000000000..388b8f9837 --- /dev/null +++ b/dom/tests/mochitest/general/test_resource_timing_nocors.html @@ -0,0 +1,37 @@ + + + + + + + + + + + +
+
+
+ + + diff --git a/dom/tests/mochitest/general/test_selectevents.html b/dom/tests/mochitest/general/test_selectevents.html new file mode 100644 index 0000000000..bcc3526492 --- /dev/null +++ b/dom/tests/mochitest/general/test_selectevents.html @@ -0,0 +1,31 @@ + + + + Testing Selection Events + + + + + + + + + + diff --git a/dom/tests/mochitest/general/test_showModalDialog_removed.html b/dom/tests/mochitest/general/test_showModalDialog_removed.html new file mode 100644 index 0000000000..a5f85ffc8e --- /dev/null +++ b/dom/tests/mochitest/general/test_showModalDialog_removed.html @@ -0,0 +1,31 @@ + + + + + Test for showModalDialog unavailability in e10s + + + + + +Mozilla Bug 1077002 +

+
+ + +
+
+
+
+ + diff --git a/dom/tests/mochitest/general/test_spacetopagedown.html b/dom/tests/mochitest/general/test_spacetopagedown.html new file mode 100644 index 0000000000..39b02bc0fa --- /dev/null +++ b/dom/tests/mochitest/general/test_spacetopagedown.html @@ -0,0 +1,75 @@ + + + + + + + + + + +Checkbox + +

Text

+ +

+ +
+
+ + diff --git a/dom/tests/mochitest/general/test_storagePermissionsAccept.html b/dom/tests/mochitest/general/test_storagePermissionsAccept.html new file mode 100644 index 0000000000..ddb33de9c3 --- /dev/null +++ b/dom/tests/mochitest/general/test_storagePermissionsAccept.html @@ -0,0 +1,44 @@ + + + Storage Permission Restrictions + + + + + + + + + + + diff --git a/dom/tests/mochitest/general/test_storagePermissionsLimitForeign.html b/dom/tests/mochitest/general/test_storagePermissionsLimitForeign.html new file mode 100644 index 0000000000..e2b4b93798 --- /dev/null +++ b/dom/tests/mochitest/general/test_storagePermissionsLimitForeign.html @@ -0,0 +1,46 @@ + + + Storage Permission Restrictions + + + + + + + + + + + diff --git a/dom/tests/mochitest/general/test_storagePermissionsReject.html b/dom/tests/mochitest/general/test_storagePermissionsReject.html new file mode 100644 index 0000000000..70dbe856d9 --- /dev/null +++ b/dom/tests/mochitest/general/test_storagePermissionsReject.html @@ -0,0 +1,44 @@ + + + Storage Permission Restrictions + + + + + + + + + + + diff --git a/dom/tests/mochitest/general/test_storagePermissionsRejectForeign.html b/dom/tests/mochitest/general/test_storagePermissionsRejectForeign.html new file mode 100644 index 0000000000..f188d46cb2 --- /dev/null +++ b/dom/tests/mochitest/general/test_storagePermissionsRejectForeign.html @@ -0,0 +1,44 @@ + + + Storage Permission Restrictions + + + + + + + + + + + diff --git a/dom/tests/mochitest/general/test_stylesheetPI.html b/dom/tests/mochitest/general/test_stylesheetPI.html new file mode 100644 index 0000000000..2b242597d2 --- /dev/null +++ b/dom/tests/mochitest/general/test_stylesheetPI.html @@ -0,0 +1,37 @@ + + + + + + Test for Bug 836809 + + + + + +Mozilla Bug 836809 +

+ +
+
+ + diff --git a/dom/tests/mochitest/general/test_toggling_performance_navigation_timing.html b/dom/tests/mochitest/general/test_toggling_performance_navigation_timing.html new file mode 100644 index 0000000000..6e6d94dca7 --- /dev/null +++ b/dom/tests/mochitest/general/test_toggling_performance_navigation_timing.html @@ -0,0 +1,47 @@ + + + + + Test for Bug 1511941 - Don't expose PerformanceNavigationTiming when it is disabled + + + + +
+ + + diff --git a/dom/tests/mochitest/general/test_vibrator.html b/dom/tests/mochitest/general/test_vibrator.html new file mode 100644 index 0000000000..e7085fc987 --- /dev/null +++ b/dom/tests/mochitest/general/test_vibrator.html @@ -0,0 +1,148 @@ + + + + Test for Vibrator + + + + + + + + + + diff --git a/dom/tests/mochitest/general/test_windowProperties.html b/dom/tests/mochitest/general/test_windowProperties.html new file mode 100644 index 0000000000..3fe4c9ee9e --- /dev/null +++ b/dom/tests/mochitest/general/test_windowProperties.html @@ -0,0 +1,28 @@ + + + + Test that all window properties are accessible to nonprivileged code + + + + + + + + +

+ + + diff --git a/dom/tests/mochitest/general/test_windowedhistoryframes.html b/dom/tests/mochitest/general/test_windowedhistoryframes.html new file mode 100644 index 0000000000..c2c148b838 --- /dev/null +++ b/dom/tests/mochitest/general/test_windowedhistoryframes.html @@ -0,0 +1,32 @@ + + + + + Test for Bug 602256 + + + + +Mozilla Bug 602256 +

+ +
+
+
+ + diff --git a/dom/tests/mochitest/general/url1_historyframe.html b/dom/tests/mochitest/general/url1_historyframe.html new file mode 100644 index 0000000000..b86af4b3fa --- /dev/null +++ b/dom/tests/mochitest/general/url1_historyframe.html @@ -0,0 +1 @@ +

Test1

diff --git a/dom/tests/mochitest/general/url2_historyframe.html b/dom/tests/mochitest/general/url2_historyframe.html new file mode 100644 index 0000000000..24374d1a5b --- /dev/null +++ b/dom/tests/mochitest/general/url2_historyframe.html @@ -0,0 +1 @@ +

Test2

diff --git a/dom/tests/mochitest/general/window_clipboard_events.html b/dom/tests/mochitest/general/window_clipboard_events.html new file mode 100644 index 0000000000..ee88cc5fa0 --- /dev/null +++ b/dom/tests/mochitest/general/window_clipboard_events.html @@ -0,0 +1,1239 @@ + + + + + Test for Clipboard Events + + + + + +

+
CONTENT TEXT
+ + + +
Spot
+ +
+ +
+
+
+ + diff --git a/dom/tests/mochitest/general/window_storagePermissions.html b/dom/tests/mochitest/general/window_storagePermissions.html new file mode 100644 index 0000000000..3bab23c13b --- /dev/null +++ b/dom/tests/mochitest/general/window_storagePermissions.html @@ -0,0 +1,38 @@ + + + Storage Permission Restrictions + + + + + + + + diff --git a/dom/tests/mochitest/general/workerStorageAllowed.js b/dom/tests/mochitest/general/workerStorageAllowed.js new file mode 100644 index 0000000000..89e0a4b9ce --- /dev/null +++ b/dom/tests/mochitest/general/workerStorageAllowed.js @@ -0,0 +1,78 @@ +// Unfortunately, workers can't share the code from storagePermissionsUtils. +// These are basic mechanisms for communicating to the test runner. + +function ok(condition, text) { + if (!condition) { + self.postMessage("FAILURE: " + text); + } else { + self.postMessage(text); + } +} + +function finishTest() { + self.postMessage("done"); + self.close(); +} + +// Workers don't have access to localstorage or sessionstorage +ok(typeof self.localStorage == "undefined", "localStorage should be undefined"); +ok( + typeof self.sessionStorage == "undefined", + "sessionStorage should be undefined" +); + +// Make sure that we can access indexedDB +try { + indexedDB; + ok(true, "WORKER getting indexedDB didn't throw"); +} catch (e) { + ok(false, "WORKER getting indexedDB should not throw"); +} + +// Make sure that we can access caches +try { + var promise = caches.keys(); + ok(true, "WORKER getting caches didn't throw"); + + promise.then( + function () { + ok(location.protocol == "https:", "WORKER The promise was not rejected"); + workerTest(); + }, + function () { + ok( + location.protocol !== "https:", + "WORKER The promise should not have been rejected" + ); + workerTest(); + } + ); +} catch (e) { + ok( + location.protocol !== "https:", + "WORKER getting caches should not have thrown" + ); + workerTest(); +} + +// Try to spawn an inner worker, and make sure that it can also access storage +function workerTest() { + if (location.hash == "#inner") { + // Don't recurse infinitely, if we are the inner worker, don't spawn another + finishTest(); + return; + } + // Create the inner worker, and listen for test messages from it + var worker = new Worker("workerStorageAllowed.js#inner"); + worker.addEventListener("message", function (e) { + if (e.data == "done") { + finishTest(); + return; + } + + ok( + !e.data.match(/^FAILURE/), + e.data + " (WORKER = workerStorageAllowed.js#inner)" + ); + }); +} diff --git a/dom/tests/mochitest/general/workerStoragePrevented.js b/dom/tests/mochitest/general/workerStoragePrevented.js new file mode 100644 index 0000000000..467cc09113 --- /dev/null +++ b/dom/tests/mochitest/general/workerStoragePrevented.js @@ -0,0 +1,75 @@ +// Unfortunately, workers can't share the code from storagePermissionsUtils. +// These are basic mechanisms for communicating to the test runner. + +function ok(condition, text) { + if (!condition) { + self.postMessage("FAILURE: " + text); + } else { + self.postMessage(text); + } +} + +function finishTest() { + self.postMessage("done"); + self.close(); +} + +// Workers don't have access to localstorage or sessionstorage +ok(typeof self.localStorage == "undefined", "localStorage should be undefined"); +ok( + typeof self.sessionStorage == "undefined", + "sessionStorage should be undefined" +); + +// Make sure that we can't access indexedDB +try { + indexedDB; + ok(false, "WORKER getting indexedDB should have thrown"); +} catch (e) { + ok(true, "WORKER getting indexedDB threw"); +} + +// Make sure that we can't access caches +try { + var promise = caches.keys(); + ok(true, "WORKER getting caches didn't throw"); + + promise.then( + function () { + ok(false, "WORKER The promise should have rejected"); + workerTest(); + }, + function () { + ok(true, "WORKER The promise was rejected"); + workerTest(); + } + ); +} catch (e) { + ok( + location.protocol !== "https:", + "WORKER getting caches should not have thrown" + ); + workerTest(); +} + +// Try to spawn an inner worker, and make sure that it also can't access storage +function workerTest() { + if (location.hash == "#inner") { + // Don't recurse infinitely, if we are the inner worker, don't spawn another + finishTest(); + return; + } + // Create the inner worker, and listen for test messages from it + var worker = new Worker("workerStoragePrevented.js#inner"); + worker.addEventListener("message", function (e) { + if (e.data == "done") { + finishTest(); + return; + } + + ok( + !e.data.match(/^FAILURE/), + e.data + " (WORKER = workerStoragePrevented.js#inner)" + ); + }); +} -- cgit v1.2.3