Changeset 199650 in webkit
- Timestamp:
- Apr 17, 2016 11:06:42 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 9 added
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r199641 r199650 1 2016-04-17 Yoav Weiss <yoav@yoav.ws> 2 3 Initial Link preload support 4 https://bugs.webkit.org/show_bug.cgi?id=156334 5 6 Added tests that make sure that `<link rel=preload>` performs its basic 7 tasks and preloads resources. 8 9 Reviewed by Darin Adler. 10 11 * http/tests/preload/download_resources-expected.txt: Added. 12 * http/tests/preload/download_resources.html: Added. 13 * http/tests/preload/dynamic_adding_preload-expected.txt: Added. 14 * http/tests/preload/dynamic_adding_preload.html: Added. 15 * http/tests/preload/dynamic_remove_preload_href-expected.txt: Added. 16 * http/tests/preload/dynamic_remove_preload_href.html: Added. 17 * http/tests/preload/dynamic_removing_preload-expected.txt: Added. 18 * http/tests/preload/dynamic_removing_preload.html: Added. 19 * imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt: Adjusted expected results to progressions. 20 * imported/w3c/web-platform-tests/html/dom/reflection-metadata-expected.txt: Adjusted expected results to progressions. 21 * platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt: Adjusted expected results to progressions. 22 1 23 2016-04-17 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 24 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
r198893 r199650 1367 1367 PASS HTMLLinkElement interface: existence and properties of interface prototype object's "constructor" property 1368 1368 PASS HTMLLinkElement interface: attribute href 1369 FAIL HTMLLinkElement interface: attribute crossOrigin assert_true: The prototype object must have a property "crossOrigin" expected true got false 1369 PASS HTMLLinkElement interface: attribute crossOrigin 1370 1370 PASS HTMLLinkElement interface: attribute rel 1371 1371 PASS HTMLLinkElement interface: attribute relList … … 1380 1380 PASS Stringification of document.createElement("link") 1381 1381 PASS HTMLLinkElement interface: document.createElement("link") must inherit property "href" with the proper type (0) 1382 FAIL HTMLLinkElement interface: document.createElement("link") must inherit property "crossOrigin" with the proper type (1) assert_inherits: property "crossOrigin" not found in prototype chain 1382 PASS HTMLLinkElement interface: document.createElement("link") must inherit property "crossOrigin" with the proper type (1) 1383 1383 PASS HTMLLinkElement interface: document.createElement("link") must inherit property "rel" with the proper type (2) 1384 1384 PASS HTMLLinkElement interface: document.createElement("link") must inherit property "relList" with the proper type (3) -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-metadata-expected.txt
r197726 r199650 3052 3052 PASS link.href: IDL set to object "test-valueOf" followed by getAttribute() 3053 3053 PASS link.href: IDL set to object "test-valueOf" followed by IDL get 3054 FAIL link.crossOrigin: typeof IDL attribute assert_equals: expected "string" but got " undefined"3055 FAIL link.crossOrigin: IDL get with DOM attribute unset assert_equals: expected (string) "" but got ( undefined) undefined3054 FAIL link.crossOrigin: typeof IDL attribute assert_equals: expected "string" but got "object" 3055 FAIL link.crossOrigin: IDL get with DOM attribute unset assert_equals: expected (string) "" but got (object) null 3056 3056 PASS link.crossOrigin: setAttribute() to "" followed by getAttribute() 3057 FAIL link.crossOrigin: setAttribute() to "" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3057 PASS link.crossOrigin: setAttribute() to "" followed by IDL get 3058 3058 PASS link.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute() 3059 FAIL link.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3059 PASS link.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get 3060 3060 PASS link.crossOrigin: setAttribute() to undefined followed by getAttribute() 3061 FAIL link.crossOrigin: setAttribute() to undefined followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3061 PASS link.crossOrigin: setAttribute() to undefined followed by IDL get 3062 3062 PASS link.crossOrigin: setAttribute() to 7 followed by getAttribute() 3063 FAIL link.crossOrigin: setAttribute() to 7 followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3063 PASS link.crossOrigin: setAttribute() to 7 followed by IDL get 3064 3064 PASS link.crossOrigin: setAttribute() to 1.5 followed by getAttribute() 3065 FAIL link.crossOrigin: setAttribute() to 1.5 followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3065 PASS link.crossOrigin: setAttribute() to 1.5 followed by IDL get 3066 3066 PASS link.crossOrigin: setAttribute() to true followed by getAttribute() 3067 FAIL link.crossOrigin: setAttribute() to true followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3067 PASS link.crossOrigin: setAttribute() to true followed by IDL get 3068 3068 PASS link.crossOrigin: setAttribute() to false followed by getAttribute() 3069 FAIL link.crossOrigin: setAttribute() to false followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3069 PASS link.crossOrigin: setAttribute() to false followed by IDL get 3070 3070 PASS link.crossOrigin: setAttribute() to object "[object Object]" followed by getAttribute() 3071 FAIL link.crossOrigin: setAttribute() to object "[object Object]" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3071 PASS link.crossOrigin: setAttribute() to object "[object Object]" followed by IDL get 3072 3072 PASS link.crossOrigin: setAttribute() to NaN followed by getAttribute() 3073 FAIL link.crossOrigin: setAttribute() to NaN followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3073 PASS link.crossOrigin: setAttribute() to NaN followed by IDL get 3074 3074 PASS link.crossOrigin: setAttribute() to Infinity followed by getAttribute() 3075 FAIL link.crossOrigin: setAttribute() to Infinity followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3075 PASS link.crossOrigin: setAttribute() to Infinity followed by IDL get 3076 3076 PASS link.crossOrigin: setAttribute() to -Infinity followed by getAttribute() 3077 FAIL link.crossOrigin: setAttribute() to -Infinity followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3077 PASS link.crossOrigin: setAttribute() to -Infinity followed by IDL get 3078 3078 PASS link.crossOrigin: setAttribute() to "\0" followed by getAttribute() 3079 FAIL link.crossOrigin: setAttribute() to "\0" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3079 PASS link.crossOrigin: setAttribute() to "\0" followed by IDL get 3080 3080 PASS link.crossOrigin: setAttribute() to null followed by getAttribute() 3081 FAIL link.crossOrigin: setAttribute() to null followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3081 PASS link.crossOrigin: setAttribute() to null followed by IDL get 3082 3082 PASS link.crossOrigin: setAttribute() to object "test-toString" followed by getAttribute() 3083 FAIL link.crossOrigin: setAttribute() to object "test-toString" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3083 PASS link.crossOrigin: setAttribute() to object "test-toString" followed by IDL get 3084 3084 PASS link.crossOrigin: setAttribute() to object "test-valueOf" followed by getAttribute() 3085 FAIL link.crossOrigin: setAttribute() to object "test-valueOf" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3085 PASS link.crossOrigin: setAttribute() to object "test-valueOf" followed by IDL get 3086 3086 PASS link.crossOrigin: setAttribute() to "anonymous" followed by getAttribute() 3087 FAIL link.crossOrigin: setAttribute() to "anonymous" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3087 PASS link.crossOrigin: setAttribute() to "anonymous" followed by IDL get 3088 3088 PASS link.crossOrigin: setAttribute() to "xanonymous" followed by getAttribute() 3089 FAIL link.crossOrigin: setAttribute() to "xanonymous" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3089 PASS link.crossOrigin: setAttribute() to "xanonymous" followed by IDL get 3090 3090 PASS link.crossOrigin: setAttribute() to "anonymous\0" followed by getAttribute() 3091 FAIL link.crossOrigin: setAttribute() to "anonymous\0" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3091 PASS link.crossOrigin: setAttribute() to "anonymous\0" followed by IDL get 3092 3092 PASS link.crossOrigin: setAttribute() to "nonymous" followed by getAttribute() 3093 FAIL link.crossOrigin: setAttribute() to "nonymous" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3093 PASS link.crossOrigin: setAttribute() to "nonymous" followed by IDL get 3094 3094 PASS link.crossOrigin: setAttribute() to "ANONYMOUS" followed by getAttribute() 3095 FAIL link.crossOrigin: setAttribute() to "ANONYMOUS" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3095 PASS link.crossOrigin: setAttribute() to "ANONYMOUS" followed by IDL get 3096 3096 PASS link.crossOrigin: setAttribute() to "use-credentials" followed by getAttribute() 3097 FAIL link.crossOrigin: setAttribute() to "use-credentials" followed by IDL get assert_equals: expected (string) "use-credentials" but got (undefined) undefined 3097 PASS link.crossOrigin: setAttribute() to "use-credentials" followed by IDL get 3098 3098 PASS link.crossOrigin: setAttribute() to "xuse-credentials" followed by getAttribute() 3099 FAIL link.crossOrigin: setAttribute() to "xuse-credentials" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3099 PASS link.crossOrigin: setAttribute() to "xuse-credentials" followed by IDL get 3100 3100 PASS link.crossOrigin: setAttribute() to "use-credentials\0" followed by getAttribute() 3101 FAIL link.crossOrigin: setAttribute() to "use-credentials\0" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3101 PASS link.crossOrigin: setAttribute() to "use-credentials\0" followed by IDL get 3102 3102 PASS link.crossOrigin: setAttribute() to "se-credentials" followed by getAttribute() 3103 FAIL link.crossOrigin: setAttribute() to "se-credentials" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined 3103 PASS link.crossOrigin: setAttribute() to "se-credentials" followed by IDL get 3104 3104 PASS link.crossOrigin: setAttribute() to "USE-CREDENTIALS" followed by getAttribute() 3105 FAIL link.crossOrigin: setAttribute() to "USE-CREDENTIALS" followed by IDL get assert_equals: expected (string) "use-credentials" but got (undefined) undefined 3105 PASS link.crossOrigin: setAttribute() to "USE-CREDENTIALS" followed by IDL get 3106 3106 PASS link.crossOrigin: IDL set to "" should not throw 3107 FAIL link.crossOrigin: IDL set to "" followed by getAttribute() assert_equals: expected "" but got "USE-CREDENTIALS" 3108 FAIL link.crossOrigin: IDL set to "" followed by IDL get assert_equals: expected "anonymous" but got "" 3107 PASS link.crossOrigin: IDL set to "" followed by getAttribute() 3108 PASS link.crossOrigin: IDL set to "" followed by IDL get 3109 3109 PASS link.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " should not throw 3110 FAIL link.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute() assert_equals: expected " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " but got "USE-CREDENTIALS" 3111 FAIL link.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get assert_equals: expected "anonymous" but got " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " 3110 PASS link.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute() 3111 PASS link.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get 3112 3112 PASS link.crossOrigin: IDL set to undefined should not throw 3113 FAIL link.crossOrigin: IDL set to undefined followed by getAttribute() assert_equals: expected "undefined" but got "USE-CREDENTIALS"3114 FAIL link.crossOrigin: IDL set to undefined followed by IDL get assert_equals: expected (string) "anonymous" but got ( undefined) undefined3113 FAIL link.crossOrigin: IDL set to undefined followed by getAttribute() assert_equals: expected (string) "undefined" but got (object) null 3114 FAIL link.crossOrigin: IDL set to undefined followed by IDL get assert_equals: expected (string) "anonymous" but got (object) null 3115 3115 PASS link.crossOrigin: IDL set to 7 should not throw 3116 FAIL link.crossOrigin: IDL set to 7 followed by getAttribute() assert_equals: expected "7" but got "USE-CREDENTIALS" 3117 FAIL link.crossOrigin: IDL set to 7 followed by IDL get assert_equals: expected (string) "anonymous" but got (number) 7 3116 PASS link.crossOrigin: IDL set to 7 followed by getAttribute() 3117 PASS link.crossOrigin: IDL set to 7 followed by IDL get 3118 3118 PASS link.crossOrigin: IDL set to 1.5 should not throw 3119 FAIL link.crossOrigin: IDL set to 1.5 followed by getAttribute() assert_equals: expected "1.5" but got "USE-CREDENTIALS" 3120 FAIL link.crossOrigin: IDL set to 1.5 followed by IDL get assert_equals: expected (string) "anonymous" but got (number) 1.5 3119 PASS link.crossOrigin: IDL set to 1.5 followed by getAttribute() 3120 PASS link.crossOrigin: IDL set to 1.5 followed by IDL get 3121 3121 PASS link.crossOrigin: IDL set to true should not throw 3122 FAIL link.crossOrigin: IDL set to true followed by getAttribute() assert_equals: expected "true" but got "USE-CREDENTIALS" 3123 FAIL link.crossOrigin: IDL set to true followed by IDL get assert_equals: expected (string) "anonymous" but got (boolean) true 3122 PASS link.crossOrigin: IDL set to true followed by getAttribute() 3123 PASS link.crossOrigin: IDL set to true followed by IDL get 3124 3124 PASS link.crossOrigin: IDL set to false should not throw 3125 FAIL link.crossOrigin: IDL set to false followed by getAttribute() assert_equals: expected "false" but got "USE-CREDENTIALS" 3126 FAIL link.crossOrigin: IDL set to false followed by IDL get assert_equals: expected (string) "anonymous" but got (boolean) false 3125 PASS link.crossOrigin: IDL set to false followed by getAttribute() 3126 PASS link.crossOrigin: IDL set to false followed by IDL get 3127 3127 PASS link.crossOrigin: IDL set to object "[object Object]" should not throw 3128 FAIL link.crossOrigin: IDL set to object "[object Object]" followed by getAttribute() assert_equals: expected "[object Object]" but got "USE-CREDENTIALS" 3129 FAIL link.crossOrigin: IDL set to object "[object Object]" followed by IDL get assert_equals: expected (string) "anonymous" but got (object) object "[object Object]" 3128 PASS link.crossOrigin: IDL set to object "[object Object]" followed by getAttribute() 3129 PASS link.crossOrigin: IDL set to object "[object Object]" followed by IDL get 3130 3130 PASS link.crossOrigin: IDL set to NaN should not throw 3131 FAIL link.crossOrigin: IDL set to NaN followed by getAttribute() assert_equals: expected "NaN" but got "USE-CREDENTIALS" 3132 FAIL link.crossOrigin: IDL set to NaN followed by IDL get assert_equals: expected (string) "anonymous" but got (number) NaN 3131 PASS link.crossOrigin: IDL set to NaN followed by getAttribute() 3132 PASS link.crossOrigin: IDL set to NaN followed by IDL get 3133 3133 PASS link.crossOrigin: IDL set to Infinity should not throw 3134 FAIL link.crossOrigin: IDL set to Infinity followed by getAttribute() assert_equals: expected "Infinity" but got "USE-CREDENTIALS" 3135 FAIL link.crossOrigin: IDL set to Infinity followed by IDL get assert_equals: expected (string) "anonymous" but got (number) Infinity 3134 PASS link.crossOrigin: IDL set to Infinity followed by getAttribute() 3135 PASS link.crossOrigin: IDL set to Infinity followed by IDL get 3136 3136 PASS link.crossOrigin: IDL set to -Infinity should not throw 3137 FAIL link.crossOrigin: IDL set to -Infinity followed by getAttribute() assert_equals: expected "-Infinity" but got "USE-CREDENTIALS" 3138 FAIL link.crossOrigin: IDL set to -Infinity followed by IDL get assert_equals: expected (string) "anonymous" but got (number) -Infinity 3137 PASS link.crossOrigin: IDL set to -Infinity followed by getAttribute() 3138 PASS link.crossOrigin: IDL set to -Infinity followed by IDL get 3139 3139 PASS link.crossOrigin: IDL set to "\0" should not throw 3140 FAIL link.crossOrigin: IDL set to "\0" followed by getAttribute() assert_equals: expected "\0" but got "USE-CREDENTIALS" 3141 FAIL link.crossOrigin: IDL set to "\0" followed by IDL get assert_equals: expected "anonymous" but got "\0" 3140 PASS link.crossOrigin: IDL set to "\0" followed by getAttribute() 3141 PASS link.crossOrigin: IDL set to "\0" followed by IDL get 3142 3142 PASS link.crossOrigin: IDL set to null should not throw 3143 3143 FAIL link.crossOrigin: IDL set to null followed by IDL get assert_equals: expected (string) "anonymous" but got (object) null 3144 3144 PASS link.crossOrigin: IDL set to object "test-toString" should not throw 3145 FAIL link.crossOrigin: IDL set to object "test-toString" followed by getAttribute() assert_equals: expected "test-toString" but got "USE-CREDENTIALS" 3146 FAIL link.crossOrigin: IDL set to object "test-toString" followed by IDL get assert_equals: expected (string) "anonymous" but got (object) object "test-toString" 3145 PASS link.crossOrigin: IDL set to object "test-toString" followed by getAttribute() 3146 PASS link.crossOrigin: IDL set to object "test-toString" followed by IDL get 3147 3147 PASS link.crossOrigin: IDL set to object "test-valueOf" should not throw 3148 FAIL link.crossOrigin: IDL set to object "test-valueOf" followed by getAttribute() assert_equals: expected "test-valueOf" but got "USE-CREDENTIALS" 3149 FAIL link.crossOrigin: IDL set to object "test-valueOf" followed by IDL get assert_equals: expected (string) "anonymous" but got (object) object "test-valueOf" 3148 PASS link.crossOrigin: IDL set to object "test-valueOf" followed by getAttribute() 3149 PASS link.crossOrigin: IDL set to object "test-valueOf" followed by IDL get 3150 3150 PASS link.crossOrigin: IDL set to "anonymous" should not throw 3151 FAIL link.crossOrigin: IDL set to "anonymous" followed by getAttribute() assert_equals: expected "anonymous" but got "USE-CREDENTIALS" 3151 PASS link.crossOrigin: IDL set to "anonymous" followed by getAttribute() 3152 3152 PASS link.crossOrigin: IDL set to "anonymous" followed by IDL get 3153 3153 PASS link.crossOrigin: IDL set to "xanonymous" should not throw 3154 FAIL link.crossOrigin: IDL set to "xanonymous" followed by getAttribute() assert_equals: expected "xanonymous" but got "USE-CREDENTIALS" 3155 FAIL link.crossOrigin: IDL set to "xanonymous" followed by IDL get assert_equals: expected "anonymous" but got "xanonymous" 3154 PASS link.crossOrigin: IDL set to "xanonymous" followed by getAttribute() 3155 PASS link.crossOrigin: IDL set to "xanonymous" followed by IDL get 3156 3156 PASS link.crossOrigin: IDL set to "anonymous\0" should not throw 3157 FAIL link.crossOrigin: IDL set to "anonymous\0" followed by getAttribute() assert_equals: expected "anonymous\0" but got "USE-CREDENTIALS" 3158 FAIL link.crossOrigin: IDL set to "anonymous\0" followed by IDL get assert_equals: expected "anonymous" but got "anonymous\0" 3157 PASS link.crossOrigin: IDL set to "anonymous\0" followed by getAttribute() 3158 PASS link.crossOrigin: IDL set to "anonymous\0" followed by IDL get 3159 3159 PASS link.crossOrigin: IDL set to "nonymous" should not throw 3160 FAIL link.crossOrigin: IDL set to "nonymous" followed by getAttribute() assert_equals: expected "nonymous" but got "USE-CREDENTIALS" 3161 FAIL link.crossOrigin: IDL set to "nonymous" followed by IDL get assert_equals: expected "anonymous" but got "nonymous" 3160 PASS link.crossOrigin: IDL set to "nonymous" followed by getAttribute() 3161 PASS link.crossOrigin: IDL set to "nonymous" followed by IDL get 3162 3162 PASS link.crossOrigin: IDL set to "ANONYMOUS" should not throw 3163 FAIL link.crossOrigin: IDL set to "ANONYMOUS" followed by getAttribute() assert_equals: expected "ANONYMOUS" but got "USE-CREDENTIALS" 3164 FAIL link.crossOrigin: IDL set to "ANONYMOUS" followed by IDL get assert_equals: expected "anonymous" but got "ANONYMOUS" 3163 PASS link.crossOrigin: IDL set to "ANONYMOUS" followed by getAttribute() 3164 PASS link.crossOrigin: IDL set to "ANONYMOUS" followed by IDL get 3165 3165 PASS link.crossOrigin: IDL set to "use-credentials" should not throw 3166 FAIL link.crossOrigin: IDL set to "use-credentials" followed by getAttribute() assert_equals: expected "use-credentials" but got "USE-CREDENTIALS" 3166 PASS link.crossOrigin: IDL set to "use-credentials" followed by getAttribute() 3167 3167 PASS link.crossOrigin: IDL set to "use-credentials" followed by IDL get 3168 3168 PASS link.crossOrigin: IDL set to "xuse-credentials" should not throw 3169 FAIL link.crossOrigin: IDL set to "xuse-credentials" followed by getAttribute() assert_equals: expected "xuse-credentials" but got "USE-CREDENTIALS" 3170 FAIL link.crossOrigin: IDL set to "xuse-credentials" followed by IDL get assert_equals: expected "anonymous" but got "xuse-credentials" 3169 PASS link.crossOrigin: IDL set to "xuse-credentials" followed by getAttribute() 3170 PASS link.crossOrigin: IDL set to "xuse-credentials" followed by IDL get 3171 3171 PASS link.crossOrigin: IDL set to "use-credentials\0" should not throw 3172 FAIL link.crossOrigin: IDL set to "use-credentials\0" followed by getAttribute() assert_equals: expected "use-credentials\0" but got "USE-CREDENTIALS" 3173 FAIL link.crossOrigin: IDL set to "use-credentials\0" followed by IDL get assert_equals: expected "anonymous" but got "use-credentials\0" 3172 PASS link.crossOrigin: IDL set to "use-credentials\0" followed by getAttribute() 3173 PASS link.crossOrigin: IDL set to "use-credentials\0" followed by IDL get 3174 3174 PASS link.crossOrigin: IDL set to "se-credentials" should not throw 3175 FAIL link.crossOrigin: IDL set to "se-credentials" followed by getAttribute() assert_equals: expected "se-credentials" but got "USE-CREDENTIALS" 3176 FAIL link.crossOrigin: IDL set to "se-credentials" followed by IDL get assert_equals: expected "anonymous" but got "se-credentials" 3175 PASS link.crossOrigin: IDL set to "se-credentials" followed by getAttribute() 3176 PASS link.crossOrigin: IDL set to "se-credentials" followed by IDL get 3177 3177 PASS link.crossOrigin: IDL set to "USE-CREDENTIALS" should not throw 3178 3178 PASS link.crossOrigin: IDL set to "USE-CREDENTIALS" followed by getAttribute() 3179 FAIL link.crossOrigin: IDL set to "USE-CREDENTIALS" followed by IDL get assert_equals: expected "use-credentials" but got "USE-CREDENTIALS" 3179 PASS link.crossOrigin: IDL set to "USE-CREDENTIALS" followed by IDL get 3180 3180 PASS link.rel: typeof IDL attribute 3181 3181 PASS link.rel: IDL get with DOM attribute unset -
trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
r198893 r199650 1367 1367 PASS HTMLLinkElement interface: existence and properties of interface prototype object's "constructor" property 1368 1368 PASS HTMLLinkElement interface: attribute href 1369 FAIL HTMLLinkElement interface: attribute crossOrigin assert_true: The prototype object must have a property "crossOrigin" expected true got false 1369 PASS HTMLLinkElement interface: attribute crossOrigin 1370 1370 PASS HTMLLinkElement interface: attribute rel 1371 1371 PASS HTMLLinkElement interface: attribute relList … … 1380 1380 PASS Stringification of document.createElement("link") 1381 1381 PASS HTMLLinkElement interface: document.createElement("link") must inherit property "href" with the proper type (0) 1382 FAIL HTMLLinkElement interface: document.createElement("link") must inherit property "crossOrigin" with the proper type (1) assert_inherits: property "crossOrigin" not found in prototype chain 1382 PASS HTMLLinkElement interface: document.createElement("link") must inherit property "crossOrigin" with the proper type (1) 1383 1383 PASS HTMLLinkElement interface: document.createElement("link") must inherit property "rel" with the proper type (2) 1384 1384 PASS HTMLLinkElement interface: document.createElement("link") must inherit property "relList" with the proper type (3) -
trunk/Source/WebCore/ChangeLog
r199646 r199650 1 2016-04-17 Yoav Weiss <yoav@yoav.ws> 2 3 Initial Link preload support 4 https://bugs.webkit.org/show_bug.cgi?id=156334 5 6 Added basic `<link rel=preload>` functionality that enables preloading 7 of resources according to their type. 8 9 Reviewed by Darin Adler. 10 11 Tests: http/tests/preload/download_resources.html 12 http/tests/preload/dynamic_adding_preload.html 13 http/tests/preload/dynamic_remove_preload_href.html 14 http/tests/preload/dynamic_removing_preload.html 15 16 * bindings/generic/RuntimeEnabledFeatures.cpp: Added a runtime flag for the feature. 17 (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures): 18 * bindings/generic/RuntimeEnabledFeatures.h: Added a runtime flag for the feature. 19 (WebCore::RuntimeEnabledFeatures::setLinkPreloadEnabled): 20 (WebCore::RuntimeEnabledFeatures::linkPreloadEnabled): 21 * html/HTMLAttributeNames.in: Added an `as` attribute. 22 * html/HTMLLinkElement.cpp: 23 (WebCore::HTMLLinkElement::process): Added `as` and `crossorigin` attribute values to the loadLink() call. 24 (WebCore::HTMLLinkElement::setCrossOrigin): Setter for crossOrigin. 25 (WebCore::HTMLLinkElement::crossOrigin): Getter for crossOrigin. 26 * html/HTMLLinkElement.idl: Added `as` and `crossorigin` to HTMLLinkElement. 27 * html/HTMLLinkElement.h: Added getter and setter for crossorigin. 28 * html/LinkRelAttribute.cpp: 29 (WebCore::LinkRelAttribute::LinkRelAttribute): Added "preload" as a potential value. 30 * html/LinkRelAttribute.h: Added isLinkPreload. 31 * loader/LinkLoader.cpp: 32 (WebCore::LinkLoader::resourceTypeFromAsAttribute): Translates an `as` value into a resource type. 33 (WebCore::preloadIfNeeded): Triggers a resource preload when link element is a preload one. 34 (WebCore::LinkLoader::loadLink): Added a call to preloadIfNeeded. 35 * loader/LinkLoader.h: Added signatures. 36 * loader/ResourceLoadInfo.cpp: 37 (WebCore::toResourceType): Added LinkPreload as a possible CachedResource::type. 38 * loader/SubresourceLoader.cpp: 39 (WebCore::logResourceLoaded): Added LinkPreload as a possible CachedResource::type. 40 * loader/cache/CachedResource.cpp: Turned defaultPriorityForResourceType into a static member, as it's now also called from LinkLoader. 41 (WebCore::CachedResource::defaultPriorityForResourceType): Added LinkPreload as a possible CachedResource::type, giving it low priority. 42 (WebCore::defaultPriorityForResourceType): Deleted. 43 * loader/cache/CachedResource.h: Added LinkPreload as a possible CachedResource::type. Added defaultPriorityForResourceType as static. 44 * loader/cache/CachedResourceLoader.cpp: 45 (WebCore::contentTypeFromResourceType): Added LinkPreload as a possible CachedResource::type. 46 (WebCore::createResource): Added creation of a LinkPreload resource if needed. 47 (WebCore::CachedResourceLoader::checkInsecureContent): Added LinkPreload as a possible CachedResource::type. 48 (WebCore::CachedResourceLoader::canRequest): Added LinkPreload as a possible CachedResource::type. 49 * testing/Internals.cpp: Added function to turn on the link preload feature. 50 (WebCore::setLinkPreloadSupport): 51 * testing/Internals.idl: Added function to turn on the link preload feature. 52 * testing/Internals.h: Added function signature to turn on the link preload feature. 53 1 54 2016-04-17 Conrad Shultz <conrad_shultz@apple.com> 2 55 -
trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
r199007 r199650 51 51 , m_isDeviceMotionEnabled(true) 52 52 , m_isDeviceOrientationEnabled(true) 53 , m_isLinkPreloadEnabled(false) 53 54 , m_isCSSShapesEnabled(true) 54 55 , m_isCSSRegionsEnabled(false) -
trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
r199571 r199650 124 124 bool ondeviceorientationEnabled() const { return m_isDeviceOrientationEnabled; } 125 125 126 void setLinkPreloadEnabled(bool isEnabled) { m_isLinkPreloadEnabled = isEnabled; } 127 bool linkPreloadEnabled() const { return m_isLinkPreloadEnabled; } 128 126 129 #if ENABLE(JAVASCRIPT_I18N_API) 127 130 bool javaScriptI18NAPIEnabled() const; … … 249 252 bool m_isDeviceMotionEnabled; 250 253 bool m_isDeviceOrientationEnabled; 254 bool m_isLinkPreloadEnabled; 251 255 bool m_isCSSShapesEnabled; 252 256 bool m_isCSSRegionsEnabled; -
trunk/Source/WebCore/html/HTMLAttributeNames.in
r198974 r199650 60 60 aria-valuenow 61 61 aria-valuetext 62 as 62 63 async 63 64 autocomplete -
trunk/Source/WebCore/html/HTMLLinkElement.cpp
r199360 r199650 195 195 } 196 196 197 void HTMLLinkElement::setCrossOrigin(const AtomicString& value) 198 { 199 setAttributeWithoutSynchronization(crossoriginAttr, value); 200 } 201 202 String HTMLLinkElement::crossOrigin() const 203 { 204 return parseCORSSettingsAttribute(fastGetAttribute(crossoriginAttr)); 205 } 206 197 207 void HTMLLinkElement::process() 198 208 { … … 204 214 URL url = getNonEmptyURLAttribute(hrefAttr); 205 215 206 if (!m_linkLoader.loadLink(m_relAttribute, url, document()))216 if (!m_linkLoader.loadLink(m_relAttribute, url, fastGetAttribute(asAttr), fastGetAttribute(crossoriginAttr), document())) 207 217 return; 208 218 -
trunk/Source/WebCore/html/HTMLLinkElement.h
r199298 r199650 67 67 bool isEnabledViaScript() const { return m_disabledState == EnabledViaScript; } 68 68 DOMTokenList& sizes(); 69 70 void setCrossOrigin(const AtomicString&); 71 String crossOrigin() const; 69 72 70 73 void dispatchPendingEvent(LinkEventSender*); -
trunk/Source/WebCore/html/HTMLLinkElement.idl
r199539 r199650 36 36 [Reflect] attribute DOMString target; 37 37 [Reflect] attribute DOMString type; 38 [Reflect] attribute DOMString as; 39 attribute DOMString? crossOrigin; 38 40 39 41 // DOM Level 2 Style -
trunk/Source/WebCore/html/LinkRelAttribute.cpp
r195452 r199650 33 33 #include "LinkRelAttribute.h" 34 34 35 #include "RuntimeEnabledFeatures.h" 35 36 #include <wtf/text/WTFString.h> 36 37 … … 55 56 else if (equalLettersIgnoringASCIICase(rel, "dns-prefetch")) 56 57 isDNSPrefetch = true; 58 else if (RuntimeEnabledFeatures::sharedFeatures().linkPreloadEnabled() && equalLettersIgnoringASCIICase(rel, "preload")) 59 isLinkPreload = true; 57 60 else if (equalLettersIgnoringASCIICase(rel, "alternate stylesheet") || equalLettersIgnoringASCIICase(rel, "stylesheet alternate")) { 58 61 isStyleSheet = true; -
trunk/Source/WebCore/html/LinkRelAttribute.h
r182351 r199650 43 43 bool isAlternate { false }; 44 44 bool isDNSPrefetch { false }; 45 bool isLinkPreload { false }; 45 46 #if ENABLE(LINK_PREFETCH) 46 47 bool isLinkPrefetch { false }; -
trunk/Source/WebCore/loader/LinkLoader.cpp
r191381 r199650 38 38 #include "CachedResourceRequest.h" 39 39 #include "ContainerNode.h" 40 #include "CrossOriginAccessControl.h" 40 41 #include "Document.h" 41 42 #include "Frame.h" … … 43 44 #include "FrameView.h" 44 45 #include "LinkRelAttribute.h" 46 #include "RuntimeEnabledFeatures.h" 45 47 #include "Settings.h" 46 48 #include "StyleResolver.h" … … 84 86 } 85 87 86 bool LinkLoader::loadLink(const LinkRelAttribute& relAttribute, const URL& href, Document& document) 88 Optional<CachedResource::Type> LinkLoader::resourceTypeFromAsAttribute(const String& as) 89 { 90 if (as.isEmpty()) 91 return CachedResource::LinkPreload; 92 if (equalLettersIgnoringASCIICase(as, "image")) 93 return CachedResource::ImageResource; 94 if (equalLettersIgnoringASCIICase(as, "script")) 95 return CachedResource::Script; 96 if (equalLettersIgnoringASCIICase(as, "style")) 97 return CachedResource::CSSStyleSheet; 98 if (equalLettersIgnoringASCIICase(as, "media")) 99 return CachedResource::MediaResource; 100 if (equalLettersIgnoringASCIICase(as, "font")) 101 return CachedResource::FontResource; 102 #if ENABLE(VIDEO_TRACK) 103 if (equalLettersIgnoringASCIICase(as, "track")) 104 return CachedResource::TextTrackResource; 105 #endif 106 return Nullopt; 107 } 108 109 static void preloadIfNeeded(const LinkRelAttribute& relAttribute, const URL& href, Document& document, const String& as, const String& crossOriginMode) 110 { 111 if (!document.loader() || !relAttribute.isLinkPreload) 112 return; 113 114 ASSERT(RuntimeEnabledFeatures::sharedFeatures().linkPreloadEnabled()); 115 if (!href.isValid()) { 116 document.addConsoleMessage(MessageSource::Other, MessageLevel::Error, String("<link rel=preload> has an invalid `href` value")); 117 return; 118 } 119 auto type = LinkLoader::resourceTypeFromAsAttribute(as); 120 if (!type) { 121 document.addConsoleMessage(MessageSource::Other, MessageLevel::Error, String("<link rel=preload> must have a valid `as` value")); 122 return; 123 } 124 125 ResourceRequest resourceRequest(document.completeURL(href)); 126 CachedResourceRequest linkRequest(resourceRequest, CachedResource::defaultPriorityForResourceType(type.value())); 127 linkRequest.setInitiator("link"); 128 129 if (!crossOriginMode.isNull()) { 130 StoredCredentials allowCredentials = equalLettersIgnoringASCIICase(crossOriginMode, "use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials; 131 updateRequestForAccessControl(linkRequest.mutableResourceRequest(), document.securityOrigin(), allowCredentials); 132 } 133 linkRequest.setForPreload(true); 134 document.cachedResourceLoader().preload(type.value(), linkRequest, emptyString()); 135 } 136 137 bool LinkLoader::loadLink(const LinkRelAttribute& relAttribute, const URL& href, const String& as, const String& crossOrigin, Document& document) 87 138 { 88 139 // We'll record this URL per document, even if we later only use it in top level frames … … 101 152 document.frame()->loader().client().prefetchDNS(href.host()); 102 153 } 154 155 if (m_client.shouldLoadLink()) 156 preloadIfNeeded(relAttribute, href, document, as, crossOrigin); 103 157 104 158 #if ENABLE(LINK_PREFETCH) -
trunk/Source/WebCore/loader/LinkLoader.h
r197563 r199650 33 33 #define LinkLoader_h 34 34 35 #include "CachedResource.h" 35 36 #include "CachedResourceClient.h" 36 37 #include "CachedResourceHandle.h" … … 50 51 virtual ~LinkLoader(); 51 52 52 bool loadLink(const LinkRelAttribute&, const URL&, Document&); 53 bool loadLink(const LinkRelAttribute&, const URL&, const String& as, const String& crossOrigin, Document&); 54 static Optional<CachedResource::Type> resourceTypeFromAsAttribute(const String& as); 53 55 54 56 private: -
trunk/Source/WebCore/loader/ResourceLoadInfo.cpp
r198292 r199650 57 57 58 58 case CachedResource::MediaResource: 59 case CachedResource::LinkPreload: 59 60 case CachedResource::RawResource: 60 61 return ResourceType::Raw; -
trunk/Source/WebCore/loader/SubresourceLoader.cpp
r199612 r199650 372 372 resourceType = DiagnosticLoggingKeys::svgDocumentKey(); 373 373 break; 374 case CachedResource::LinkPreload: 374 375 #if ENABLE(LINK_PREFETCH) 375 376 case CachedResource::LinkPrefetch: -
trunk/Source/WebCore/loader/cache/CachedResource.cpp
r198292 r199650 64 64 namespace WebCore { 65 65 66 static ResourceLoadPriority defaultPriorityForResourceType(CachedResource::Type type)66 ResourceLoadPriority CachedResource::defaultPriorityForResourceType(Type type) 67 67 { 68 68 switch (type) { … … 86 86 #endif 87 87 case CachedResource::SVGDocumentResource: 88 return ResourceLoadPriority::Low; 89 case CachedResource::LinkPreload: 88 90 return ResourceLoadPriority::Low; 89 91 #if ENABLE(LINK_PREFETCH) -
trunk/Source/WebCore/loader/cache/CachedResource.h
r198292 r199650 76 76 , XSLStyleSheet 77 77 #endif 78 , LinkPreload 78 79 #if ENABLE(LINK_PREFETCH) 79 80 , LinkPrefetch … … 264 265 265 266 unsigned long identifierForLoadWithoutResourceLoader() const { return m_identifierForLoadWithoutResourceLoader; } 267 static ResourceLoadPriority defaultPriorityForResourceType(Type); 266 268 267 269 protected: -
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
r199612 r199650 109 109 return new CachedXSLStyleSheet(request, sessionID); 110 110 #endif 111 case CachedResource::LinkPreload: 112 return new CachedResource(request, CachedResource::LinkPreload, sessionID); 111 113 #if ENABLE(LINK_PREFETCH) 112 114 case CachedResource::LinkPrefetch: … … 314 316 #endif 315 317 318 case CachedResource::LinkPreload: 316 319 #if ENABLE(LINK_PREFETCH) 317 320 case CachedResource::LinkPrefetch: … … 354 357 case CachedResource::SVGFontResource: 355 358 #endif 356 case CachedResource::FontResource: { 359 case CachedResource::FontResource: 360 case CachedResource::LinkPreload: { 357 361 // These resources can corrupt only the frame's pixels. 358 362 if (Frame* f = frame()) { … … 400 404 case CachedResource::FontResource: 401 405 case CachedResource::RawResource: 406 case CachedResource::LinkPreload: 402 407 #if ENABLE(LINK_PREFETCH) 403 408 case CachedResource::LinkPrefetch: … … 455 460 case CachedResource::MainResource: 456 461 case CachedResource::RawResource: 462 // FIXME: Preload should be subject to connect-src. 463 case CachedResource::LinkPreload: 457 464 #if ENABLE(LINK_PREFETCH) 458 465 case CachedResource::LinkPrefetch: -
trunk/Source/WebCore/testing/Internals.cpp
r199642 r199650 3329 3329 } 3330 3330 3331 } 3331 void Internals::setLinkPreloadSupport(bool enable) 3332 { 3333 RuntimeEnabledFeatures::sharedFeatures().setLinkPreloadEnabled(enable); 3334 } 3335 3336 } -
trunk/Source/WebCore/testing/Internals.h
r199642 r199650 472 472 473 473 void setViewportForceAlwaysUserScalable(bool); 474 void setLinkPreloadSupport(bool); 474 475 475 476 private: -
trunk/Source/WebCore/testing/Internals.idl
r199539 r199650 446 446 447 447 void setViewportForceAlwaysUserScalable(boolean scalable); 448 }; 448 void setLinkPreloadSupport(boolean scalable); 449 }; -
trunk/Source/WebKit2/ChangeLog
r199644 r199650 1 2016-04-17 Yoav Weiss <yoav@yoav.ws> 2 3 Initial Link preload support 4 https://bugs.webkit.org/show_bug.cgi?id=156334 5 6 Reviewed by Darin Adler. 7 8 * WebProcess/Network/WebLoaderStrategy.cpp: 9 (WebKit::maximumBufferingTime): Added LinkPreload as a possible CachedResource::type. 10 1 11 2016-04-17 Chris Dumez <cdumez@apple.com> 2 12 -
trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp
r198292 r199650 111 111 case CachedResource::RawResource: 112 112 case CachedResource::SVGDocumentResource: 113 case CachedResource::LinkPreload: 113 114 #if ENABLE(LINK_PREFETCH) 114 115 case CachedResource::LinkPrefetch:
Note: See TracChangeset
for help on using the changeset viewer.