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 6481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6492 class TextCheckClient : public WebTextCheckClient { | 6492 class TextCheckClient : public WebTextCheckClient { |
6493 public: | 6493 public: |
6494 TextCheckClient() : number_of_times_checked_(0) {} | 6494 TextCheckClient() : number_of_times_checked_(0) {} |
6495 virtual ~TextCheckClient() {} | 6495 virtual ~TextCheckClient() {} |
6496 void RequestCheckingOfText(const WebString&, | 6496 void RequestCheckingOfText(const WebString&, |
6497 WebTextCheckingCompletion* completion) override { | 6497 WebTextCheckingCompletion* completion) override { |
6498 ++number_of_times_checked_; | 6498 ++number_of_times_checked_; |
6499 Vector<WebTextCheckingResult> results; | 6499 Vector<WebTextCheckingResult> results; |
6500 const int kMisspellingStartOffset = 1; | 6500 const int kMisspellingStartOffset = 1; |
6501 const int kMisspellingLength = 8; | 6501 const int kMisspellingLength = 8; |
6502 results.push_back(WebTextCheckingResult(kWebTextDecorationTypeSpelling, | 6502 results.push_back(WebTextCheckingResult( |
6503 kMisspellingStartOffset, | 6503 kWebTextDecorationTypeSpelling, kMisspellingStartOffset, |
6504 kMisspellingLength, WebString())); | 6504 kMisspellingLength, WebVector<WebString>())); |
6505 completion->DidFinishCheckingText(results); | 6505 completion->DidFinishCheckingText(results); |
6506 } | 6506 } |
6507 int NumberOfTimesChecked() const { return number_of_times_checked_; } | 6507 int NumberOfTimesChecked() const { return number_of_times_checked_; } |
6508 | 6508 |
6509 private: | 6509 private: |
6510 int number_of_times_checked_; | 6510 int number_of_times_checked_; |
6511 }; | 6511 }; |
6512 | 6512 |
6513 TEST_P(ParameterizedWebFrameTest, ReplaceMisspelledRange) { | 6513 TEST_P(ParameterizedWebFrameTest, ReplaceMisspelledRange) { |
6514 RegisterMockedHttpURLLoad("spell.html"); | 6514 RegisterMockedHttpURLLoad("spell.html"); |
(...skipping 5528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12043 | 12043 |
12044 // Failing the original child frame navigation and trying to render fallback | 12044 // Failing the original child frame navigation and trying to render fallback |
12045 // content shouldn't crash. It should return NoLoadInProgress. This is so the | 12045 // content shouldn't crash. It should return NoLoadInProgress. This is so the |
12046 // caller won't attempt to replace the correctly empty frame with an error | 12046 // caller won't attempt to replace the correctly empty frame with an error |
12047 // page. | 12047 // page. |
12048 EXPECT_EQ(WebLocalFrame::NoLoadInProgress, | 12048 EXPECT_EQ(WebLocalFrame::NoLoadInProgress, |
12049 child->MaybeRenderFallbackContent(WebURLError())); | 12049 child->MaybeRenderFallbackContent(WebURLError())); |
12050 } | 12050 } |
12051 | 12051 |
12052 } // namespace blink | 12052 } // namespace blink |
OLD | NEW |