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

Unified Diff: LayoutTests/fast/dom/document-set-title-mutations.html

Issue 128603002: Inhibit title update when removing children before setting new value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/document-set-title-mutations-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/document-set-title-mutations.html
diff --git a/LayoutTests/fast/dom/document-set-title-mutations.html b/LayoutTests/fast/dom/document-set-title-mutations.html
new file mode 100644
index 0000000000000000000000000000000000000000..c8f1be28ee6efe2f235ab0f6d63d86fb8d5320ff
--- /dev/null
+++ b/LayoutTests/fast/dom/document-set-title-mutations.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<title>old</title>
+<script src="../../resources/js-test.js"></script>
+<script>
+ window.jsTestIsAsync = true;
+ description("Test for mutations to childList when setting document.title.");
+ var mutations;
+ function finish() {
+ shouldBe('mutations.length', '1');
+ shouldBe('mutations[0].type', '"childList"');
+ shouldBe('mutations[0].addedNodes.length', '1');
+ shouldBe('mutations[0].removedNodes.length', '1');
+ finishJSTest();
+ }
+
+ var titleElement = document.querySelector('title');
+ var i = 0;
+
+ var observer = new MutationObserver(function(mutations) {
+ window.mutations = mutations;
+ });
+ observer.observe(titleElement, { childList: true });
+ document.title = "new";
+
+ setTimeout(finish, 0);
+</script>
+<body>
+</body>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/document-set-title-mutations-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698