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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 if (renderer->style()) { | 364 if (renderer->style()) { |
365 renderer->style()->setTextAutosizingMultiplier(2); | 365 renderer->style()->setTextAutosizingMultiplier(2); |
366 EXPECT_EQ(2, renderer->style()->textAutosizingMultiplier()); | 366 EXPECT_EQ(2, renderer->style()->textAutosizingMultiplier()); |
367 multiplierSetAtLeastOnce = true; | 367 multiplierSetAtLeastOnce = true; |
368 } | 368 } |
369 renderer = renderer->nextInPreOrder(); | 369 renderer = renderer->nextInPreOrder(); |
370 } | 370 } |
371 EXPECT_TRUE(multiplierSetAtLeastOnce); | 371 EXPECT_TRUE(multiplierSetAtLeastOnce); |
372 | 372 |
373 WebCore::ViewportArguments arguments = document->viewportArguments(); | 373 WebCore::ViewportArguments arguments = document->viewportArguments(); |
374 arguments.width += 10; | 374 // Choose a width that's not going match the viewport width of the loaded do
cument. |
| 375 arguments.minWidth = WebCore::Length(100, WebCore::Fixed); |
| 376 arguments.maxWidth = WebCore::Length(100, WebCore::Fixed); |
375 webViewImpl()->updatePageDefinedPageScaleConstraints(arguments); | 377 webViewImpl()->updatePageDefinedPageScaleConstraints(arguments); |
376 | 378 |
377 bool multiplierCheckedAtLeastOnce = false; | 379 bool multiplierCheckedAtLeastOnce = false; |
378 renderer = document->renderer(); | 380 renderer = document->renderer(); |
379 while (renderer) { | 381 while (renderer) { |
380 if (renderer->style()) { | 382 if (renderer->style()) { |
381 EXPECT_EQ(1, renderer->style()->textAutosizingMultiplier()); | 383 EXPECT_EQ(1, renderer->style()->textAutosizingMultiplier()); |
382 multiplierCheckedAtLeastOnce = true; | 384 multiplierCheckedAtLeastOnce = true; |
383 } | 385 } |
384 renderer = renderer->nextInPreOrder(); | 386 renderer = renderer->nextInPreOrder(); |
(...skipping 3367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3752 m_webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "push_state.h
tml", true, 0, &client); | 3754 m_webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "push_state.h
tml", true, 0, &client); |
3753 runPendingTasks(); | 3755 runPendingTasks(); |
3754 | 3756 |
3755 EXPECT_EQ(client.startLoadingCount(), 2); | 3757 EXPECT_EQ(client.startLoadingCount(), 2); |
3756 EXPECT_EQ(client.stopLoadingCount(), 2); | 3758 EXPECT_EQ(client.stopLoadingCount(), 2); |
3757 m_webView->close(); | 3759 m_webView->close(); |
3758 m_webView = 0; | 3760 m_webView = 0; |
3759 } | 3761 } |
3760 | 3762 |
3761 } // namespace | 3763 } // namespace |
OLD | NEW |