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

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

Issue 2612903007: Migrate WTF::Vector::append() to ::push_back() [part 15 of N] (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 "<style>" 770 "<style>"
771 // This stylesheet checks that the internal property and value can't be 771 // This stylesheet checks that the internal property and value can't be
772 // set by a stylesheet, only WebDocument::watchCSSSelectors(). 772 // set by a stylesheet, only WebDocument::watchCSSSelectors().
773 "div.initial_on { -internal-callback: none; }" 773 "div.initial_on { -internal-callback: none; }"
774 "div.initial_off { -internal-callback: -internal-presence; }" 774 "div.initial_off { -internal-callback: -internal-presence; }"
775 "</style>" 775 "</style>"
776 "<div class=\"initial_on\"></div>" 776 "<div class=\"initial_on\"></div>"
777 "<div class=\"initial_off\"></div>"); 777 "<div class=\"initial_off\"></div>");
778 778
779 Vector<WebString> selectors; 779 Vector<WebString> selectors;
780 selectors.append(WebString::fromUTF8("div.initial_on")); 780 selectors.push_back(WebString::fromUTF8("div.initial_on"));
781 m_frame->document().watchCSSSelectors(WebVector<WebString>(selectors)); 781 m_frame->document().watchCSSSelectors(WebVector<WebString>(selectors));
782 m_frame->view()->updateAllLifecyclePhases(); 782 m_frame->view()->updateAllLifecyclePhases();
783 runPendingTasks(); 783 runPendingTasks();
784 EXPECT_EQ(1, updateCount()); 784 EXPECT_EQ(1, updateCount());
785 EXPECT_THAT(matchedSelectors(), ElementsAre("div.initial_on")); 785 EXPECT_THAT(matchedSelectors(), ElementsAre("div.initial_on"));
786 786
787 // Check that adding a watched selector calls back for already-present nodes. 787 // Check that adding a watched selector calls back for already-present nodes.
788 selectors.append(WebString::fromUTF8("div.initial_off")); 788 selectors.push_back(WebString::fromUTF8("div.initial_off"));
789 doc().watchCSSSelectors(WebVector<WebString>(selectors)); 789 doc().watchCSSSelectors(WebVector<WebString>(selectors));
790 m_frame->view()->updateAllLifecyclePhases(); 790 m_frame->view()->updateAllLifecyclePhases();
791 runPendingTasks(); 791 runPendingTasks();
792 EXPECT_EQ(2, updateCount()); 792 EXPECT_EQ(2, updateCount());
793 EXPECT_THAT(matchedSelectors(), 793 EXPECT_THAT(matchedSelectors(),
794 ElementsAre("div.initial_off", "div.initial_on")); 794 ElementsAre("div.initial_off", "div.initial_on"));
795 795
796 // Check that we can turn off callbacks for certain selectors. 796 // Check that we can turn off callbacks for certain selectors.
797 doc().watchCSSSelectors(WebVector<WebString>()); 797 doc().watchCSSSelectors(WebVector<WebString>());
798 m_frame->view()->updateAllLifecyclePhases(); 798 m_frame->view()->updateAllLifecyclePhases();
799 runPendingTasks(); 799 runPendingTasks();
800 EXPECT_EQ(3, updateCount()); 800 EXPECT_EQ(3, updateCount());
801 EXPECT_THAT(matchedSelectors(), ElementsAre()); 801 EXPECT_THAT(matchedSelectors(), ElementsAre());
802 } 802 }
803 803
804 TEST_F(WebFrameCSSCallbackTest, SharedComputedStyle) { 804 TEST_F(WebFrameCSSCallbackTest, SharedComputedStyle) {
805 // Check that adding an element calls back when it matches an existing rule. 805 // Check that adding an element calls back when it matches an existing rule.
806 Vector<WebString> selectors; 806 Vector<WebString> selectors;
807 selectors.append(WebString::fromUTF8("span")); 807 selectors.push_back(WebString::fromUTF8("span"));
808 doc().watchCSSSelectors(WebVector<WebString>(selectors)); 808 doc().watchCSSSelectors(WebVector<WebString>(selectors));
809 809
810 executeScript( 810 executeScript(
811 "i1 = document.createElement('span');" 811 "i1 = document.createElement('span');"
812 "i1.id = 'first_span';" 812 "i1.id = 'first_span';"
813 "document.body.appendChild(i1)"); 813 "document.body.appendChild(i1)");
814 EXPECT_EQ(1, updateCount()); 814 EXPECT_EQ(1, updateCount());
815 EXPECT_THAT(matchedSelectors(), ElementsAre("span")); 815 EXPECT_THAT(matchedSelectors(), ElementsAre("span"));
816 816
817 // Adding a second element that shares a ComputedStyle shouldn't call back. 817 // Adding a second element that shares a ComputedStyle shouldn't call back.
(...skipping 19 matching lines...) Expand all
837 "i2 = document.getElementById('second_span');" 837 "i2 = document.getElementById('second_span');"
838 "i2.parentNode.removeChild(i2);"); 838 "i2.parentNode.removeChild(i2);");
839 EXPECT_EQ(2, updateCount()); 839 EXPECT_EQ(2, updateCount());
840 EXPECT_THAT(matchedSelectors(), ElementsAre()); 840 EXPECT_THAT(matchedSelectors(), ElementsAre());
841 } 841 }
842 842
843 TEST_F(WebFrameCSSCallbackTest, CatchesAttributeChange) { 843 TEST_F(WebFrameCSSCallbackTest, CatchesAttributeChange) {
844 loadHTML("<span></span>"); 844 loadHTML("<span></span>");
845 845
846 Vector<WebString> selectors; 846 Vector<WebString> selectors;
847 selectors.append(WebString::fromUTF8("span[attr=\"value\"]")); 847 selectors.push_back(WebString::fromUTF8("span[attr=\"value\"]"));
848 doc().watchCSSSelectors(WebVector<WebString>(selectors)); 848 doc().watchCSSSelectors(WebVector<WebString>(selectors));
849 runPendingTasks(); 849 runPendingTasks();
850 850
851 EXPECT_EQ(0, updateCount()); 851 EXPECT_EQ(0, updateCount());
852 EXPECT_THAT(matchedSelectors(), ElementsAre()); 852 EXPECT_THAT(matchedSelectors(), ElementsAre());
853 853
854 executeScript( 854 executeScript(
855 "document.querySelector('span').setAttribute('attr', 'value');"); 855 "document.querySelector('span').setAttribute('attr', 'value');");
856 EXPECT_EQ(1, updateCount()); 856 EXPECT_EQ(1, updateCount());
857 EXPECT_THAT(matchedSelectors(), ElementsAre("span[attr=\"value\"]")); 857 EXPECT_THAT(matchedSelectors(), ElementsAre("span[attr=\"value\"]"));
858 } 858 }
859 859
860 TEST_F(WebFrameCSSCallbackTest, DisplayNone) { 860 TEST_F(WebFrameCSSCallbackTest, DisplayNone) {
861 loadHTML("<div style='display:none'><span></span></div>"); 861 loadHTML("<div style='display:none'><span></span></div>");
862 862
863 Vector<WebString> selectors; 863 Vector<WebString> selectors;
864 selectors.append(WebString::fromUTF8("span")); 864 selectors.push_back(WebString::fromUTF8("span"));
865 doc().watchCSSSelectors(WebVector<WebString>(selectors)); 865 doc().watchCSSSelectors(WebVector<WebString>(selectors));
866 runPendingTasks(); 866 runPendingTasks();
867 867
868 EXPECT_EQ(0, updateCount()) << "Don't match elements in display:none trees."; 868 EXPECT_EQ(0, updateCount()) << "Don't match elements in display:none trees.";
869 869
870 executeScript( 870 executeScript(
871 "d = document.querySelector('div');" 871 "d = document.querySelector('div');"
872 "d.style.display = 'block';"); 872 "d.style.display = 'block';");
873 EXPECT_EQ(1, updateCount()) << "Match elements when they become displayed."; 873 EXPECT_EQ(1, updateCount()) << "Match elements when they become displayed.";
874 EXPECT_THAT(matchedSelectors(), ElementsAre("span")); 874 EXPECT_THAT(matchedSelectors(), ElementsAre("span"));
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 << "Undisplaying the span directly should produce another callback."; 906 << "Undisplaying the span directly should produce another callback.";
907 EXPECT_THAT(matchedSelectors(), ElementsAre()); 907 EXPECT_THAT(matchedSelectors(), ElementsAre());
908 } 908 }
909 909
910 TEST_F(WebFrameCSSCallbackTest, Reparenting) { 910 TEST_F(WebFrameCSSCallbackTest, Reparenting) {
911 loadHTML( 911 loadHTML(
912 "<div id='d1'><span></span></div>" 912 "<div id='d1'><span></span></div>"
913 "<div id='d2'></div>"); 913 "<div id='d2'></div>");
914 914
915 Vector<WebString> selectors; 915 Vector<WebString> selectors;
916 selectors.append(WebString::fromUTF8("span")); 916 selectors.push_back(WebString::fromUTF8("span"));
917 doc().watchCSSSelectors(WebVector<WebString>(selectors)); 917 doc().watchCSSSelectors(WebVector<WebString>(selectors));
918 m_frame->view()->updateAllLifecyclePhases(); 918 m_frame->view()->updateAllLifecyclePhases();
919 runPendingTasks(); 919 runPendingTasks();
920 920
921 EXPECT_EQ(1, updateCount()); 921 EXPECT_EQ(1, updateCount());
922 EXPECT_THAT(matchedSelectors(), ElementsAre("span")); 922 EXPECT_THAT(matchedSelectors(), ElementsAre("span"));
923 923
924 executeScript( 924 executeScript(
925 "s = document.querySelector('span');" 925 "s = document.querySelector('span');"
926 "d2 = document.getElementById('d2');" 926 "d2 = document.getElementById('d2');"
927 "d2.appendChild(s);"); 927 "d2.appendChild(s);");
928 EXPECT_EQ(1, updateCount()) << "Just moving an element that continues to " 928 EXPECT_EQ(1, updateCount()) << "Just moving an element that continues to "
929 "match shouldn't send a spurious callback."; 929 "match shouldn't send a spurious callback.";
930 EXPECT_THAT(matchedSelectors(), ElementsAre("span")); 930 EXPECT_THAT(matchedSelectors(), ElementsAre("span"));
931 } 931 }
932 932
933 TEST_F(WebFrameCSSCallbackTest, MultiSelector) { 933 TEST_F(WebFrameCSSCallbackTest, MultiSelector) {
934 loadHTML("<span></span>"); 934 loadHTML("<span></span>");
935 935
936 // Check that selector lists match as the whole list, not as each element 936 // Check that selector lists match as the whole list, not as each element
937 // independently. 937 // independently.
938 Vector<WebString> selectors; 938 Vector<WebString> selectors;
939 selectors.append(WebString::fromUTF8("span")); 939 selectors.push_back(WebString::fromUTF8("span"));
940 selectors.append(WebString::fromUTF8("span,p")); 940 selectors.push_back(WebString::fromUTF8("span,p"));
941 doc().watchCSSSelectors(WebVector<WebString>(selectors)); 941 doc().watchCSSSelectors(WebVector<WebString>(selectors));
942 m_frame->view()->updateAllLifecyclePhases(); 942 m_frame->view()->updateAllLifecyclePhases();
943 runPendingTasks(); 943 runPendingTasks();
944 944
945 EXPECT_EQ(1, updateCount()); 945 EXPECT_EQ(1, updateCount());
946 EXPECT_THAT(matchedSelectors(), ElementsAre("span", "span, p")); 946 EXPECT_THAT(matchedSelectors(), ElementsAre("span", "span, p"));
947 } 947 }
948 948
949 TEST_F(WebFrameCSSCallbackTest, InvalidSelector) { 949 TEST_F(WebFrameCSSCallbackTest, InvalidSelector) {
950 loadHTML("<p><span></span></p>"); 950 loadHTML("<p><span></span></p>");
951 951
952 // Build a list with one valid selector and one invalid. 952 // Build a list with one valid selector and one invalid.
953 Vector<WebString> selectors; 953 Vector<WebString> selectors;
954 selectors.append(WebString::fromUTF8("span")); 954 selectors.push_back(WebString::fromUTF8("span"));
955 selectors.append(WebString::fromUTF8("[")); // Invalid. 955 selectors.push_back(WebString::fromUTF8("[")); // Invalid.
956 selectors.append(WebString::fromUTF8("p span")); // Not compound. 956 selectors.push_back(WebString::fromUTF8("p span")); // Not compound.
957 doc().watchCSSSelectors(WebVector<WebString>(selectors)); 957 doc().watchCSSSelectors(WebVector<WebString>(selectors));
958 m_frame->view()->updateAllLifecyclePhases(); 958 m_frame->view()->updateAllLifecyclePhases();
959 runPendingTasks(); 959 runPendingTasks();
960 960
961 EXPECT_EQ(1, updateCount()); 961 EXPECT_EQ(1, updateCount());
962 EXPECT_THAT(matchedSelectors(), ElementsAre("span")) 962 EXPECT_THAT(matchedSelectors(), ElementsAre("span"))
963 << "An invalid selector shouldn't prevent other selectors from matching."; 963 << "An invalid selector shouldn't prevent other selectors from matching.";
964 } 964 }
965 965
966 TEST_P(ParameterizedWebFrameTest, DispatchMessageEventWithOriginCheck) { 966 TEST_P(ParameterizedWebFrameTest, DispatchMessageEventWithOriginCheck) {
(...skipping 3305 matching lines...) Expand 10 before | Expand all | Expand 10 after
4272 } 4272 }
4273 4273
4274 Vector<std::unique_ptr<Notification>> createNotifications; 4274 Vector<std::unique_ptr<Notification>> createNotifications;
4275 Vector<std::unique_ptr<Notification>> releaseNotifications; 4275 Vector<std::unique_ptr<Notification>> releaseNotifications;
4276 4276
4277 private: 4277 private:
4278 void didCreateScriptContext(WebLocalFrame* frame, 4278 void didCreateScriptContext(WebLocalFrame* frame,
4279 v8::Local<v8::Context> context, 4279 v8::Local<v8::Context> context,
4280 int extensionGroup, 4280 int extensionGroup,
4281 int worldId) override { 4281 int worldId) override {
4282 createNotifications.append( 4282 createNotifications.push_back(
4283 WTF::makeUnique<Notification>(frame, context, worldId)); 4283 WTF::makeUnique<Notification>(frame, context, worldId));
4284 } 4284 }
4285 4285
4286 void willReleaseScriptContext(WebLocalFrame* frame, 4286 void willReleaseScriptContext(WebLocalFrame* frame,
4287 v8::Local<v8::Context> context, 4287 v8::Local<v8::Context> context,
4288 int worldId) override { 4288 int worldId) override {
4289 releaseNotifications.append( 4289 releaseNotifications.push_back(
4290 WTF::makeUnique<Notification>(frame, context, worldId)); 4290 WTF::makeUnique<Notification>(frame, context, worldId));
4291 } 4291 }
4292 }; 4292 };
4293 4293
4294 TEST_P(ParameterizedWebFrameTest, ContextNotificationsLoadUnload) { 4294 TEST_P(ParameterizedWebFrameTest, ContextNotificationsLoadUnload) {
4295 v8::HandleScope handleScope(v8::Isolate::GetCurrent()); 4295 v8::HandleScope handleScope(v8::Isolate::GetCurrent());
4296 4296
4297 registerMockedHttpURLLoad("context_notifications_test.html"); 4297 registerMockedHttpURLLoad("context_notifications_test.html");
4298 registerMockedHttpURLLoad("context_notifications_test_frame.html"); 4298 registerMockedHttpURLLoad("context_notifications_test_frame.html");
4299 4299
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
4930 4930
4931 // Get the tickmarks for the original find request. 4931 // Get the tickmarks for the original find request.
4932 FrameView* frameView = webViewHelper.webView()->mainFrameImpl()->frameView(); 4932 FrameView* frameView = webViewHelper.webView()->mainFrameImpl()->frameView();
4933 Scrollbar* scrollbar = frameView->createScrollbar(HorizontalScrollbar); 4933 Scrollbar* scrollbar = frameView->createScrollbar(HorizontalScrollbar);
4934 Vector<IntRect> originalTickmarks; 4934 Vector<IntRect> originalTickmarks;
4935 scrollbar->getTickmarks(originalTickmarks); 4935 scrollbar->getTickmarks(originalTickmarks);
4936 EXPECT_EQ(4u, originalTickmarks.size()); 4936 EXPECT_EQ(4u, originalTickmarks.size());
4937 4937
4938 // Override the tickmarks. 4938 // Override the tickmarks.
4939 Vector<IntRect> overridingTickmarksExpected; 4939 Vector<IntRect> overridingTickmarksExpected;
4940 overridingTickmarksExpected.append(IntRect(0, 0, 100, 100)); 4940 overridingTickmarksExpected.push_back(IntRect(0, 0, 100, 100));
4941 overridingTickmarksExpected.append(IntRect(0, 20, 100, 100)); 4941 overridingTickmarksExpected.push_back(IntRect(0, 20, 100, 100));
4942 overridingTickmarksExpected.append(IntRect(0, 30, 100, 100)); 4942 overridingTickmarksExpected.push_back(IntRect(0, 30, 100, 100));
4943 mainFrame->setTickmarks(overridingTickmarksExpected); 4943 mainFrame->setTickmarks(overridingTickmarksExpected);
4944 4944
4945 // Check the tickmarks are overriden correctly. 4945 // Check the tickmarks are overriden correctly.
4946 Vector<IntRect> overridingTickmarksActual; 4946 Vector<IntRect> overridingTickmarksActual;
4947 scrollbar->getTickmarks(overridingTickmarksActual); 4947 scrollbar->getTickmarks(overridingTickmarksActual);
4948 EXPECT_EQ(overridingTickmarksExpected, overridingTickmarksActual); 4948 EXPECT_EQ(overridingTickmarksExpected, overridingTickmarksActual);
4949 4949
4950 // Reset the tickmark behavior. 4950 // Reset the tickmark behavior.
4951 Vector<IntRect> resetTickmarks; 4951 Vector<IntRect> resetTickmarks;
4952 mainFrame->setTickmarks(resetTickmarks); 4952 mainFrame->setTickmarks(resetTickmarks);
(...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after
6273 : m_numberOfTimesChecked(0), m_hash(hash) {} 6273 : m_numberOfTimesChecked(0), m_hash(hash) {}
6274 virtual ~SpellCheckClient() {} 6274 virtual ~SpellCheckClient() {}
6275 void requestCheckingOfText(const WebString&, 6275 void requestCheckingOfText(const WebString&,
6276 const WebVector<uint32_t>&, 6276 const WebVector<uint32_t>&,
6277 const WebVector<unsigned>&, 6277 const WebVector<unsigned>&,
6278 WebTextCheckingCompletion* completion) override { 6278 WebTextCheckingCompletion* completion) override {
6279 ++m_numberOfTimesChecked; 6279 ++m_numberOfTimesChecked;
6280 Vector<WebTextCheckingResult> results; 6280 Vector<WebTextCheckingResult> results;
6281 const int misspellingStartOffset = 1; 6281 const int misspellingStartOffset = 1;
6282 const int misspellingLength = 8; 6282 const int misspellingLength = 8;
6283 results.append(WebTextCheckingResult( 6283 results.push_back(WebTextCheckingResult(
6284 WebTextDecorationTypeSpelling, misspellingStartOffset, 6284 WebTextDecorationTypeSpelling, misspellingStartOffset,
6285 misspellingLength, WebString(), m_hash)); 6285 misspellingLength, WebString(), m_hash));
6286 completion->didFinishCheckingText(results); 6286 completion->didFinishCheckingText(results);
6287 } 6287 }
6288 int numberOfTimesChecked() const { return m_numberOfTimesChecked; } 6288 int numberOfTimesChecked() const { return m_numberOfTimesChecked; }
6289 6289
6290 private: 6290 private:
6291 int m_numberOfTimesChecked; 6291 int m_numberOfTimesChecked;
6292 uint32_t m_hash; 6292 uint32_t m_hash;
6293 }; 6293 };
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
6378 element->focus(); 6378 element->focus();
6379 NonThrowableExceptionState exceptionState; 6379 NonThrowableExceptionState exceptionState;
6380 document->execCommand("InsertText", false, " wellcome ", exceptionState); 6380 document->execCommand("InsertText", false, " wellcome ", exceptionState);
6381 EXPECT_FALSE(exceptionState.hadException()); 6381 EXPECT_FALSE(exceptionState.hadException());
6382 6382
6383 WebVector<uint32_t> documentMarkers1; 6383 WebVector<uint32_t> documentMarkers1;
6384 webViewHelper.webView()->spellingMarkers(&documentMarkers1); 6384 webViewHelper.webView()->spellingMarkers(&documentMarkers1);
6385 EXPECT_EQ(1U, documentMarkers1.size()); 6385 EXPECT_EQ(1U, documentMarkers1.size());
6386 6386
6387 Vector<String> words; 6387 Vector<String> words;
6388 words.append("wellcome"); 6388 words.push_back("wellcome");
6389 frame->removeSpellingMarkersUnderWords(words); 6389 frame->removeSpellingMarkersUnderWords(words);
6390 6390
6391 WebVector<uint32_t> documentMarkers2; 6391 WebVector<uint32_t> documentMarkers2;
6392 webViewHelper.webView()->spellingMarkers(&documentMarkers2); 6392 webViewHelper.webView()->spellingMarkers(&documentMarkers2);
6393 EXPECT_EQ(0U, documentMarkers2.size()); 6393 EXPECT_EQ(0U, documentMarkers2.size());
6394 } 6394 }
6395 6395
6396 TEST_P(ParameterizedWebFrameTest, MarkerHashIdentifiers) { 6396 TEST_P(ParameterizedWebFrameTest, MarkerHashIdentifiers) {
6397 registerMockedHttpURLLoad("spell.html"); 6397 registerMockedHttpURLLoad("spell.html");
6398 FrameTestHelpers::WebViewHelper webViewHelper; 6398 FrameTestHelpers::WebViewHelper webViewHelper;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
6451 } 6451 }
6452 6452
6453 private: 6453 private:
6454 void kick(int misspellingStartOffset, 6454 void kick(int misspellingStartOffset,
6455 int misspellingLength, 6455 int misspellingLength,
6456 WebTextDecorationType type) { 6456 WebTextDecorationType type) {
6457 if (!m_completion) 6457 if (!m_completion)
6458 return; 6458 return;
6459 Vector<WebTextCheckingResult> results; 6459 Vector<WebTextCheckingResult> results;
6460 if (misspellingStartOffset >= 0 && misspellingLength > 0) 6460 if (misspellingStartOffset >= 0 && misspellingLength > 0)
6461 results.append(WebTextCheckingResult(type, misspellingStartOffset, 6461 results.push_back(WebTextCheckingResult(type, misspellingStartOffset,
6462 misspellingLength)); 6462 misspellingLength));
6463 m_completion->didFinishCheckingText(results); 6463 m_completion->didFinishCheckingText(results);
6464 m_completion = 0; 6464 m_completion = 0;
6465 } 6465 }
6466 6466
6467 WebTextCheckingCompletion* m_completion; 6467 WebTextCheckingCompletion* m_completion;
6468 }; 6468 };
6469 6469
6470 TEST_P(ParameterizedWebFrameTest, SlowSpellcheckMarkerPosition) { 6470 TEST_P(ParameterizedWebFrameTest, SlowSpellcheckMarkerPosition) {
6471 registerMockedHttpURLLoad("spell.html"); 6471 registerMockedHttpURLLoad("spell.html");
6472 FrameTestHelpers::WebViewHelper webViewHelper; 6472 FrameTestHelpers::WebViewHelper webViewHelper;
(...skipping 2922 matching lines...) Expand 10 before | Expand all | Expand 10 after
9395 childFrame->close(); 9395 childFrame->close();
9396 } 9396 }
9397 9397
9398 class TestConsoleMessageWebFrameClient 9398 class TestConsoleMessageWebFrameClient
9399 : public FrameTestHelpers::TestWebFrameClient { 9399 : public FrameTestHelpers::TestWebFrameClient {
9400 public: 9400 public:
9401 virtual void didAddMessageToConsole(const WebConsoleMessage& message, 9401 virtual void didAddMessageToConsole(const WebConsoleMessage& message,
9402 const WebString& sourceName, 9402 const WebString& sourceName,
9403 unsigned sourceLine, 9403 unsigned sourceLine,
9404 const WebString& stackTrace) { 9404 const WebString& stackTrace) {
9405 messages.append(message); 9405 messages.push_back(message);
9406 } 9406 }
9407 9407
9408 Vector<WebConsoleMessage> messages; 9408 Vector<WebConsoleMessage> messages;
9409 }; 9409 };
9410 9410
9411 TEST_P(ParameterizedWebFrameTest, CrossDomainAccessErrorsUseCallingWindow) { 9411 TEST_P(ParameterizedWebFrameTest, CrossDomainAccessErrorsUseCallingWindow) {
9412 registerMockedHttpURLLoad("hidden_frames.html"); 9412 registerMockedHttpURLLoad("hidden_frames.html");
9413 registerMockedChromeURLLoad("hello_world.html"); 9413 registerMockedChromeURLLoad("hello_world.html");
9414 9414
9415 FrameTestHelpers::WebViewHelper webViewHelper; 9415 FrameTestHelpers::WebViewHelper webViewHelper;
(...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after
11164 11164
11165 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); 11165 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached());
11166 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); 11166 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading());
11167 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); 11167 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad());
11168 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); 11168 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents());
11169 11169
11170 webViewHelper.reset(); 11170 webViewHelper.reset();
11171 } 11171 }
11172 11172
11173 } // namespace blink 11173 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/ViewportTest.cpp ('k') | third_party/WebKit/Source/web/tests/sim/SimCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698