| 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 6580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6591 class TextCheckClient : public WebTextCheckClient { | 6591 class TextCheckClient : public WebTextCheckClient { |
| 6592 public: | 6592 public: |
| 6593 TextCheckClient() : number_of_times_checked_(0) {} | 6593 TextCheckClient() : number_of_times_checked_(0) {} |
| 6594 virtual ~TextCheckClient() {} | 6594 virtual ~TextCheckClient() {} |
| 6595 void RequestCheckingOfText(const WebString&, | 6595 void RequestCheckingOfText(const WebString&, |
| 6596 WebTextCheckingCompletion* completion) override { | 6596 WebTextCheckingCompletion* completion) override { |
| 6597 ++number_of_times_checked_; | 6597 ++number_of_times_checked_; |
| 6598 Vector<WebTextCheckingResult> results; | 6598 Vector<WebTextCheckingResult> results; |
| 6599 const int kMisspellingStartOffset = 1; | 6599 const int kMisspellingStartOffset = 1; |
| 6600 const int kMisspellingLength = 8; | 6600 const int kMisspellingLength = 8; |
| 6601 results.push_back(WebTextCheckingResult(kWebTextDecorationTypeSpelling, | 6601 results.push_back(WebTextCheckingResult( |
| 6602 kMisspellingStartOffset, | 6602 kWebTextDecorationTypeSpelling, kMisspellingStartOffset, |
| 6603 kMisspellingLength, WebString())); | 6603 kMisspellingLength, WebVector<WebString>())); |
| 6604 completion->DidFinishCheckingText(results); | 6604 completion->DidFinishCheckingText(results); |
| 6605 } | 6605 } |
| 6606 int NumberOfTimesChecked() const { return number_of_times_checked_; } | 6606 int NumberOfTimesChecked() const { return number_of_times_checked_; } |
| 6607 | 6607 |
| 6608 private: | 6608 private: |
| 6609 int number_of_times_checked_; | 6609 int number_of_times_checked_; |
| 6610 }; | 6610 }; |
| 6611 | 6611 |
| 6612 TEST_P(ParameterizedWebFrameTest, ReplaceMisspelledRange) { | 6612 TEST_P(ParameterizedWebFrameTest, ReplaceMisspelledRange) { |
| 6613 RegisterMockedHttpURLLoad("spell.html"); | 6613 RegisterMockedHttpURLLoad("spell.html"); |
| (...skipping 5566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12180 if (obj->IsText()) { | 12180 if (obj->IsText()) { |
| 12181 LayoutText* layout_text = ToLayoutText(obj); | 12181 LayoutText* layout_text = ToLayoutText(obj); |
| 12182 text = layout_text->GetText(); | 12182 text = layout_text->GetText(); |
| 12183 break; | 12183 break; |
| 12184 } | 12184 } |
| 12185 } | 12185 } |
| 12186 EXPECT_EQ("foo alt", text.Utf8()); | 12186 EXPECT_EQ("foo alt", text.Utf8()); |
| 12187 } | 12187 } |
| 12188 | 12188 |
| 12189 } // namespace blink | 12189 } // namespace blink |
| OLD | NEW |