OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Tests for jni_generator.py. | 6 """Tests for jni_generator.py. |
7 | 7 |
8 This test suite contains various tests for the JNI generator. | 8 This test suite contains various tests for the JNI generator. |
9 It exercises the low-level parser all the way up to the | 9 It exercises the low-level parser all the way up to the |
10 code generator and ensures the output matches a golden | 10 code generator and ensures the output matches a golden |
(...skipping 1870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1881 import android.view.Surface; | 1881 import android.view.Surface; |
1882 | 1882 |
1883 import java.util.ArrayList; | 1883 import java.util.ArrayList; |
1884 | 1884 |
1885 import org.chromium.base.CalledByNative; | 1885 import org.chromium.base.CalledByNative; |
1886 import org.chromium.base.JNINamespace; | 1886 import org.chromium.base.JNINamespace; |
1887 import org.chromium.content.app.ContentMain; | 1887 import org.chromium.content.app.ContentMain; |
1888 import org.chromium.content.browser.SandboxedProcessConnection; | 1888 import org.chromium.content.browser.SandboxedProcessConnection; |
1889 import org.chromium.content.common.ISandboxedProcessCallback; | 1889 import org.chromium.content.common.ISandboxedProcessCallback; |
1890 import org.chromium.content.common.ISandboxedProcessService; | 1890 import org.chromium.content.common.ISandboxedProcessService; |
1891 import org.chromium.content.common.SurfaceCallback; | |
1892 import org.chromium.content.common.WillNotRaise.AnException; | 1891 import org.chromium.content.common.WillNotRaise.AnException; |
1893 import org.chromium.content.common.WillRaise.AnException; | 1892 import org.chromium.content.common.WillRaise.AnException; |
1894 | 1893 |
1895 import static org.chromium.Bar.Zoo; | 1894 import static org.chromium.Bar.Zoo; |
1896 | 1895 |
1897 class Foo { | 1896 class Foo { |
1898 public static class BookmarkNode implements Parcelable { | 1897 public static class BookmarkNode implements Parcelable { |
1899 } | 1898 } |
1900 public interface PasswordListObserver { | 1899 public interface PasswordListObserver { |
1901 } | 1900 } |
(...skipping 18 matching lines...) Expand all Loading... |
1920 | 1919 |
1921 def testJniParamsJavaToJni(self): | 1920 def testJniParamsJavaToJni(self): |
1922 self.assertTextEquals('I', JniParams.JavaToJni('int')) | 1921 self.assertTextEquals('I', JniParams.JavaToJni('int')) |
1923 self.assertTextEquals('[B', JniParams.JavaToJni('byte[]')) | 1922 self.assertTextEquals('[B', JniParams.JavaToJni('byte[]')) |
1924 self.assertTextEquals( | 1923 self.assertTextEquals( |
1925 '[Ljava/nio/ByteBuffer;', JniParams.JavaToJni('java/nio/ByteBuffer[]')) | 1924 '[Ljava/nio/ByteBuffer;', JniParams.JavaToJni('java/nio/ByteBuffer[]')) |
1926 | 1925 |
1927 | 1926 |
1928 if __name__ == '__main__': | 1927 if __name__ == '__main__': |
1929 unittest.main() | 1928 unittest.main() |
OLD | NEW |