Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-weird.html

Issue 2614953003: Import wpt@eeecf3e14368d4ab5221cde688003dedeca30dba (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-weird.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-weird.html b/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-weird.html
new file mode 100644
index 0000000000000000000000000000000000000000..b7cac5e3c59b5066c8aea9f592eee57346d632b1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-weird.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<title>Set location.protocol from an HTTP URL</title>
+<!-- In particular, valid non-broken schemes that are nevertheless not going to work -->
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<div id=log></div>
+<iframe src=/common/blank.html></iframe>
+<iframe src=/common/blank.html></iframe>
+<iframe src=/common/blank.html></iframe>
+<iframe src=/common/blank.html></iframe>
+<iframe src=/common/blank.html></iframe>
+<iframe src=/common/blank.html></iframe>
+<script>
+self.onload = () => {
+ [
+ 'x',
+ 'data',
+ 'file',
+ 'ftp',
+ 'gopher',
+ 'http+x'
+ ].forEach((val, index) => {
+ async_test((t) => {
+ self[index].location.protocol = val
+ t.step_timeout(() => {
+ assert_equals(self[index].location.protocol, location.protocol)
+ assert_equals(self[index].location.host, location.host)
+ assert_equals(self[index].location.port, location.port)
+ t.done()
+ }, 500)
+ }, "Set location.protocol to " + val)
+ })
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698