Closed Bug 1366181 Opened 7 years ago Closed 7 years ago

rewrite dom/base/test/test_title.html and dom/base/test/chrome/test_title.xul

Categories

(Core :: DOM: Security, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: allstars.chh, Assigned: ckerschb)

References

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file, 2 obsolete files)

There are some tests cannot replace data:text/html with srcdoc, need to check why.
Status: NEW → ASSIGNED
Priority: -- → P2
Summary: rewrite dom/base/test/test_title.html → rewrite dom/base/test/test_title.html and dom/base/test/chrome/test_title.xul
Assignee: allstars.chh → ckerschb
Attached patch bug_1366181_test_title.patch (obsolete) — Splinter Review
Smaug, this patch is going to fix two tests:
a) dom/base/test/test_title.html
It seems the iframe 'xul2' was not in use, hence I only changed 'xul1' to load from an external file but kept 'xul2' using the data: URI.

b) dom/base/test/chrome/title_window.xul
Very similar to (a), but you can't set the title on a xul page that didn't load, hence we also have to remove the second sub-test from xul2.
Attachment #8869360 - Attachment is obsolete: true
Attachment #8894859 - Flags: review?(bugs)
Comment on attachment 8894859 [details] [diff] [review]
bug_1366181_test_title.patch


>+      testStatic("xul2", "Problem loading page", "XUL2 <window> title attribute");
Please explain this

>           function(doc, desc) {
>-            is(doc.documentElement.getAttribute("title"), "Hello", desc);
>-            is(doc.documentElement.firstChild, null, desc);
>+            is(doc.documentElement.getAttribute("title"), null, desc);
Why you remove the firstChild check? Why getAttribute returns null?

>   testStatic("html1", "Test", "HTML <title>");
>   testStatic("html2", "Test", "choose the first HTML <title>");
>   testStatic("html3", "", "No title");
>   testStatic("xhtml1", "Test", "XHTML <title> in body");
>   testStatic("xhtml2", "Test", "XHTML <title> as root element");
>   testStatic("xhtml3", "Test", "XHTML <title> containing an element");
>-  testStatic("xul1", "Test", "XUL <window> title attribute");
>+  testStatic("xul1", "Test", "XUL1 <window> title attribute");
>+  testStatic("xul2", "Problem loading page", "XUL2 <window> title attribute");
Why this xul2 test?

r+ assuming you answer to my questions.
Attachment #8894859 - Flags: review?(bugs) → review+
I looked the test over again and in order to get the exact same testing behavior xul2 should also load the external xul file. Then nothing needs to be changed within the test which is definitely what we want. thanks smaug.
Attachment #8894859 - Attachment is obsolete: true
Attachment #8895291 - Flags: review+
Pushed by mozilla@christophkerschbaumer.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ec16e8357305
Convert test_title.html and test_title.xul to comply with new data: URI inheritance model. r=smaug
https://hg.mozilla.org/mozilla-central/rev/ec16e8357305
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: