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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Node-baseURI.html

Issue 1533653002: Import the baseURI test from web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « third_party/WebKit/LayoutTests/W3CImportExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Node-baseURI.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Node-baseURI.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Node-baseURI.html
new file mode 100644
index 0000000000000000000000000000000000000000..8ead65b14635c6699a8095cf17d51fb6d44ae5db
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Node-baseURI.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Node.baseURI</title>
+<script src="../../../../resources/testharness.js"></script>
+<script src="../../../../resources/testharnessreport.js"></script>
+<div id="log"></div>
+<script>
+test(function() {
+ var element = document.createElement("div");
+ document.body.appendChild(element);
+ assert_equals(element.baseURI, document.URL);
+}, "For elements belonging to document, baseURI should be document url")
+
+test(function() {
+ var element = document.createElement("div");
+ assert_equals(element.baseURI, document.URL);
+}, "For elements unassigned to document, baseURI should be document url")
+
+test(function() {
+ var fragment = document.createDocumentFragment();
+ var element = document.createElement("div");
+ fragment.appendChild(element);
+ assert_equals(element.baseURI, document.URL)
+}, "For elements belonging to document fragments, baseURI should be document url")
+
+test(function() {
+ var fragment = document.createDocumentFragment();
+ var element = document.createElement("div");
+ fragment.appendChild(element);
+ document.body.appendChild(fragment);
+ assert_equals(element.baseURI, document.URL)
+}, "After inserting fragment into document, element baseURI should be document url")
+</script>
« no previous file with comments | « third_party/WebKit/LayoutTests/W3CImportExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698