mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Core: re-introduce createHTMLDocument in parseHTML; Safari 8 left out
Close gh-1505
This commit is contained in:
@@ -235,7 +235,7 @@ test( "globalEval execution after script injection (#7862)", 1, function() {
|
||||
});
|
||||
|
||||
// This is not run in AMD mode
|
||||
if (jQuery.noConflict) {
|
||||
if ( jQuery.noConflict ) {
|
||||
test("noConflict", function() {
|
||||
expect(7);
|
||||
|
||||
@@ -1370,6 +1370,22 @@ test("jQuery.parseHTML", function() {
|
||||
ok( jQuery.parseHTML("<#if><tr><p>This is a test.</p></tr><#/if>") || true, "Garbage input should not cause error" );
|
||||
});
|
||||
|
||||
if ( jQuery.support.createHTMLDocument ) {
|
||||
asyncTest("jQuery.parseHTML", function() {
|
||||
expect ( 1 );
|
||||
|
||||
Globals.register("parseHTMLError");
|
||||
|
||||
jQuery.globalEval("parseHTMLError = false;");
|
||||
jQuery.parseHTML( "<img src=x onerror='parseHTMLError = true'>" );
|
||||
|
||||
window.setTimeout(function() {
|
||||
start();
|
||||
equal( window.parseHTMLError, false, "onerror eventhandler has not been called." );
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
test("jQuery.parseJSON", function() {
|
||||
expect( 20 );
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"checkOn": true,
|
||||
"clearCloneStyle": true,
|
||||
"cors": true,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": true,
|
||||
@@ -77,6 +78,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"checkOn": true,
|
||||
"clearCloneStyle": false,
|
||||
"cors": true,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": true,
|
||||
"noCloneChecked": false,
|
||||
"optDisabled": true,
|
||||
@@ -93,6 +95,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"checkOn": true,
|
||||
"clearCloneStyle": false,
|
||||
"cors": false,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": true,
|
||||
"noCloneChecked": false,
|
||||
"optDisabled": true,
|
||||
@@ -101,7 +104,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"radioValue": false,
|
||||
"reliableMarginRight": true
|
||||
};
|
||||
} else if ( /(6|7|8)\.0(\.\d+|) safari/i.test( userAgent ) ) {
|
||||
} else if ( /(6|7)\.0(\.\d+|) safari/i.test( userAgent ) ) {
|
||||
expected = {
|
||||
"ajax": true,
|
||||
"boxSizingReliable": true,
|
||||
@@ -109,6 +112,24 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"checkOn": true,
|
||||
"clearCloneStyle": true,
|
||||
"cors": true,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": true,
|
||||
"optSelected": true,
|
||||
"pixelPosition": false,
|
||||
"radioValue": true,
|
||||
"reliableMarginRight": true
|
||||
};
|
||||
} else if ( /8.0(\.\d+|) safari/i.test( userAgent ) ) {
|
||||
expected = {
|
||||
"ajax": true,
|
||||
"boxSizingReliable": true,
|
||||
"checkClone": true,
|
||||
"checkOn": true,
|
||||
"clearCloneStyle": true,
|
||||
"cors": true,
|
||||
"createHTMLDocument": false,
|
||||
"focusinBubbles": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": true,
|
||||
@@ -125,6 +146,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"checkOn": true,
|
||||
"clearCloneStyle": true,
|
||||
"cors": true,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": true,
|
||||
@@ -141,6 +163,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"checkOn": true,
|
||||
"clearCloneStyle": true,
|
||||
"cors": true,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": true,
|
||||
@@ -157,6 +180,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"checkOn": false,
|
||||
"clearCloneStyle": true,
|
||||
"cors": true,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": true,
|
||||
@@ -173,6 +197,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
|
||||
"checkOn": false,
|
||||
"clearCloneStyle": false,
|
||||
"cors": true,
|
||||
"createHTMLDocument": true,
|
||||
"focusinBubbles": false,
|
||||
"noCloneChecked": true,
|
||||
"optDisabled": false,
|
||||
|
||||
Reference in New Issue
Block a user