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

Side by Side Diff: Source/web/tests/ActivityLoggerTest.cpp

Issue 1256233002: Move data URI image resources to be async loaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed some tests but not all Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « Source/core/loader/ImageLoader.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "FrameTestHelpers.h" 7 #include "FrameTestHelpers.h"
8 #include "bindings/core/v8/ScriptController.h" 8 #include "bindings/core/v8/ScriptController.h"
9 #include "bindings/core/v8/ScriptSourceCode.h" 9 #include "bindings/core/v8/ScriptSourceCode.h"
10 #include "bindings/core/v8/V8Binding.h" 10 #include "bindings/core/v8/V8Binding.h"
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 const char* code = 505 const char* code =
506 "document.write('<iframe src=\\\'data:text/html;charset=utf-8,A\\\'></if rame>');" 506 "document.write('<iframe src=\\\'data:text/html;charset=utf-8,A\\\'></if rame>');"
507 "document.write('<img src=\\\'data:text/html;charset=utf-8,B\\\'></img>' );" 507 "document.write('<img src=\\\'data:text/html;charset=utf-8,B\\\'></img>' );"
508 "document.write('<link rel=\\\'stylesheet\\\' href=\\\'data:text/html;ch arset=utf-8,C\\\'></link>');" 508 "document.write('<link rel=\\\'stylesheet\\\' href=\\\'data:text/html;ch arset=utf-8,C\\\'></link>');"
509 "document.write('<script src=\\\'data:text/html;charset=utf-8,D\\\'></sc ript>');" 509 "document.write('<script src=\\\'data:text/html;charset=utf-8,D\\\'></sc ript>');"
510 "document.close();" 510 "document.close();"
511 "var xhr = new XMLHttpRequest(); xhr.open('GET', 'data:text/html;charset =utf-8,E'); xhr.send();"; 511 "var xhr = new XMLHttpRequest(); xhr.open('GET', 'data:text/html;charset =utf-8,E'); xhr.send();";
512 const char* expectedActivities = 512 const char* expectedActivities =
513 "blinkAddElement | iframe | data:text/html;charset=utf-8,A\n" 513 "blinkAddElement | iframe | data:text/html;charset=utf-8,A\n"
514 "blinkRequestResource | Main resource | data:text/html;charset=utf-8,A\n " 514 "blinkRequestResource | Main resource | data:text/html;charset=utf-8,A\n "
515 "blinkRequestResource | Image | data:text/html;charset=utf-8,B\n"
516 "blinkAddElement | link | stylesheet | data:text/html;charset=utf-8,C\n" 515 "blinkAddElement | link | stylesheet | data:text/html;charset=utf-8,C\n"
517 "blinkRequestResource | CSS stylesheet | data:text/html;charset=utf-8,C\ n" 516 "blinkRequestResource | CSS stylesheet | data:text/html;charset=utf-8,C\ n"
518 "blinkAddElement | script | data:text/html;charset=utf-8,D\n" 517 "blinkAddElement | script | data:text/html;charset=utf-8,D\n"
519 "blinkRequestResource | Script | data:text/html;charset=utf-8,D\n" 518 "blinkRequestResource | Script | data:text/html;charset=utf-8,D\n"
520 "blinkRequestResource | XMLHttpRequest | data:text/html;charset=utf-8,E" ; 519 "blinkRequestResource | XMLHttpRequest | data:text/html;charset=utf-8,E\ n"
520 "blinkRequestResource | Image | data:text/html;charset=utf-8,B";
521 executeScriptInMainWorld(code); 521 executeScriptInMainWorld(code);
522 ASSERT_TRUE(verifyActivities("")); 522 ASSERT_TRUE(verifyActivities(""));
523 executeScriptInIsolatedWorld(code); 523 executeScriptInIsolatedWorld(code);
524 ASSERT_TRUE(verifyActivities(expectedActivities)); 524 ASSERT_TRUE(verifyActivities(expectedActivities));
525 } 525 }
526 526
527 } // namespace blink 527 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/ImageLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698