Changeset 212178 in webkit
- Timestamp:
- Feb 10, 2017 8:40:38 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r212172 r212178 1 2017-02-10 Chris Dumez <cdumez@apple.com> 2 3 document.origin doesn't match spec 4 https://bugs.webkit.org/show_bug.cgi?id=168022 5 6 Reviewed by Sam Weinig. 7 8 * http/tests/media/media-stream/enumerate-devices-source-id-persistent.html: 9 Fix test that was passing only because the document.origin would never match the 10 expected string: 11 - Move idCounts to the global scope has the handler function is called 3 times 12 and we need to properly update the same idCounts object in all 3 calls. 13 - Fix initialization of idCounts to start at 1, not 0. Otherwise, idCounts[uniqueID] 14 is 0 instead of 1. 15 - Use a Map instead of an array since the ids are UUID strings, not integers. 16 - Fix check for non-unique ids, was idCounts[deviceId] == 1 instead of 17 idCounts[deviceId] != 1. 18 19 * http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/form-upgrade.html: 20 * http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https.html: 21 * http/tests/ssl/iframe-upgrade.https.html: 22 Update / rebaseline now that document.origin has the right format. 23 1 24 2017-02-10 Simon Fraser <simon.fraser@apple.com> 2 25 -
trunk/LayoutTests/http/tests/media/media-stream/enumerate-devices-source-id-persistent.html
r209082 r212178 8 8 <script> 9 9 var frameInfos = []; 10 var idCounts = new Map(); 10 11 window.jsTestIsAsync = true; 11 12 … … 23 24 function handler(event) 24 25 { 25 var idCounts = [];26 27 26 event.data.deviceIds.forEach(function(id) { 28 27 frameInfos.push({origin : event.data.origin, deviceId : id}); 29 idCounts[id] = idCounts[id] === undefined ? 0 : ++idCounts[id]; 28 if (idCounts.has(id)) 29 idCounts.set(id, idCounts.get(id) + 1); 30 else 31 idCounts.set(id, 1); 30 32 }); 31 33 … … 37 39 var deviceId = frameInfos[i].deviceId; 38 40 if (frameInfos[i].origin.indexOf("http://localhost:8000") == 0) { 39 if (idCounts [deviceId]< 2) {41 if (idCounts.get(deviceId) < 2) { 40 42 testFailed(`: device ID in ${frameInfos[i].origin} is unique`); 41 43 success = false; 42 44 } 43 45 } else { 44 if (idCounts [deviceId] == 1) {46 if (idCounts.get(deviceId) != 1) { 45 47 testFailed(`: device ID in ${frameInfos[i].origin} is not unique`); 46 48 success = false; -
trunk/LayoutTests/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/form-upgrade.html
r201753 r212178 15 15 window.addEventListener('message', t.step_func(e => { 16 16 if (e.source == iframe.contentWindow) { 17 assert_equals("https _127.0.0.1_8443", e.data.origin);17 assert_equals("https://127.0.0.1:8443", e.data.origin); 18 18 t.done(); 19 19 } … … 31 31 window.addEventListener('message', t.step_func(e => { 32 32 if (e.source == iframe.contentWindow) { 33 assert_equals( e.data.origin, "https_localhost_8443");33 assert_equals("https://localhost:8443", e.data.origin); 34 34 t.done(); 35 35 } -
trunk/LayoutTests/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https.html
r201753 r212178 18 18 window.addEventListener('message', t.step_func(e => { 19 19 if (e.source == iframe.contentWindow) { 20 assert_equals( e.data.origin, "https_127.0.0.1_8443");20 assert_equals("https://127.0.0.1:8443", e.data.origin); 21 21 t.done(); 22 22 } … … 32 32 window.addEventListener('message', t.step_func(e => { 33 33 if (e.source == iframe.contentWindow) { 34 assert_equals( e.data.origin, "https_localhost_8443");34 assert_equals("https://localhost:8443", e.data.origin); 35 35 t.done(); 36 36 } … … 47 47 window.addEventListener('message', t.step_func(e => { 48 48 if (e.source == iframe.contentWindow) { 49 assert_equals( e.data.origin, "http_localhost_8000");49 assert_equals("http://localhost:8000", e.data.origin); 50 50 t.done(); 51 51 } -
trunk/LayoutTests/http/tests/ssl/iframe-upgrade.https.html
r201753 r212178 18 18 window.addEventListener('message', t.step_func(e => { 19 19 if (e.source == iframe.contentWindow) { 20 assert_equals( e.data.origin, "https_127.0.0.1_8443");20 assert_equals("https://127.0.0.1:8443", e.data.origin); 21 21 t.done(); 22 22 } … … 32 32 window.addEventListener('message', t.step_func(e => { 33 33 if (e.source == iframe.contentWindow) { 34 assert_equals( e.data.origin, "https_localhost_8443");34 assert_equals("https://localhost:8443", e.data.origin); 35 35 t.done(); 36 36 } … … 47 47 window.addEventListener('message', t.step_func(e => { 48 48 if (e.source == iframe.contentWindow) { 49 assert_equals( e.data.origin, "https_127.0.0.1_8443");49 assert_equals("https://127.0.0.1:8443", e.data.origin); 50 50 t.done(); 51 51 } -
trunk/LayoutTests/imported/w3c/ChangeLog
r212162 r212178 1 2017-02-10 Chris Dumez <cdumez@apple.com> 2 3 document.origin doesn't match spec 4 https://bugs.webkit.org/show_bug.cgi?id=168022 5 6 Reviewed by Sam Weinig. 7 8 Rebaseline test now that document.origin has the right format. 9 10 * web-platform-tests/dom/nodes/Node-cloneNode-expected.txt: 11 1 12 2017-02-10 Youenn Fablet <youenn@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-cloneNode-expected.txt
r210823 r212178 130 130 PASS createProcessingInstruction 131 131 PASS implementation.createDocumentType 132 FAIL implementation.createDocument assert_equals: expected "null" but got "http _localhost_8800"132 FAIL implementation.createDocument assert_equals: expected "null" but got "http://localhost:8800" 133 133 PASS implementation.createHTMLDocument 134 134 PASS node with children -
trunk/Source/WebCore/ChangeLog
r212174 r212178 1 2017-02-10 Chris Dumez <cdumez@apple.com> 2 3 document.origin doesn't match spec 4 https://bugs.webkit.org/show_bug.cgi?id=168022 5 6 Reviewed by Sam Weinig. 7 8 Update document.origin to return the origin in the expected format: 9 - https://dom.spec.whatwg.org/#dom-document-origin 10 11 Change: "https_webkit.org_0 -> "https://webkit.org". 12 13 The new behavior matches Firefox and Chrome. 14 15 No new tests, updated existing tests. 16 17 * dom/Document.cpp: 18 (WebCore::Document::origin): 19 1 20 2017-02-10 Daniel Bates <dabates@apple.com> 2 21 -
trunk/Source/WebCore/dom/Document.cpp
r212174 r212178 4289 4289 String Document::origin() const 4290 4290 { 4291 return SecurityOriginData::fromSecurityOrigin(securityOrigin()).databaseIdentifier();4291 return securityOrigin().toString(); 4292 4292 } 4293 4293
Note: See TracChangeset
for help on using the changeset viewer.