| 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 6579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6590 document->frame() | 6590 document->frame() |
| 6591 ->spellChecker() | 6591 ->spellChecker() |
| 6592 .idleSpellCheckCallback() | 6592 .idleSpellCheckCallback() |
| 6593 .forceInvocationForTesting(); | 6593 .forceInvocationForTesting(); |
| 6594 } | 6594 } |
| 6595 | 6595 |
| 6596 document->updateStyleAndLayout(); | 6596 document->updateStyleAndLayout(); |
| 6597 | 6597 |
| 6598 EXPECT_FALSE(exceptionState.hadException()); | 6598 EXPECT_FALSE(exceptionState.hadException()); |
| 6599 auto range = EphemeralRange::rangeOfContents(*element); | 6599 auto range = EphemeralRange::rangeOfContents(*element); |
| 6600 document->markers().addSpellingMarker(range.startPosition(), | 6600 document->markers().addSpellingMarker(range); |
| 6601 range.endPosition()); | 6601 document->markers().addGrammarMarker(range); |
| 6602 document->markers().addGrammarMarker(range.startPosition(), | |
| 6603 range.endPosition()); | |
| 6604 EXPECT_EQ(2U, document->markers().markers().size()); | 6602 EXPECT_EQ(2U, document->markers().markers().size()); |
| 6605 | 6603 |
| 6606 spellcheck.kickNoResults(); | 6604 spellcheck.kickNoResults(); |
| 6607 EXPECT_EQ(0U, document->markers().markers().size()); | 6605 EXPECT_EQ(0U, document->markers().markers().size()); |
| 6608 } | 6606 } |
| 6609 | 6607 |
| 6610 TEST_P(ParameterizedWebFrameTest, SpellcheckResultsSavedInDocument) { | 6608 TEST_P(ParameterizedWebFrameTest, SpellcheckResultsSavedInDocument) { |
| 6611 registerMockedHttpURLLoad("spell.html"); | 6609 registerMockedHttpURLLoad("spell.html"); |
| 6612 FrameTestHelpers::WebViewHelper webViewHelper; | 6610 FrameTestHelpers::WebViewHelper webViewHelper; |
| 6613 initializeTextSelectionWebView(m_baseURL + "spell.html", &webViewHelper); | 6611 initializeTextSelectionWebView(m_baseURL + "spell.html", &webViewHelper); |
| (...skipping 4945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11559 EXPECT_FALSE(testSelectAll("<textarea></textarea>")); | 11557 EXPECT_FALSE(testSelectAll("<textarea></textarea>")); |
| 11560 EXPECT_TRUE(testSelectAll("<textarea>nonempty</textarea>")); | 11558 EXPECT_TRUE(testSelectAll("<textarea>nonempty</textarea>")); |
| 11561 EXPECT_FALSE(testSelectAll("<input>")); | 11559 EXPECT_FALSE(testSelectAll("<input>")); |
| 11562 EXPECT_TRUE(testSelectAll("<input value='nonempty'>")); | 11560 EXPECT_TRUE(testSelectAll("<input value='nonempty'>")); |
| 11563 // TODO(amaralp): Empty contenteditable should not have select all enabled. | 11561 // TODO(amaralp): Empty contenteditable should not have select all enabled. |
| 11564 EXPECT_TRUE(testSelectAll("<div contenteditable></div>")); | 11562 EXPECT_TRUE(testSelectAll("<div contenteditable></div>")); |
| 11565 EXPECT_TRUE(testSelectAll("<div contenteditable>nonempty</div>")); | 11563 EXPECT_TRUE(testSelectAll("<div contenteditable>nonempty</div>")); |
| 11566 } | 11564 } |
| 11567 | 11565 |
| 11568 } // namespace blink | 11566 } // namespace blink |
| OLD | NEW |