| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 widget_host_ = NULL; | 341 widget_host_ = NULL; |
| 342 view_ = NULL; | 342 view_ = NULL; |
| 343 } | 343 } |
| 344 | 344 |
| 345 // Checks that IME-composition-event state is maintained correctly. | 345 // Checks that IME-composition-event state is maintained correctly. |
| 346 TEST_F(RenderWidgetHostViewAuraTest, SetCompositionText) { | 346 TEST_F(RenderWidgetHostViewAuraTest, SetCompositionText) { |
| 347 view_->InitAsChild(NULL); | 347 view_->InitAsChild(NULL); |
| 348 view_->Show(); | 348 view_->Show(); |
| 349 | 349 |
| 350 ui::CompositionText composition_text; | 350 ui::CompositionText composition_text; |
| 351 composition_text.text = ASCIIToUTF16("|a|b"); | 351 composition_text.text = base::ASCIIToUTF16("|a|b"); |
| 352 | 352 |
| 353 // Focused segment | 353 // Focused segment |
| 354 composition_text.underlines.push_back( | 354 composition_text.underlines.push_back( |
| 355 ui::CompositionUnderline(0, 3, 0xff000000, true)); | 355 ui::CompositionUnderline(0, 3, 0xff000000, true)); |
| 356 | 356 |
| 357 // Non-focused segment | 357 // Non-focused segment |
| 358 composition_text.underlines.push_back( | 358 composition_text.underlines.push_back( |
| 359 ui::CompositionUnderline(3, 4, 0xff000000, false)); | 359 ui::CompositionUnderline(3, 4, 0xff000000, false)); |
| 360 | 360 |
| 361 const ui::CompositionUnderlines& underlines = composition_text.underlines; | 361 const ui::CompositionUnderlines& underlines = composition_text.underlines; |
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1211 view_->OnSwapCompositorFrame( | 1211 view_->OnSwapCompositorFrame( |
| 1212 1, MakeDelegatedFrame(2.f, frame_size, gfx::Rect(frame_size))); | 1212 1, MakeDelegatedFrame(2.f, frame_size, gfx::Rect(frame_size))); |
| 1213 | 1213 |
| 1214 // When we get a new frame with the same frame size in physical pixels, but a | 1214 // When we get a new frame with the same frame size in physical pixels, but a |
| 1215 // different scale, we should generate a new frame provider, as the final | 1215 // different scale, we should generate a new frame provider, as the final |
| 1216 // result will need to be scaled differently to the screen. | 1216 // result will need to be scaled differently to the screen. |
| 1217 EXPECT_NE(frame_provider.get(), view_->frame_provider_.get()); | 1217 EXPECT_NE(frame_provider.get(), view_->frame_provider_.get()); |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 } // namespace content | 1220 } // namespace content |
| OLD | NEW |