Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | <!doctype html> |
michael@0 | 2 | <!-- |
michael@0 | 3 | https://bugzilla.mozilla.org/show_bug.cgi?id=738440 |
michael@0 | 4 | --> |
michael@0 | 5 | <title>Test for Bug 738440</title> |
michael@0 | 6 | <script src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 7 | <link rel="stylesheet" href="/tests/SimpleTest/test.css" /> |
michael@0 | 8 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=738440">Mozilla Bug 738440</a> |
michael@0 | 9 | <div contenteditable></div> |
michael@0 | 10 | <script> |
michael@0 | 11 | |
michael@0 | 12 | /** Test for Bug 738440 **/ |
michael@0 | 13 | document.execCommand("stylewithcss", false, "true"); |
michael@0 | 14 | is(document.queryCommandState("stylewithcss"), true, |
michael@0 | 15 | "setting stylewithcss to true should cause its state to be true"); |
michael@0 | 16 | is(document.queryCommandState("usecss"), false, |
michael@0 | 17 | "usecss state should always be false"); |
michael@0 | 18 | |
michael@0 | 19 | document.execCommand("stylewithcss", false, "false"); |
michael@0 | 20 | is(document.queryCommandState("stylewithcss"), false, |
michael@0 | 21 | "setting stylewithcss to false should cause its state to be false"); |
michael@0 | 22 | is(document.queryCommandState("usecss"), false, |
michael@0 | 23 | "usecss state should always be false"); |
michael@0 | 24 | |
michael@0 | 25 | document.execCommand("usecss", false, "true"); |
michael@0 | 26 | is(document.queryCommandState("stylewithcss"), false, |
michael@0 | 27 | "setting usecss to true should cause stylewithcss state to be false"); |
michael@0 | 28 | is(document.queryCommandState("usecss"), false, |
michael@0 | 29 | "usecss state should always be false"); |
michael@0 | 30 | |
michael@0 | 31 | document.execCommand("usecss", false, "false"); |
michael@0 | 32 | is(document.queryCommandState("stylewithcss"), true, |
michael@0 | 33 | "setting usecss to false should cause stylewithcss state to be true"); |
michael@0 | 34 | is(document.queryCommandState("usecss"), false, |
michael@0 | 35 | "usecss state should always be false"); |
michael@0 | 36 | |
michael@0 | 37 | </script> |