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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/custom-elements/resources/document-types.js

Issue 2408203002: Reland of Import wpt@357b83b809e3cbc7a1805e7c3ca108a7980d782f (Closed)
Patch Set: Expect failure sometimes for pointerevent_element_haspointercapture-manual.html since it failed on … Created 4 years, 2 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
Index: third_party/WebKit/LayoutTests/imported/wpt/custom-elements/resources/document-types.js
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/resources/document-types.js b/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/resources/document-types.js
deleted file mode 100644
index 55284d5b132d0a4402663ec049571e6168c9abff..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/resources/document-types.js
+++ /dev/null
@@ -1,83 +0,0 @@
-const DocumentTypes = [
- {
- name: 'document',
- create: function () { return Promise.resolve(document); },
- isOwner: true,
- hasBrowsingContext: true,
- },
- {
- name: 'document of a template element',
- create: function () {
- return new Promise(function (resolve) {
- var template = document.createElementNS('http://www.w3.org/1999/xhtml', 'template');
- var doc = template.content.ownerDocument;
- if (!doc.documentElement)
- doc.appendChild(doc.createElement('html'));
- resolve(doc);
- });
- },
- hasBrowsingContext: false,
- },
- {
- name: 'new document',
- create: function () {
- return new Promise(function (resolve) {
- var doc = new Document();
- doc.appendChild(doc.createElement('html'));
- resolve(doc);
- });
- },
- hasBrowsingContext: false,
- },
- {
- name: 'cloned document',
- create: function () {
- return new Promise(function (resolve) {
- var doc = document.cloneNode(false);
- doc.appendChild(doc.createElement('html'));
- resolve(doc);
- });
- },
- hasBrowsingContext: false,
- },
- {
- name: 'document created by createHTMLDocument',
- create: function () {
- return Promise.resolve(document.implementation.createHTMLDocument());
- },
- hasBrowsingContext: false,
- },
- {
- name: 'HTML document created by createDocument',
- create: function () {
- return Promise.resolve(document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html', null));
- },
- hasBrowsingContext: false,
- },
- {
- name: 'document in an iframe',
- create: function () {
- return new Promise(function (resolve, reject) {
- var iframe = document.createElement('iframe');
- iframe.onload = function () { resolve(iframe.contentDocument); }
- iframe.onerror = function () { reject('Failed to load an empty iframe'); }
- document.body.appendChild(iframe);
- });
- },
- hasBrowsingContext: true,
- },
- {
- name: 'HTML document fetched by XHR',
- create: function () {
- return new Promise(function (resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open('GET', 'resources/empty-html-document.html');
- xhr.overrideMimeType('text/xml');
- xhr.onload = function () { resolve(xhr.responseXML); }
- xhr.onerror = function () { reject('Failed to fetch the document'); }
- xhr.send();
- });
- },
- hasBrowsingContext: false,
- }
-];

Powered by Google App Engine
This is Rietveld 408576698