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

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

Issue 2895253003: Split general DocumentMarkerController::AddMarker() method into spelling/grammar versions (Closed)
Patch Set: Split off InputMethodControllerTest changes, make other requested changes Created 3 years, 7 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/testing/Internals.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 /* 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 6856 matching lines...) Expand 10 before | Expand all | Expand 10 after
6867 document->GetFrame() 6867 document->GetFrame()
6868 ->GetSpellChecker() 6868 ->GetSpellChecker()
6869 .GetIdleSpellCheckCallback() 6869 .GetIdleSpellCheckCallback()
6870 .ForceInvocationForTesting(); 6870 .ForceInvocationForTesting();
6871 } 6871 }
6872 6872
6873 document->UpdateStyleAndLayout(); 6873 document->UpdateStyleAndLayout();
6874 6874
6875 EXPECT_FALSE(exception_state.HadException()); 6875 EXPECT_FALSE(exception_state.HadException());
6876 auto range = EphemeralRange::RangeOfContents(*element); 6876 auto range = EphemeralRange::RangeOfContents(*element);
6877 document->Markers().AddMarker(range.StartPosition(), range.EndPosition(), 6877 document->Markers().AddSpellingMarker(range.StartPosition(),
6878 DocumentMarker::kSpelling); 6878 range.EndPosition());
6879 document->Markers().AddMarker(range.StartPosition(), range.EndPosition(), 6879 document->Markers().AddGrammarMarker(range.StartPosition(),
6880 DocumentMarker::kGrammar); 6880 range.EndPosition());
6881 EXPECT_EQ(2U, document->Markers().Markers().size()); 6881 EXPECT_EQ(2U, document->Markers().Markers().size());
6882 6882
6883 textcheck.KickNoResults(); 6883 textcheck.KickNoResults();
6884 EXPECT_EQ(0U, document->Markers().Markers().size()); 6884 EXPECT_EQ(0U, document->Markers().Markers().size());
6885 } 6885 }
6886 6886
6887 TEST_P(ParameterizedWebFrameTest, SpellcheckResultsSavedInDocument) { 6887 TEST_P(ParameterizedWebFrameTest, SpellcheckResultsSavedInDocument) {
6888 RegisterMockedHttpURLLoad("spell.html"); 6888 RegisterMockedHttpURLLoad("spell.html");
6889 FrameTestHelpers::WebViewHelper web_view_helper; 6889 FrameTestHelpers::WebViewHelper web_view_helper;
6890 InitializeTextSelectionWebView(base_url_ + "spell.html", &web_view_helper); 6890 InitializeTextSelectionWebView(base_url_ + "spell.html", &web_view_helper);
(...skipping 5256 matching lines...) Expand 10 before | Expand all | Expand 10 after
12147 12147
12148 // Failing the original child frame navigation and trying to render fallback 12148 // Failing the original child frame navigation and trying to render fallback
12149 // content shouldn't crash. It should return NoLoadInProgress. This is so the 12149 // content shouldn't crash. It should return NoLoadInProgress. This is so the
12150 // caller won't attempt to replace the correctly empty frame with an error 12150 // caller won't attempt to replace the correctly empty frame with an error
12151 // page. 12151 // page.
12152 EXPECT_EQ(WebLocalFrame::NoLoadInProgress, 12152 EXPECT_EQ(WebLocalFrame::NoLoadInProgress,
12153 child->MaybeRenderFallbackContent(WebURLError())); 12153 child->MaybeRenderFallbackContent(WebURLError()));
12154 } 12154 }
12155 12155
12156 } // namespace blink 12156 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698