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

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

Issue 2173003002: Load data URI images in an async way according to spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed test config Created 4 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 | « third_party/WebKit/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 "bindings/core/v8/ScriptController.h" 5 #include "bindings/core/v8/ScriptController.h"
6 #include "bindings/core/v8/ScriptSourceCode.h" 6 #include "bindings/core/v8/ScriptSourceCode.h"
7 #include "bindings/core/v8/V8Binding.h" 7 #include "bindings/core/v8/V8Binding.h"
8 #include "bindings/core/v8/V8DOMActivityLogger.h" 8 #include "bindings/core/v8/V8DOMActivityLogger.h"
9 #include "public/web/WebCache.h" 9 #include "public/web/WebCache.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 const char* code = 517 const char* code =
518 "document.write('<iframe src=\\\'data:text/html;charset=utf-8,A\\\'></if rame>');" 518 "document.write('<iframe src=\\\'data:text/html;charset=utf-8,A\\\'></if rame>');"
519 "document.write('<img src=\\\'data:text/html;charset=utf-8,B\\\'></img>' );" 519 "document.write('<img src=\\\'data:text/html;charset=utf-8,B\\\'></img>' );"
520 "document.write('<link rel=\\\'stylesheet\\\' href=\\\'data:text/html;ch arset=utf-8,C\\\'></link>');" 520 "document.write('<link rel=\\\'stylesheet\\\' href=\\\'data:text/html;ch arset=utf-8,C\\\'></link>');"
521 "document.write('<script src=\\\'data:text/html;charset=utf-8,D\\\'></sc ript>');" 521 "document.write('<script src=\\\'data:text/html;charset=utf-8,D\\\'></sc ript>');"
522 "document.close();" 522 "document.close();"
523 "var xhr = new XMLHttpRequest(); xhr.open('GET', 'data:text/html;charset =utf-8,E'); xhr.send();"; 523 "var xhr = new XMLHttpRequest(); xhr.open('GET', 'data:text/html;charset =utf-8,E'); xhr.send();";
524 const char* expectedActivities = 524 const char* expectedActivities =
525 "blinkAddElement | iframe | data:text/html;charset=utf-8,A\n" 525 "blinkAddElement | iframe | data:text/html;charset=utf-8,A\n"
526 "blinkRequestResource | Main resource | data:text/html;charset=utf-8,A\n " 526 "blinkRequestResource | Main resource | data:text/html;charset=utf-8,A\n "
527 "blinkRequestResource | Image | data:text/html;charset=utf-8,B\n"
528 "blinkAddElement | link | stylesheet | data:text/html;charset=utf-8,C\n" 527 "blinkAddElement | link | stylesheet | data:text/html;charset=utf-8,C\n"
529 "blinkRequestResource | CSS stylesheet | data:text/html;charset=utf-8,C\ n" 528 "blinkRequestResource | CSS stylesheet | data:text/html;charset=utf-8,C\ n"
530 "blinkAddElement | script | data:text/html;charset=utf-8,D\n" 529 "blinkAddElement | script | data:text/html;charset=utf-8,D\n"
531 "blinkRequestResource | Script | data:text/html;charset=utf-8,D\n" 530 "blinkRequestResource | Script | data:text/html;charset=utf-8,D\n"
532 "blinkRequestResource | XMLHttpRequest | data:text/html;charset=utf-8,E" ; 531 "blinkRequestResource | XMLHttpRequest | data:text/html;charset=utf-8,E\ n"
532 "blinkRequestResource | Image | data:text/html;charset=utf-8,B";
533 executeScriptInMainWorld(code); 533 executeScriptInMainWorld(code);
534 ASSERT_TRUE(verifyActivities("")); 534 ASSERT_TRUE(verifyActivities(""));
535 executeScriptInIsolatedWorld(code); 535 executeScriptInIsolatedWorld(code);
536 ASSERT_TRUE(verifyActivities(expectedActivities)); 536 ASSERT_TRUE(verifyActivities(expectedActivities));
537 } 537 }
538 538
539 } // namespace blink 539 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/ImageLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698