Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(791)

Side by Side Diff: fpdfsdk/src/fpdfformfill_embeddertest.cpp

Issue 1265503005: clang-format all pdfium code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: sigh Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 PDFium Authors. All rights reserved. 1 // Copyright 2015 PDFium 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
6 #include "../../public/fpdf_formfill.h" 5 #include "../../public/fpdf_formfill.h"
7 #include "../../testing/embedder_test.h" 6 #include "../../testing/embedder_test.h"
8 #include "../../testing/embedder_test_mock_delegate.h" 7 #include "../../testing/embedder_test_mock_delegate.h"
9 #include "../../testing/embedder_test_timer_handling_delegate.h" 8 #include "../../testing/embedder_test_timer_handling_delegate.h"
10 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
11 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
12 11
13 using testing::_; 12 using testing::_;
14 using testing::Return; 13 using testing::Return;
15 14
16 class FPDFFormFillEmbeddertest : public EmbedderTest { 15 class FPDFFormFillEmbeddertest : public EmbedderTest {};
17 };
18 16
19 TEST_F(FPDFFormFillEmbeddertest, FirstTest) { 17 TEST_F(FPDFFormFillEmbeddertest, FirstTest) {
20 EmbedderTestMockDelegate mock; 18 EmbedderTestMockDelegate mock;
21 EXPECT_CALL(mock, Alert(_, _, _, _)).Times(0); 19 EXPECT_CALL(mock, Alert(_, _, _, _)).Times(0);
22 EXPECT_CALL(mock, UnsupportedHandler(_)).Times(0); 20 EXPECT_CALL(mock, UnsupportedHandler(_)).Times(0);
23 EXPECT_CALL(mock, SetTimer(_, _)).Times(0); 21 EXPECT_CALL(mock, SetTimer(_, _)).Times(0);
24 EXPECT_CALL(mock, KillTimer(_)).Times(0); 22 EXPECT_CALL(mock, KillTimer(_)).Times(0);
25 SetDelegate(&mock); 23 SetDelegate(&mock);
26 24
27 EXPECT_TRUE(OpenDocument("testing/resources/hello_world.pdf")); 25 EXPECT_TRUE(OpenDocument("testing/resources/hello_world.pdf"));
(...skipping 18 matching lines...) Expand all
46 EXPECT_TRUE(OpenDocument("testing/resources/hello_world.pdf")); 44 EXPECT_TRUE(OpenDocument("testing/resources/hello_world.pdf"));
47 FPDF_PAGE page = LoadPage(0); 45 FPDF_PAGE page = LoadPage(0);
48 EXPECT_NE(nullptr, page); 46 EXPECT_NE(nullptr, page);
49 47
50 // Test that FORM_OnMouseMove() etc. permit null HANDLES and PAGES. 48 // Test that FORM_OnMouseMove() etc. permit null HANDLES and PAGES.
51 FORM_OnMouseMove(nullptr, page, 0, 10.0, 10.0); 49 FORM_OnMouseMove(nullptr, page, 0, 10.0, 10.0);
52 FORM_OnMouseMove(form_handle(), nullptr, 0, 10.0, 10.0); 50 FORM_OnMouseMove(form_handle(), nullptr, 0, 10.0, 10.0);
53 51
54 UnloadPage(page); 52 UnloadPage(page);
55 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698