OLD | NEW |
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 6863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6874 document->GetFrame() | 6874 document->GetFrame() |
6875 ->GetSpellChecker() | 6875 ->GetSpellChecker() |
6876 .GetIdleSpellCheckCallback() | 6876 .GetIdleSpellCheckCallback() |
6877 .ForceInvocationForTesting(); | 6877 .ForceInvocationForTesting(); |
6878 } | 6878 } |
6879 | 6879 |
6880 document->UpdateStyleAndLayout(); | 6880 document->UpdateStyleAndLayout(); |
6881 | 6881 |
6882 EXPECT_FALSE(exception_state.HadException()); | 6882 EXPECT_FALSE(exception_state.HadException()); |
6883 auto range = EphemeralRange::RangeOfContents(*element); | 6883 auto range = EphemeralRange::RangeOfContents(*element); |
6884 document->Markers().AddSpellingMarker(range.StartPosition(), | 6884 document->Markers().AddSpellingMarker(range); |
6885 range.EndPosition()); | 6885 document->Markers().AddGrammarMarker(range); |
6886 document->Markers().AddGrammarMarker(range.StartPosition(), | |
6887 range.EndPosition()); | |
6888 EXPECT_EQ(2U, document->Markers().Markers().size()); | 6886 EXPECT_EQ(2U, document->Markers().Markers().size()); |
6889 | 6887 |
6890 textcheck.KickNoResults(); | 6888 textcheck.KickNoResults(); |
6891 EXPECT_EQ(0U, document->Markers().Markers().size()); | 6889 EXPECT_EQ(0U, document->Markers().Markers().size()); |
6892 } | 6890 } |
6893 | 6891 |
6894 TEST_P(ParameterizedWebFrameTest, SpellcheckResultsSavedInDocument) { | 6892 TEST_P(ParameterizedWebFrameTest, SpellcheckResultsSavedInDocument) { |
6895 RegisterMockedHttpURLLoad("spell.html"); | 6893 RegisterMockedHttpURLLoad("spell.html"); |
6896 FrameTestHelpers::WebViewHelper web_view_helper; | 6894 FrameTestHelpers::WebViewHelper web_view_helper; |
6897 InitializeTextSelectionWebView(base_url_ + "spell.html", &web_view_helper); | 6895 InitializeTextSelectionWebView(base_url_ + "spell.html", &web_view_helper); |
(...skipping 5287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12185 if (obj->IsText()) { | 12183 if (obj->IsText()) { |
12186 LayoutText* layout_text = ToLayoutText(obj); | 12184 LayoutText* layout_text = ToLayoutText(obj); |
12187 text = layout_text->GetText(); | 12185 text = layout_text->GetText(); |
12188 break; | 12186 break; |
12189 } | 12187 } |
12190 } | 12188 } |
12191 EXPECT_EQ("foo alt", text.Utf8()); | 12189 EXPECT_EQ("foo alt", text.Utf8()); |
12192 } | 12190 } |
12193 | 12191 |
12194 } // namespace blink | 12192 } // namespace blink |
OLD | NEW |